2
$\begingroup$

I am trying to solve the following ODE with DSolve, but can't obtain a special solution (which I know exists simply by looking at the equation: f[x]=1)

a[x_] = f[x] /. 
  DSolve[{m f[x]^(3/2) f'[x] + 2 k f'[x]^2 - 2 k f[x] f''[x] == 0}, f[x], x]
Solve[a[0] == 1, C[1]]

The Solve parts simply gives me empty brackets.

If I include the boundary condition in DSolve I only get the error message "For some branches of the solution, unable to solve the conditions".

I know this is similar to other questions here, but I wasn't able to use the corresponding answers for my problem.

How I can resolve this?

$\endgroup$

2 Answers 2

2
$\begingroup$

The output of DSolve is a list

DSolve[{m f[x]^(3/2) f'[x] + 2 k f'[x]^2 - 2 k f[x] f''[x] == 0}, 
 f[x], x]
{{f[x] -> (
   E^(x C[1] + C[1] C[2]) k^2 C[
    1]^2)/(-1 + E^((x C[1])/2 + (C[1] C[2])/2) m)^2}, {f[x] -> (
   E^(x C[1] + C[1] C[2]) k^2 C[
    1]^2)/(1 + E^((x C[1])/2 + (C[1] C[2])/2) m)^2}}

In order to define functions it is better to use Part like so:

a1[x_] = 
 f[x] /. DSolve[{m f[x]^(3/2) f'[x] + 2 k f'[x]^2 - 2 k f[x] f''[x] ==
       0}, f[x], x][[1]]
a2[x_] = 
 f[x] /. DSolve[{m f[x]^(3/2) f'[x] + 2 k f'[x]^2 - 2 k f[x] f''[x] ==
       0}, f[x], x][[2]]

Now we can move on and ask Mathematica to Solve

Solve[a[0] == 1, C[1]]

and it complains a bit

This system cannot be solved with the methods available to Solve.

We can use assumptions to get

Assuming[k != 0, Solve[(a1[0] /. C[2] -> 0) == 1, C[1]]]

{{C[1] -> (1 - m)/k}, {C[1] -> (-1 + m)/k}}

Without assumptions, further progress can be made with the use of Reduce

Reduce[a1[0] == 1, C[1]]

giving

(-1 + m != 0 && k != 0 && C[2] == 0 && (C[1] == (-1 + m)/k || C[1] == (1 - m)/k)) || (C[ 3] \[Element] Integers && C[2] != 0 && -1 + E^((C[1] C[2])/2) m != 0 && k != 0 && (C[1] == ( m C[2] + 2 k ProductLog[C[3], -((E^(-((m C[2])/(2 k))) C[2])/(2 k))])/( k C[2]) || C[1] == (-m C[2] + 2 k ProductLog[C[3], (E^((m C[2])/(2 k)) C[2])/(2 k)])/( k C[2])))

$\endgroup$
2
$\begingroup$

The following goes some way towards a solution, by using Reduce, and by including all parameters in the solution in the list of variables to be solved for:

sol = DSolve[m f[x]^(3/2) f'[x] + 2 k f'[x]^2 - 2 k f[x] f''[x] == 0, f[x], x]
Reduce[f[x] == 1 /. sol /. x -> 0, {C[1], C[2], k, m}]

(* Out:
C[1] != 0 && (k == -(1/(Sqrt[E^(C[1]*C[2])]*C[1])) || 
   k == 1/(Sqrt[E^(C[1]*C[2])]*C[1])) && m == 0
*)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.