# Solving a second-order nonlinear ODE

May I ask for any solutions/ hints to solve the following (general) second-order nonlinear ordinary differential equation?

$$\frac{d^2 f(y)}{d y^2} + \frac{\lambda}{f(y)} = 0$$ for $$\lambda$$ is a constant.

I thought about using the substitution $$h(y) = \frac{1}{f(y)}$$ to obtain $$h\frac{d^2h}{dy^2} - 2\left(\frac{dh}{dy}\right)^2 - \lambda h^4 = 0$$.

EDIT: From the comments, of which I'm very grateful for, I got

$$2\frac{df}{dy} \frac{d^2 f(y)}{d y^2} + 2\lambda \frac{df}{dy}\frac{1}{f(y)} = 0$$ which is equivalent to $$\left(\frac{df}{dy}\right)^2 + 2\lambda ln(f) = c$$ where c is a constant. Therefore

$$f(y) = e^{\frac{1}{2\lambda} \left[c - \left(\frac{df}{dy}\right)^2\right]}$$ which is implicit? Am I able to proceed further?

Thank you.

• Multiply by $2f'(y)$ and integrate. Commented Jul 14, 2021 at 19:56
• Maybe multiply both sides by $f’$ and integrate once? Haven’t tried it myself but it looks promising. Added: Looks like @StartWearingPurple beat me to it! 🙂 Commented Jul 14, 2021 at 19:58
• I get $\left(\frac{df}{dy}\right)^2 + 2\lambda \ln(f) = c$ where c is a constant. Am I able to go further? Commented Jul 14, 2021 at 20:15
• Your equation is now separable: solve for $f',$ then bring all of the $f$ terms to the left-hand side and integrate. Commented Jul 14, 2021 at 20:30

If we subtract and take a square root, we have $$\frac{df}{dy}=\pm\sqrt{c-2\lambda\ln{(f)}}$$ Rearranging, $$\frac{df}{\sqrt{c-2\lambda\ln{(f)}}}=\pm dy$$ which is autonomous and so can be solved in quadratures.
Ironically, the easiest way to see this is that the integrals do admit a further simplification. Let $$u=\sqrt{c-2\lambda\ln{(f)}}\Leftrightarrow f=e^{\frac{c-u^2}{2\lambda}}$$ Then $$df=e^{\frac{c-u^2}{2\lambda}}\cdot\left(-\frac{u\,du}{\lambda}\right)$$ so that $$\pm\lambda\,dy=e^{\frac{c-u^2}{2\lambda}}\,du$$