This problem from Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963, Chapter 8. Special second order equations. Lesson 35. Independent variable x absent, Exercise 35.18, page 504.
Maple solves it but Mathematica says
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.
Verified Maple solution is correct.
Any workaround or why Mathematica does not solve it?
ClearAll[y, x]; ode = y''[x] == 2*y[x]*y'[x] ic = {y[0] == 1, y'[0] == 2} DSolve[{ode, ic}, y[x], x] (* {} *) Maple:
ode:=diff(y(x),x$2)=2*y(x)*diff(y(x),x); ic:=y(0)=1,D(y)(0)=2; dsolve([ode,ic]) $$ y \left(x \right) = \tan \left(x +\frac{\pi}{4}\right) $$
Verified solution is correct
sol=y->Function[{x},Tan[x+Pi/4]] {ode,ic}/.sol gives
(* {True, {True, True}} *) Maple has also step-by-step solver. These are the steps it did (can't post Latex, but only screen shot). The problems seems to be in how Maple solved for the constants of integration vs. Mathematica? Because Mathematica has no problem solving the ODE with no IC:
DSolve[ode, y[x], x] $$ \left\{\left\{y(x)\to \sqrt{c_1} \tan \left(\sqrt{c_1} x+\sqrt{c_1} c_2\right)\right\}\right\} $$
Which is the similar but not exactly the same as Maple with no ic (Mathematica could have re-written the constants to get rid of the sqrt in them)
dsolve(ode) $$ y \left(x \right) = \frac{\tan \left(\frac{c_{2} +x}{c_{1}}\right)}{c_{1}} $$
So that is why I think the problem is how to solve for the constants from the general solution. (Mathematica also says that in its message unable to solve the conditions. )
Here are Maple's step-by-step





Reduce[ic /. DSolve[ode, y, x][[1]], {C[1], C[2]}]to observe all branches. $\endgroup$