nm

11353 Reputation

20 Badges

13 years, 10 days

MaplePrimes Activity


These are answers submitted by nm

restart;
p:=x^5-8*x^3+2:
n:=degree(p,x):
map(i->coeff(p,x,i),[seq(i,i=0..n)]);

To get them in the reverse order you wanted, use:

map(i->coeff(p,x,i),[seq(i,i=n..0,-1)]);

Using 1/t^2-1/s^2 = 1, a hyperbolic trig identity, where "t" is the tanh and "s" is the sinh. Replace the "s" in the expression, leaving just the "t" in there, Solution follows

restart;
e := (3+2*sinh(x)^2)/(sinh(x)^2*tanh(x));
expand(student[changevar](sinh(x)^2=tanh(x)^2/(1-tanh(x)^2),e));

 

I am not sure without giving specific value for n what is it you are looking for. But how about:

s:=convert( (a+b)^n,Sum,include = powers, dummy = x);

Other than this, I would not know. May be if you can show what result you expect to see for (a+b)^n it will help.

I am also at a loss as to what your function is meant to be. But assuming the data is meant to be <x,y,z> then you can try lisplot3d

xyz:=[[1,3,4],[2,11,12],[3,41,1]];
plots[listplot3d](xyz);

 

or
plots[spacecurve](xyz);

I would use standard formating, like we do in c

x:=10:
printf("The Synchronising vector is %d\n",x);

           The Synchronising vector is 10

x:=evalf(Pi):
printf("The Synchronising vector is %3.4f\n",x);


            The Synchronising vector is 3.1416

x:="micky mouse":
printf("The Synchronising vector is %s\n",x);

         The Synchronising vector is micky mouse

change the formating specs according to your data format  your are printing

eq1:=(x+y)*(x^2+y^2) = 5500;
eq2:=(x-y)*(x^2-y^2) = 352;
evalf(solve({eq1,eq2},{x,y}));

a:=<<1|0|0>,<1|0|0>,<0|0|0>>;

with(ArrayTools):

a:=CircularShift(a,1,2);

This book has number of problem solving and code

Applied Engineering Mathematics with Maple by Gilberto E. Urroz

another set of books with such problems that I like are Computer Algebra Recipes for Classical Mechanics by Richard H. Enns / George McGuire and Computer Algebra Recipes for Mathematical Physics by Richard H. Enns and Computer Algebra Recipes: An Introductory Guide to the Mathematical Models of Science.

Also Differential Equations and Boundary Value Problems by C. H. Edwards / David E. Penney, uses Maple. SPecific one.

I also have Maple Computer Guide for Advanced Engineering Mathematics by Erwin Kreyszig / E. J. Norminton which has Maple code many advanced equations solved using Maple.

A good one for PDE with Maple is Partial Differential Equations for Computational Science: With Maple and Vector Analysis by David Betounes. Also Physics with MAPLE by Frank Y. Wang would be good to look at.

 

This is what Maple 17.02 gives (hard to read what you have, why not show the Maple code as plain text so one can copy it??)

restart;
eq:=Pi=sum((120*n^2+A*n+B)/(16^n*(512*n^4 + 1024*n^3 + 712*n^2 + 194^n + 15)),n=0..infinity);

solve(eq,{A,B}):
evalf(%);


 

 

 

Using "/" should actually work for both windows and Linux/Unix. Did you try it? I do not have Maple for Linux, but on windows, it should accept "/"

Use 'NAG' output. The Matrix returned contains both L and U, but the L has an implicit 1`s on diagonal. Hence simply extract the L and U from NAG and add the diagonal of ones and transpose as needed. This gives the Crout decomposition. see Maple help for more information on NAG output

This below shows how to obtain cholesky, Dolittle and Crout LU decomposition of a Hermitian  positive-definite matrix

Cholesky

restart;
with(LinearAlgebra):
with(ArrayTools):
A :=<<2|-1|0>,<-1|2|-1>,<0|-1|2>>;


L,U:=LUDecomposition( A,method='Cholesky',output=['L','U'] );

Dolittle

V,LU:=LUDecomposition( A,output=['NAG'] ):
L:=LowerTriangle(LU,-1)+Diagonal(Vector(RowDimension(A),1));
U:=UpperTriangle(LU);

Crout

Uc:=Transpose(L);
Lc:=Transpose(U);

You should really add one or two more words saying what is it you want done with these symbols you typed.

I assuming for now you want to solve for x (an educated guess)

-----------------------------
restart;
eq1:= 4*(x-7) =6;
solve(eq1,x);
eq2:= (2*x+3)*(2*x^2-5*x-3)=0;
solve(eq2,x);
----------------------------

I can't read your code well, since it is not well formated and seems to have many synatx errors (may be it is the cut/paste that did that).

But the while loop is clearly not terminating.

Just look at the logic. It says WHILE P1<>q1 DO.... END DO, then inside the WHILE loop, there is nothing that would change this conditions. You seem to forgotten to assign P1 or q1 to something.

To use a WHILE loop, you need something inside the loop to cause the condition to change, else you'll get stick in an infinite loop.

In addition, it is "or" not "OR".  i.e. lower case. I do not see "OR" in maple help. How did you code run like this? Which Maple version are you using?

 

 

Iam sure there is a better way than this (I am newbie) using some build-in function, but how about this:

restart;
vars:={c1,c2,c3,c4,c5,c6,c7,c8,c9}:
e1 := c1 + 2*c2 + (c3+3*c4)*x*y + (c5+c6)*y^2 +(c8-2)*y^3*x^2 = 0:
e2 := (c4 + 2*c5 + c7)*x + (c9+ 2*c3+5*c4)*x^2 + (2*c7+5*c5+c6)*y^2*x^3 =0:
sys := map(coeffs,lhs~({e1,e2}),{x,y}) =~ 0:
print~(sys)[];

                         c1 + 2 c2 = 0
                         c3 + 3 c4 = 0
                          c5 + c6 = 0
                           c8 - 2 = 0
                       c4 + 2 c5 + c7 = 0
                      2 c7 + 5 c5 + c6 = 0
                      c9 + 2 c3 + 5 c4 = 0           

solve(sys,vars);

eq:= (x+y)^2+ 1/(x + y) ;
algsubs((x+y)=m,eq);
simplify(%);
subs(m=(x+y),%);

   


 

First 17 18 19 20 Page 19 of 20