nm

8769 Reputation

19 Badges

11 years, 313 days

MaplePrimes Activity


These are questions asked by nm

For some reason, Maple does not use \frac{}{} for things like 1/2 that can occur in an expression

restart;
expr:=1/2;
latex(expr);

            1/2

This make the generated code not good looking. For example using this in Maple:

latex(diff(y(x), x)+y(x)*cos(x)-(1/2)*sin(2*x) = 0);

produces this latex when proccessed:

When the latex is put inside a display in the document.  This is terrible. Is there a way to tell Latex to use \frac{}{} for fractions?

 

I have few ode's which are solved by dsolve, but I am not able to get a zero from odetest(sol,ode). I tried the implicit option on the one which returns implicit solution, but I still do not get zero. I tried useInt as well.

Is there something else to do to verify the solution? My understanding is that if Maple returns a solution from dsolve, there there should be a way to get odetest() to verify the solution, but I could be wrong. Here are few examples, I have more if needed. This is Maple 18.01 on windows 7

restart;
MathematicalFunctions:-Version();
#       "C:\Program Files\Maple 18\lib\DEsAndMathematicalFunctions18.mla", `2014, July 25, 21:22 hours`
unassign(`print/ODESolStruc`):
ode1:=diff(y(x), x)+2*tan(y(x))*tan(x)-1:
ode2:=2*(diff(y(x), x))-3*y(x)^2-4*a*y(x)-b-c*exp(-2*a*x):
ode3:=(x^2+1)*(diff(y(x), x))+(y(x)^2+1)*(2*x*y(x)-1):
ode4:=x^7*(diff(y(x), x))+(2*(x^2+1))*y(x)^3+5*x^3*y(x)^2:
ode5:=(y(x)-x)*sqrt(x^2+1)*(diff(y(x), x))-a*sqrt((y(x)^2+1)^3):

sol1:=dsolve(ode1,y(x)):
sol2:=dsolve(ode2,y(x)):
sol3:=dsolve(ode3,y(x)):
sol4:=dsolve(ode4,y(x)):
sol5:=dsolve(ode5,y(x)):

odetest(sol1,ode1,implicit);  #not zero
odetest(sol2,ode2);             #not zero
odetest(sol3,ode3,implicit);  #not zero
odetest(sol4,ode4,implicit);  #not zero
odetest(sol5,ode5,implicit);  #not zero

I am going by the assumption that when Maple returns ODESolStruct as solution, then it means it could not solve the ODE. (example below)

My only complaint is that the syntax it uses for saying that the solution is ODESolStruct is not clear. I guess one has to look for & in the solution to know the result is ODEStruct.

http://www.maplesoft.com/support/help/Maple/view.aspx?path=dsolve%2fODESolStruc

Only when I convert the solution to string, then I can see the word "ODESolStruct" displayed.

My question is, how can I make maple display on the screen the word "ODESolStruct" in the solution, instead of using those "&" As that will make it more clear.

I am using worksheet on maple 18. Not document style. Here is an example:

restart;
ode:=diff(y(x),x$2)+a*exp(x)*sqrt(y(x));
sol:=dsolve(ode,y(x));


 The above was using 2D math display as default. If I use Maple notation as output I get:

----------------------------------------

restart:
ode:=diff(y(x),x$2)+a*exp(x)*sqrt(y(x)):
sol:=dsolve(ode,y(x));
sol := y(x) = `&where`(_a/exp(-2*(Int(_b(_a), _a))-2*_C1), [{diff(_b(_a), _a).......

-------------------------------------------

But now

convert(sol,string);
"y(x) = ODESolStruc(_a/exp(-2*Int(_b(_a),_a)-2*_C1),[{diff(_b(_a\ .............."

You can see now that the solution is ODESolStruct, but it is much more clear than the default solution above. But only when looking at the solution as string do I get it to show the word "ODESolStruct". 

Since odetest does not return zero, then maple did not solve it:

odetest(sol,ode);

btw, Compare the above to when Maple returns "DESol" structutre. In this case, it does now display on the screen the word "DESol":

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

Again, my question is:  Could I configure Maple to display in worksheet the solution using explicit ODESolStruct words instead of using "&" there to indicate more clearly the solution.

 

Maple 18.01, windows

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

           returns y(x)=0

 

So does

ode:=2*a^2*y(x)-20*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;

ode:=2*a^2*y(x)-200*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;

ode:=2*a^2*y(x)-2000*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;

etc...

Is this a bug?

 

 

 

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

gives

     DESol({diff(_Y(x), x, x)+(-a^2*x^(2*n)+1)*_Y(x)}, {_Y(x)})

as answer. I read the help on DESol, but what does the above actually mean? Where is the solution of the ode? It just returned the ode back to me. Can I consider that Maple did not solve this ode in this case?

from help

"DESol is a data structure to represent the solution of a differential equation. It is to dsolve as RootOf is to solve."

 

 

First 157 158 159 160 161 162 163 Last Page 159 of 167