Trying to obtain an explicit solution of a second order ODE



Hi,
I don't think he needs to use ic2, and the solution given by solve(%,y) 
has failed to give y as a function of x.
You can try giving Maxima a little help:

(%i2) de: 'diff(y,x,2)=-C*'diff(y,x)^2/y$

(%i3) sol: ode2(de,y,x);

(%o3) y*%e^(log(y)*C)/(%k1*C+%k1) = x+%k2

(%i4) ratsubst(y^C, %e^(log(y)*C), sol);

(%o4) y^(C+1)/(%k1*C+%k1) = x+%k2

which would mean that the general solution is of the form:  A y^(C+1) = 
x + B
where A and B are two constants.
Regards,
Jaime


On 04/17/2013 01:51 PM, Rupert Swarbrick wrote:
> deltaquattro at gmail.com writes:
>> 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,
> I think you want the "ic2" function. For example here's the general
> solution to your equation, parameterised by the initial value y0 and
> derivative dy0.
>
> (%i12) assume(C>0)$
>
> (%i13) de: 'diff(y,x,2)=-C*'diff(y,x)^2/y$
>
> (%i14) soln: ode2(de,y,x)$
>
> (%i15) ic2(soln, x=0, y=y0, 'diff(y,x)=dy0);
>                              log(y) C
>                          y %e                   y0
> (%o15)               ------------------- = ----------- + x
>                             C           C   dy0 C + dy0
>                       dy0 y0  C + dy0 y0
> (%i16) first (solve(%, y));
>                               C             C + 1    - log(y) C
> (%o16)          y = (dy0 x y0  (C + 1) + y0     ) %e
>
>
>
> Rupert
>