Trying to obtain an explicit solution of a second order ODE



 Problem. Solve  y''=C*(y')^2/y.

 We consider  cases C>1 , C=1 and  solve step-by-step:

(%i1) kill(all)$ reset()$
(%i2) assume(y(x)>0,C>1)$
(%i3) de: diff(y(x),x,2)=C*'diff(y(x),x)^2/y(x)$
(%i4) de/'diff(y(x),x,1);
(%o4) 'diff(y(x),x,2)/'diff(y(x),x,1)=(('diff(y(x),x,1))*C)/y(x)
(%i5) integrate(%,x);
(%o5) log('diff(y(x),x,1))=log(y(x))*C+%c1
(%i6) subst(%c1=log(-C1),%);
(%o6) log('diff(y(x),x,1))=log(-C1)+log(y(x))*C
(%i7) map(exp,%),radcan;
(%o7) 'diff(y(x),x,1)=-y(x)^C*C1
(%i8) de2:%/y(x)^C;
(%o8) 'diff(y(x),x,1)/y(x)^C=-C1
(%i9) integrate(%,x); subst(%c2=-C2,%);
(%o9) y(x)^(1-C)/(1-C)=%c2-x*C1
(%o10) y(x)^(1-C)/(1-C)=-C2-x*C1
(%i11) %*(1-C);
(%o11) y(x)^(1-C)=(1-C)*(-C2-x*C1)

 Solution1.  If C#1, then
(%i12) sol1:%^(1/(1-C));
(%o12) y(x)=(C-1)^(1/(1-C))*(C2+x*C1)^(1/(1-C))

 Test:
(%i13) subst(sol1,de)$
(%i14) ev(%, nouns)$
(%i15) ratsimp(lhs(%)-rhs(%));
(%o15) 0
 Case: C=1
(%i16) de2:ev(de,C=1);
(%o16) 'diff(y(x),x,2)=('diff(y(x),x,1))^2/y(x)
(%i17) de2/'diff(y(x),x,1);
(%o17) 'diff(y(x),x,2)/'diff(y(x),x,1)='diff(y(x),x,1)/y(x)
(%i18) integrate(%,x);
(%o18) log('diff(y(x),x,1))=log(y(x))+%c3
(%i19) subst(%c3=log(C1),%);
(%o19) log('diff(y(x),x,1))=log(C1)+log(y(x))
(%i20) map(exp,%),radcan;
(%o20) 'diff(y(x),x,1)=y(x)*C1
(%i21) de3:%/y(x);
(%o21) 'diff(y(x),x,1)/y(x)=C1
(%i22) integrate(%,x); subst(%c4=log(C2),%);
(%o22) log(y(x))=x*C1+%c4
(%o23) log(y(x))=log(C2)+x*C1

 Solution2.  If C=1, then
(%i24) sol2:map(exp,%);
(%o24) y(x)=%e^(x*C1)*C2

 Test:
(%i25) subst(sol2,de2)$
(%i26) ev(%, nouns)$
(%i27) ratsimp(lhs(%)-rhs(%));
(%o27) 0

 Answer: if C>1,  then  y(x)=(C-1)^(1/(1-C))*(C2+x*C1)^(1/(1-C))
               if C=1,  then  y(x)=C2*exp(x*C1).

 Examine the case C < 1.

 best

Aleksas D


2013/4/17 <deltaquattro at gmail.com>

> Aleksas,
>
> thanks a lot for the answer. There was a small mistake in my ODE: the
> correct one is
>
> de: 'diff(y,x,2)=C*'diff(y,x)^2/y;
>
> where C is positive, as before. I tried following again your steps, and
> this time solve gives me back
>
> (%o5) [y=%k1*y^C*(x*(1-C)+%k2*(1-C))]
>
> This is basically ok: I just wonder why Maxima doesn't divide first and
> second member by y^C. This doesn't seem to be related to the possibility of
> y being 0, since adding
>
> assume(y>0);
>
> doesn't change the result. Anyway, this was enough to check that my manual
> solution was correct (and that the one usually found in papers and books is
> incomplete :) Thanks a lot,
>
> Best Regards
>
> deltaquattro
>
>
>
> 2013/4/17 <deltaquattro at gmail.com>
>
> Hi, all,
>>
>> I have the following ODE:
>>
>> assume(C>0);
>>
>> de: 'diff(y,x,2)=-C*'diff(y,x)^2/y;
>>
>> ode2 solves it easily:
>>
>> ode2(de,y,x);
>>
>> (%o5) (y*%e^(log(y)*C))/(%k1*C+%k1)=x+%k2
>>
>> I would like to get an explicit solution, in order to check my own
>> explicit solution found by hand. How can I do that? Thanks,
>>
>> best regards
>>
>> deltaquattro
>>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ode.wxm
Type: application/octet-stream
Size: 3075 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130417/a7a69ed7/attachment-0001.obj>;