nm

1365 Reputation

13 Badges

4 years, 347 days

MaplePrimes Activity


These are answers submitted by nm

This is what I get in Maple 2017
 

int(t^(a-1)/(1+t),t=0..1);

-(-a+1)/((a-1)*a)-(-a+1)*LerchPhi(-1, 1, -a)/(a-1)+Pi*csc(Pi*a)

 

And now

?LerchPhi

Works as expected. Your display settings seems to be setup differently.

 

try

restart;
y(0):=1;
x0:=0;
y0:=1;
xf:=1;
n:=10;
h:=evalf((xf-x0)/n);
f:=(x,y) -> x+y;
x:=x0;
y:=y0;
for i from 1 to n do 
    k:=f(x,y);
    y:=y+h*k;
    x:=x+h;
    print(x,y);
od:

gives

 

 

The Wonskian is handy function I did not know about. I used to do this by hand:

restart;
y:=[exp(2*x),exp(-x),x*exp(-x),x^2*exp(-x)]:
Matrix([seq([seq(diff(y[i],[x$j]),i=1..nops(y))],j=0..nops(y)-1)]);
LinearAlgebra:-Determinant(%);

num:=[123450000.0,0.00001234,123.45];
map(x->printf("%E\n",x),num);

map(x->printf("%0.2E\n",x),num);

I can't figure how to make it use 10^ instead of E, but they really means the same as scientific notations. On a side note, I think Maple's printf() is simpler than Mathematica's. Since printf() is standard, more general and I find it easier. I also use Mathematica.

Use interface(prettyprint=0)

 

This is becuase Maple syntax is a mess. There is no consistency. Something are UpperCase, and some things are lower case.  Unlike with Mathematica, where system symbols and functions all start with UpperCase.

What is more confusing, is in Maple doing ?pi brings up help page on pi telling the user that pi is 3.14159 and gives examples using Pi.   If pi was not a system symbol, why bring up the help page on it then? This only makes the user thinks that Maple knows about pi, when it is actually Pi.

See  http://www.mapleprimes.com/questions/203063-Why-Is-There-Pi-And-Pi-In-Maple-Why-Not-Just-Pi

for more dicsussion.

Maple syntax was never consistent.

 

Forget about cloud computing and browser based applications. It will never work and will always have problems.

The current issue is not really with Java. All NPAPI support is being removed from all browsers. So this affects not only Java, but also Mathematica CDF's and any other plugin which uses this technology.

The correct approach to all of this is as follows: Maplesoft makes a free player available which runs the apps. The player is basically the Maple engine. A user installs the free player once. Then to run any app, down it and double click on it. The player runs the app on the PC or the mac or linux. The app does not run inside the browser and not in any cloud thing.

Much better support and a more reliable software, since one does not have to deal with cloud issues and the internet and browsers and all these problems.

With Mathematica, it has the CDF player. Once installed, one can download any CDF app and run them on the PC or mac or Linux.

Given that it takes a second to download anything these days, I do not see why one must be attached to a cloud thing instead of simply run something on the PC or the laptop, and in much more reliable way.

 

You are passing `n` as symbolic

hanoi(n,1,3,2);

which maps to actual `N` in the proc, then you write

     if N>0 then

But N has no value. It is symbol.  So Maple does not know what to do.

Try assigning a value  to `n` before calling your function:

n:=10;
hanoi(n,1,3,2);

You could try intervals. Using the Tolerances it gives

restart;
with(Tolerances):
a:= 0 &+- 1;
b:= 0 &+- 1;
c:= 0 &+- 1;
sol:= {(-b + sqrt(b^2-4*a*c))/(2*a),(-b - sqrt(b^2-4*a*c))/(2*a)};



For example, changing the intervals, to these values, now it gives real solutions:

 

restart;
with(Tolerances):
a:= 3 &+- 1;
b:= 2 &+- 1;
c:= 2 &+- 1;
sol:= {(-b + sqrt(b^2-4*a*c))/(2*a),(-b - sqrt(b^2-4*a*c))/(2*a)};

 

step by step

 

restart;
eq1:=x1=a-y1-d*y2:
eq2:=x2=a-y2-d*y1:
z:=expand(subs(y2=solve(eq2,y2),eq1)):
z:=algsubs((a-a*d)=c,z):
algsubs((1-d^2)=b,z);

directly from help

M := <<1,0,0>|<1,1,0>|<0,3,2>>;
LinearAlgebra[CharacteristicPolynomial](M,x);

 

And if you do not know the commands, you can use the UI itself and it will show you, like this:

 

 

restart;
y:=x/sqrt(1-x^2);

y:=sort(y,x,ascending);

 

 

the function you have produces complex result. To plot the real part, and assuming I understood what you want

n:=100;
step:=0.1;
sol:=seq([i,Re(eval(Simpson(f,i,i+0.1,n)))],i=0..10-step,step):
plot([sol]);

To plot the complex part, Im can be used.

an easy way to handle this is as follows (I do this all the time). It takes about 10 extra seconds of post processing the pdf file: Open the pdf file, Tools->Advanced editing->Crop tool, draw the reactangle around the area you want to crop, double click on the area when done. Click OK, save the file.

Now the PDF file will contain the plot and no other empty space. Now you can include it in latex using \includegraphics{file.pdf}

restart;
DE1 := diff(y(t),t) = z(t);
DE2 := diff(z(t),t) = -y(t)*cos(t);
DEtools[phaseportrait]([DE1,DE2],[y(t),z(t)],t=-5..5,[[y(0)=1,z(0)=0],[y(0)=0,z(0)=2],[y(0)=0,z(0)=-2]],y=-Pi..Pi,z=-3..3,color=aquamarine,linecolor=[red,blue,green]);

1 2 3 4 5 Page 1 of 5