Differential equations?



 see:
http://www.math.utexas.edu/pipermail/maxima/2013/033094.html


 I define function ode1_ic(eq, y, x, x_0, y_0)
for solving first order ode with initial condition.

(%i1) ode1_ic(eq,y,x,x_0,y_0):=block([],
ode2(eq,y,x),
ic1(%%, x_0, y_0),
logcontract(%%),
solve(%%,y)[1])$

 Example 1 y'=y*(1-y), y(0)=1/2.

(%i2) eq:'diff(y,x)=y*(1-y)$
(%i3) ode1_ic(eq,y,x,x=0,y=1/2);
(%o3) y=%e^x/(%e^x+1)

 Example 2  (x^2-1)*y'+2*x*y=0, y(0)=1.

(%i4) eq:(x^2-1)*'diff(y,x)+2*x*y^2=0$
(%i5) ode1_ic(eq,y,x,x=0,y=1);
(%o5) y=1/(log(1-x^2)+1)

 Note.
Maple command
dsolve({eq,y(0)=1},y(x));
return
y(x) = 1/(1+ln(x-1)+ln(x+1)-I*Pi)

best regards

Aleksas D