vv

14122 Reputation

20 Badges

10 years, 238 days

MaplePrimes Activity


These are answers submitted by vv

Note first that you are using incorrectly the 2D input. You have a space after assume which is interpreted as multiplication; so all the assume stuff is ignored (actually it is anyway useless in your case).

Maple is not smart enough to obtain such bounds. It does not know Grönwall's inequality (see wiki).

Edit. You should also avoid gamma which is a Maple constant (unless this is what you want).

 

 

 

Maple does automatic simplifications which cannot be prevented.

 

(a^2)^3;

a^6

(1)

'(a^2)^3';

a^6

(2)

You neeed unevaluation to obtain (partially) what you want.

'(a^2)'^3;  # this is not enough

a^6

(3)

(a^2) ^ ''3'';

(a^2)^'3'

(4)

''(a^2)'' ^ 3;

'a^2'^3

(5)

###################

The only method is to use as input inert operators: the inert form of the operator u  is  %u

ex:=(a %^ 2) %^ 3;
op(0,ex); op(ex);

`%^`(`%^`(a, 2), 3)

 

`%^`

 

`%^`(a, 2), 3

(6)

ex:=a %/ b;
op(0,ex); op(ex);

`%/`(a, b)

 

`%/`

 

a, b

(7)

ex:=a %- b;
op(0,ex); op(ex);

`%-`(a, b)

 

`%-`

 

a, b

(8)

 

 

It is better to use P[n](t)  instead of P(n,t).

Using your equations it is of course possible to express P[m]  but it will depend of P[0] (and its derivatives)  because P[0] is arbitrary (C^m differentiable).

 

restart;

eqn:=D(P[n]) = -(lambda+mu)*P[n]+lambda*P[n-1]+mu*P[n+1]; # n>0

D(P[n]) = -(lambda+mu)*P[n]+lambda*P[n-1]+mu*P[n+1]

(1)

eq0:=D(P[0]) = -lambda*P[0]+mu*P[1];

D(P[0]) = -lambda*P[0]+mu*P[1]

(2)

En:=rhs(isolate(eqn,P[n+1]));
E0:=rhs(isolate(eq0,P[1]));

-(-D(P[n])-(lambda+mu)*P[n]+lambda*P[n-1])/mu

 

-(-D(P[0])-lambda*P[0])/mu

(3)

m:=4;
D(mu):=0: D(lambda):=0:

4

(4)

P[1]:=E0:
for n to m-1 do  P[n+1]:=En od:

''P''[m]=simplify(P[m]);

'P'[4] = ((4*lambda^3+3*lambda^2*mu+2*lambda*mu^2+mu^3)*D(P[0])+(6*lambda^2+6*lambda*mu+3*mu^2)*(D@@2)(P[0])+(3*mu+4*lambda)*(D@@3)(P[0])+lambda^4*P[0]+(D@@4)(P[0]))/mu^4

(5)

The series F diverges for any x if n>3.

F:=sum(GAMMA((1/2)*n+1/2)*GAMMA((1/2)*n-1+i)*GAMMA(i+1)^(-i)*((-n+1-2*i)*GAMMA((1/2)*n+1/2)/((x^2-1)*GAMMA((1/2)*n+1/2+i)*(n-1)))^(-i)/(GAMMA((1/2)*n+1/2+i)*GAMMA((1/2)*n-1)), i = 1 .. infinity):
a:=op(1,F):
r:=eval(a,i=i+1)/a:
r1:=simplify(r)/(1-x^2) assuming i::posint:
limit(r1, i=infinity) assuming n>3;

      infinity

For n=3, F = (1-x)/(1+x), 0 <= x < 1.
 

 

A:=proc(n::posint)
  local t:=A(n-1);
  <t,1+~0*t;0*t,t>
end:
A(1):=<<c__0>>:

seq(A(n),n=1..4);

Matrix(1, 1, {(1, 1) = c__0}), Matrix(2, 2, {(1, 1) = c__0, (1, 2) = 1, (2, 1) = 0, (2, 2) = c__0}), Matrix(4, 4, {(1, 1) = c__0, (1, 2) = 1, (1, 3) = 1, (1, 4) = 1, (2, 1) = 0, (2, 2) = c__0, (2, 3) = 1, (2, 4) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = c__0, (3, 4) = 1, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = c__0}), Matrix(8, 8, {(1, 1) = c__0, (1, 2) = 1, (1, 3) = 1, (1, 4) = 1, (1, 5) = 1, (1, 6) = 1, (1, 7) = 1, (1, 8) = 1, (2, 1) = 0, (2, 2) = c__0, (2, 3) = 1, (2, 4) = 1, (2, 5) = 1, (2, 6) = 1, (2, 7) = 1, (2, 8) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = c__0, (3, 4) = 1, (3, 5) = 1, (3, 6) = 1, (3, 7) = 1, (3, 8) = 1, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = c__0, (4, 5) = 1, (4, 6) = 1, (4, 7) = 1, (4, 8) = 1, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = c__0, (5, 6) = 1, (5, 7) = 1, (5, 8) = 1, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = c__0, (6, 7) = 1, (6, 8) = 1, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = c__0, (7, 8) = 1, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 0, (8, 8) = c__0})

