"" <stephen.buckley@excite.com> writes:
> Dear Jay
>
> The DE is given in exact form
>
> 2xsin(3y)+3x^2cos(3y)dy=0
>
> which is in exact DE form [M(x,y)dx+N(x,y)dy] and can easily shown to be
>
> 2xsin(3y)dx+3x^2cos(3y)dy=d[x^2*sin(3y)]=0 with simple solution
>
> x^2*sin(3y) = constant
>
> OK trying this in Maxima [setting up for desolve] we rearrange the DE as
>
> dy/dx = -2x*sin(3y)/(3x^2*cos(3y)) = -2tan(3y)/(3x)
> and enter the DE into Maxima as follows:
>
> (C3) de1:'diff(y(x),x)=-2*tan(3*y)/(3*x);
Unfortunately, desolve really only works for linear odes with
constant coefficients, so (as you found out) it won't work for this.
...
> Looks like I may have made a mistake setting up the DE not having
> y(x) instead of y on RHS: trying again:
>
> (C6) de1:'diff(y(x),x)=-2*tan(3*y(x))/(3*x);
This is how it should be entered, anyhow.
> NOTE: I checked I was doing this right by trying an even simpler DE
> dy/dx = y with simple solution y = A*e^x
>
> (C8) de2:y(x)='diff(y(x),x);
> d
> (D8) y(x) = -- (y(x))
> dx
> (C9) desolve(de2,y(x));
> x
> (D9) y(x) = y(0) %E
> Looks OK.
Yeah, this one was linear with constant coefficients.
> Note: I tried the DE in various forms and found that DESOLVE
> couldn't even get an answer:
>
> (C11) de3:2*x*sin(3*y(x))+3*x^2*cos(3*y(x))*'diff(y(x),x)=0;
> 2 d
> (D11) 2 x SIN(3 y(x)) + 3 x (-- (y(x))) COS(3 y(x)) = 0
> dx
> (C12) desolve(de3,y(x));
> DESOLVE can't handle this case.
desolve should give this message in your previous examples also, I would
think. Or even better, a message like
DESOLVE can't handle this case, it solves systems of linear odes
with constant coefficients.
> problems with desolve [and ode]. Using desolve I get a useless
> looking solution:
>
> 1
> 2 LAPLACE(-, x, LVAR) SIN(3 y) - 3 y(0) COS(3 y)
> x
> (D46) y(x) = ILT(- ------------------------------------------------,
> 3 LVAR COS(3 y)
>
> LVAR, x)
>
> The actual DE solution is x^2*sin(3y)=constant
>
> I can get close to this [close enough anyway] using ode2: gives
>
> LOG(SIN(3 y))
> (D3) - ------------- = LOG(x) + %C
> 2
The advantage of desolve over ode2 is that desolve can handle odes of
order greater than 2, and also it can handle systems. In all other
cases, ode2 is better, as you can see.
> But is it possible to get something out of desolve that looks OK??
No, this is a job for ode2.
> And ode appears to be dead in the water. No response. Checked
> directories--there is no ode file anywhere. Also doesn't appear to
> be on Maxima web site source share directories. Any clues?
There are a few packages referenced in the Maxima libraries that
don't exist (or no longer exist, or perhaps only existed for
Macsyma); I think ode was one of them.
Hope this helps,
Jay