this note explores the use of to_poly_solve on
the implicit solution from ode2.
=========================
On 16 May 2009, Edwin Woollett wrote
---------------------------------------------
The second ode2 example in the manual is a second
order nonlinear ode in which a particular solution
is chosen so that at x = 0, y = 0, and dydx = 2.
The implicit solution for y as a function of x
is 3*y - 2*y^3 = 6*x , or y * (3 - 2*y^2) = 6*x
which indeed has one solution which is zero
when x = 0.
The first derivative of this implicit solution gives
dydx = 2/(1 - 2*y^2), which says dydx = 2
when y = 0.
But when I ask solve for explicit solutions
( exsoln below ), the first returned solution
has y1(0) = 0, dy1dx(0) = -1,
and the third returned solution has
y3(0) = sqrt(3/2), dy3dx(0) = 2.
So how do we recover an explicit solution
which agrees with that returned by ic2?
(ie which has y(0) = 0 and dydx(0) = 2)?
----------------------------------------------------------
Since to_poly_solve uses solve, we get the same
results, but in a different order.
First, review *solve* output at x = 0:
y y'
1 0 -1
2 -sqrt(3/2) -1
3 sqrt(3/2) 2
Next, to-poly-solve results at x=0:
y y'
1 sqrt(3/2) 2
2 0 -1
3 -sqrt(3/2) -1
---------------------------------
(%i1) display2d:false$
(%i2) load(to_poly_solver);
Loading maxima-grobner $Revision: 1.5 $ $Date: 2008/05/05 08:47:28 $
Warning - you are redefining the Maxima function prog1
Warning - you are redefining the Maxima function symbolcheck
Warning - you are redefining the Maxima function push
Warning - you are redefining the Maxima function pop
Warning - you are redefining the Maxima function tr_ev
(%o2)
"C:/PROGRA~1/MAXIMA~3.1/share/maxima/5.18.1/share/contrib/to_poly_solver.mac"
(%i3) eqn : 3*y - 2*y^3 = 6*x;
(%o3) 3*y-2*y^3 = 6*x
(%i4) exsoln :
(to_poly_solve ( eqn, y), flatten ( args(%%)) , map('rhs,%%))$
(%i5) rectform( subst ( x=0, exsoln) );
(%o5) [ sqrt(3)/sqrt(2), 0, -2^-(1/2)*sqrt(3)]
(%i6) dexsoln : diff ( exsoln, x )$
(%i7) rectform( subst ( x=0, dexsoln ) );
(%o7) [ 2, -1, -1 ]
-------------------------------------
Thus solve => order (a, b, c ) in list of solutions, and
to_poly_solve => order (c, a, b ) in list of solutions.
It would be easier to compare these two solvers if they
both produced the same order of solutions.
----------------------------------------------------
my question remains:
"So how do we recover an explicit solution
which agrees with that returned by ic2?
(ie which has y(0) = 0 and dydx(0) = 2)?"
Ted Woollett
win xp, 5.18.1