(1)

If (more interesting) 1 denotes the unit matrix then replace 1+~0*t with 1+0*t

Your procedure newprocedure does not return both matices H and psi; it returns H only.
So, change
return H:
psi:

to
return H, psi:
(actually return is superfluous).

You should also remove interface(rtablesize...) for several reasons, e.g. it is in a loop, you have Dimensions instead of Dimension.

Why don't you save in a text file? E.g.
save newprocedure, "file.mpl";

 

eq:=Y = (-2*k^3+6*k^2+sqrt(k^8-12*k^7+64*k^6-198*k^5+448*k^4-636*k^3+369*k^2)-7*k-15)/((k^3-3*k^2+5*k-15)*(1+k)):
isolate(eq, indets(eq,sqrt)[])^2:
factor((rhs-lhs)(%)):
select(has,%, Y):
collect(%,Y,factor) = 0;

The equivalence holds if you don't care the branch of the sqrt.

Your code does not work. Try this:

Pairs:=proc(p::prime)
local b, a:=2, t:=0, R:=table():
while (a<p) do
  b := 1/a mod p;
  if isprime(b) and not member([b,a],R)  then t:=t+1; R[t]:=[a,b] fi;
  a:=nextprime(a);
od:
entries(R,nolist)
end:

Pairs(101);
             [7, 29], [37, 71], [43, 47], [53, 61]

 

Use a simple (linear) change of variables.

J:=2*Int((1/16)*(((1/2)*sin(theta2)*((cos(theta2)+1)*(1+cos(theta1))*cos(phi2*s)+sin(theta2)*sin(theta1))*sin(theta1)/((cos(theta2)+1)*(1+cos(theta1))*(sin(theta1)*sin(theta2)*cos(phi2*s)+cos(theta2)*cos(theta1)+1))))*sin(theta1)*sin(theta2)/Pi^2 * phi2, 
[s = 0 .. 1, phi2 = 0 .. Pi, theta2 = 0 .. Pi, theta1 = 0 .. Pi], method = _CubaCuhre, epsilon = 1e-5):  
evalf(J);
                       0.125000567251692

 

You must read about how GF(p^k) is represented (e.g. https://en.wikipedia.org/wiki/Finite_field).
If P is an irreducible  polynomial of degree k then a representation for GF(p^k)  is Zp[X] / (P) (i.e. a quotient ring which is actually a field).
So, an irreducible polynomial of degree 4 is needed in your case. For example

G16 := GF(2, 4, 1+x+x^4);

The elements of G16 will depend on this P (but obviously any two G16's will be isomorphic).

You are missing a multiplication sign (* or space) after V[0] and also after a,b,c.
You will need numerical values at least for a,b,c; otherwise the denominator will have to be factored simbolically e.g. with PolynomialTools:-Split and the final result will be huge and probably useless.

 

You have used square brackets [...]  in eqn1. Replace them with (...)  because [...]  are reserved for lists.

P.S. Spor la treabă!

The best thing is to eliminate yourself the extra vectors due to inherent roundoff errors.
(all vectors after an almost-null one are not reliable).

GS_sel := proc(GS,eps:=1e-7)
  local zer:=false, s;
  s:=proc(v) if zer then NULL elif LinearAlgebra:-Norm(v)>eps then v else zer:=true; NULL fi end;
  map(s,GS)
end:

GS_sel(GramSchmidt([b, c, d, e, a]));

Just add

dsolve({ entries(de, nolist), x__1(0)=0, x__2(0)=10, D(x__1)(0)=0, D(x__2)(0)=0 }) ;

Note that I have included initial conditions for derivatives, otherwise two arbitrary constants appear.

The minimal correction would be to replace both rand(1..6);  with rand(1..6)();
That's because rand(1..6)  is a procedure and must be called to produce a random number in the interval 1..6.

It will work, but this way each time you call it, the two procedures are created and then called.
A more efficient way is to define

dice := rand(1..6), rand(1..6);   # or better  rand(1..6) $2

Now dice is no longer a procedure but acts exactly the same, i.e. 
dice() ;
       6, 4

 

 

First 64 65 66 67 68 69 70 Last Page 66 of 121