Alasdair McAndrew <amca01 <at> gmail.com> writes:
>
>
>
> If I want to solve the ivp
> y' = y(1-y), y(0)=1/2
> (a logistic equation), I can use either
ic1(ode2('diff(y,x)=y*(1-y),y,x),x=0,y=1/2);or
ic1(contrib_ode('diff(y,x)=y*(1-y),y,x),x=0,y=1/2);
>
> both of which give me as a solution
>
> log(y)-log(y-1) = x - log(2) - log(-1/2)
>
> instead of
>
> y = exp(x)/(exp(x)+1).
>
> I can obtain this solution by some fiddling with
Maxima's output, but is there any way of
obtaining the "correct" solution directly?
>
> Thanks,Alasdair
>
>
>
>
> -- Blog: http://amca01.wordpress.comWeb:? http://sites.google.com/site/amca01/
> Facebook: http://www.facebook.com/alasdair.mcandrew
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima <at> math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
Here is what I did:
deq:'diff(y,x)=y*(1-y);
sol:ode2(deq, y, x);
sol:ic1(sol, x=0, y=1/2);
logcontract(sol);
solve(%, y);
- Michael