nm

11353 Reputation

20 Badges

13 years, 14 days

MaplePrimes Activity


These are questions asked by nm

Hello; I found another ODE which Maple gives division by zero on.  Is this also a bug? 

dsolve(x*(a^2*x+(x^2-y(x)^2)*y(x))*diff(y(x),x)^2-(2*a^2*x*y(x)-(x^2-y(x)^2)^2)*diff(y(x),x)+a^2*y(x)^2-x*y(x)*(x^2-y(x)^2) = 0, y(x));

Error, (in dsolve) numeric exception: division by zero

This is from a book. Using Maple 2016.1 on windows.

Maple 2016.1 on windows. This ODE from a book, and Maple gives division by zero. Is this a bug or expected?

ode:=(a^2*x+(x^2-y(x)^2)*y(x))*diff(y(x),x)+x*(x^2-y(x)^2) = a^2*y(x);
dsolve(ode, y(x));

Error, (in dsolve) numeric exception: division by zero


Mathematica gives this to same ODE, but no division by zero.

DSolve[x*(x^2 - y[x]^2) + (a^2*x + y[x]*(x^2 - y[x]^2))*y'[x] == a^2*y[x], y[x], x]

Solve[x^2/2 - (1/2)*a^2*Log[x - y[x]] + (1/2)*a^2*Log[x + y[x]] +y[x]^2/2 == C[1], y[x]]

Where is the division by zero coming from in Maple?

2016.1 on windows.

I am learning how to use Maple with boundary value ODE. Given this ODE

y''''(x)+ lam* y(x) =0

with some B.C., say  y(0)=0,y'(0)=0,y''(L)=0,y'''(L)=0, where L is length.

I can't figure the correct syntax to use. It seems Maple do not like the syntax I am using, but it works on a second order ODE?

Here is my attempt:

restart;
assume(lam>0); assume(L>0);
bc:=y(0)=0,D[1](y)(0)=0,D[2](y)(L)=0,D[3](y)(L)=0;
dsolve({diff(y(x),x$4)+lam*y(x)=0,bc},y(x));

Error is 

Error, (in evalapply) too few variables for the derivative with respect to the 2nd variable
Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {bc}

But on a simpler second order ODE, the syntax works

restart;
assume(lam>0); assume(L>0);
bc:=y(0)=0,D[1](y)(0)=0;
dsolve([diff(y(x),x$2)+lam*y(x)=0,bc],y(x));

No error. 

Is the syntax I am using in first example wrong? what would be the correct syntax? I googled for long time, and can't find one example that shows how to use BVP with higher order ODE. I am Maple newbie.

 

How does one obtain all solutions from dsolve? I see an option called Allsolutions, but this seems to only apply to solve and other functions. It does not work with dsolve.

For example, maple gives one solution for the following first order non-linear ODE. But the ODE has another solution y(x)=0 as well. How does one tell Maple to return all solutions? I am interested in this when using the 'implicit' option mainly. Here is an example

restart;
num:=-(exp(x)*sin(y(x))-2*y(x)*sin(x)):
den:=(exp(x)*cos(y(x))+2*cos(x)):
eq:=diff(y(x),x)=num/den;

r0:=dsolve(eq,y(x));

But when I tried y(x)=0, it turned out to also be a solution

odetest(y(x)=0,eq);
                          0

But dsolve did not return this solution on its own along with the first one.  But on another example, Maple did well, and returned all solutions. Here is the other example

eq:=(2*x*y(x)^2+2*y(x))+(2*x^2*y(x)+2*x)*diff(y(x),x);
dsolve(eq=0,y(x),'implicit');

In the above, Maple returned the two solutions. 

Is there a correct way to tell Maple dsolve to return all solutions all the time? Why did it return both solution in the above example, but not in the first example?

I am maple newbie. Thank you.

in Mathematica, there is the option called BoxRatios

"is an option for Graphics3D that gives the ratios of side lengths for the bounding box of the threedimensional picture."

It is sort-of like aspect ratio, but for 3D. It is set by default so make 3D plot looks "nice". I can't seem to find equivalent Maple option. The closest is the option "s=" for plot3d, but this just turns of/on "constrained scaling" and does not allow one to modify the "BoxRatios"

Let me give an example. Here is 3D plot in Mathematica and the same in Maple. I'd like to get the Maple 3D to look similar to Mathematica 3D in terms of the "aspect ratio". Maple on the z-axis is using the same size as in the x and y axis, and even though this is realistic, it does not make the plot as nice. I want to change this ratio.

T0[x_, y_, m_] :=20/Pi Sum[ (-1)^(n + 1)/n Exp[- (n Pi/10) y] Sin[ (n Pi/10) x], {n,1, m}]
Plot3D[T0[x, y, 70], {x, 0, 10}, {y, 0, 10}, PlotRange -> All,  AxesLabel -> {x, y, z}]

In Maple:

T0:= (x,y,m)-> 20/Pi*sum( (-1)^(n+1)/n*exp(- n*Pi/10*y)*sin(n*Pi/10*x),n=1..m);
plot3d(T0(x,y,50),x=0..10,y=0..10,scaling=unconstrained);

So Maple is using 1:1:1 box ratio. Mathematica default is 1:1:0.4, and I wanted to see if I can change Maple to be the same.

I get same plot in Maple using scaling=unconstrained or scaling=constrained. So this option is not very useful for what I want.

Is there a way to change the "BoxRatios" as defined above in Maple? There must be, right? Do I need to use different package?

 

First 171 172 173 174 175 176 177 Last Page 173 of 199