Hello all,
I found perhaps serious bug in ic2:
A:ode2('diff(y,x,2)+y*('diff(y,x)^3)=0,y,x);
ic2(A,x=0,y=1,'diff(y,x)=2);
This returns answer which is not included in the general solution stored in A.
The expanation (probably) is that the code for ic2 below does not check that the
'constants' %k1, %k2 are free of both dependent and independent variable (left
hand sides of xa and ya). I my example we have %k1=(1-y^2)/2 and %k2=(4-3y^2)/6
Should his be fixed.
Yours sincerely
Robert Marik
ic2(soln,xa,ya,dya):=
block([programmode:true,backsubst:true,singsolve:true,temp,%k2,%k1],
noteqn(xa), noteqn(ya), noteqn(dya),
boundtest('%k1,%k1), boundtest('%k2,%k2),
temp: lhs(soln) - rhs(soln),
temp: maplist(lambda([zz], subst(zz,soln)),
solve([subst([xa,ya],soln), subst([dya,xa],
lhs(dya)=-subst(0,lhs(dya),diff(temp,lhs(xa)))
/diff(temp,lhs(ya)))],
[%k1,%k2])),
if length(temp)=1 then return(first(temp)) else return(temp))$