# General solution of a non-linear ODE

How to solve (at least symbolically) a second-order non-linear ODE of the form:

$$\dfrac{d^2u}{dt^2} = t^n f(u)$$

where $$n$$ is a real number?

For $$n=0$$, the solution is straightforward. Considering $$\frac{du}{dt} = \dot{u}$$, one finds:

$$t = t_0 \pm \int \left[2 \int f(u) \, du + \text{constant}\right]^{-1/2} \, du$$

But for a general $$n \neq 0$$, how can this be solved?

My thought: Is there any way to reduce it to a first-order non-linear ODE and then somehow solve it?

• Mathematica fails to find a solution for generic $f(u)$ if $n=1,2$ are attempted. There are presumably solvable cases of $f(u)$ but this doesn't bode well for finding a generic approach. Commented Aug 1 at 12:07
• Maybe considering an homogeneous function of degree $n$ could give us some interesting propertins, so consider a function $f$ such that for all $t>0$ we have $f(t\,u)=t^nf(u)$. Commented Aug 1 at 14:07
• For the case $f(u)=u$: $$u(t)=c_{1} \sqrt{t}\cdot I_{\frac{1}{n+2}} \left(\frac{2 t^{\frac{n}{2}+1}}{n+2}\right)+c_{2} \sqrt{t}\cdot K_{\frac{1}{n+2}} \left(\frac{2 t^{\frac{n}{2}+1}}{n+2}\right)$$ $I_n(z)$ is the modified Bessel function of the first kind.\ $K_n(z)$ is the modified Bessel function of the second kind. Commented Aug 1 at 14:23

• For the case $$f(u)=u$$, as written by @gpmath in the comment, we have $$u(t)=c_1\,\sqrt{t}\,\mathrm{I}_{\frac{1}{n + 2}}\left(\frac{2\,t^{\frac{n}{2} + 1}}{n + 2}\right) + c_2\,\sqrt{t}\,\mathrm{K}_{\frac{1}{n+2}}\left(\frac{2\,t^{\frac{n}{2} + 1}}{n + 2}\right)$$ where $$\mathrm{I}_n(z)$$ is the modified Bessel function of the first kind while $$\mathrm{K}_n(z)$$ is the modified Bessel function of the second kind.
• Playing with Matlab, we have that for a general linear function $$f(u)=m\,u+q$$ with $$m,\,q\in\mathbb{R}$$ we get this absolute monstrosity $$u(t)= c_{1}\,\sqrt{t}\,{\mathrm{J}}_{\frac{1}{n+2}}\left(\frac{\sqrt{m}\,t^{\frac{n}{2}+1}\,2{}\mathrm{i}}{n+2}\right)+c_{2}\,\sqrt{t}\,{\mathrm{Y}}_{\frac{1}{n+2}}\left(\frac{\sqrt{m}\,t^{\frac{n}{2}+1}\,2{}\mathrm{i}}{n+2}\right)+\sqrt{t}\,{\mathrm{J}}_{\frac{1}{n+2}}\left(\frac{\sqrt{m}\,t^{\frac{n}{2}+1}\,2{}\mathrm{i}}{n+2}\right)\,\int \frac{q\,t^{n/2}\,{\mathrm{Y}}_{\frac{1}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)\,\sqrt{-\frac{1}{m\,t}}}{{\mathrm{J}}_{\frac{1}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)\,{\mathrm{Y}}_{\frac{n+3}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)-{\mathrm{Y}}_{\frac{1}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)\,{\mathrm{J}}_{\frac{n+3}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)} \,d t-\sqrt{t}\,{\mathrm{Y}}_{\frac{1}{n+2}}\left(\frac{\sqrt{m}\,t^{\frac{n}{2}+1}\,2{}\mathrm{i}}{n+2}\right)\,\int \frac{q\,t^{n/2}\,{\mathrm{J}}_{\frac{1}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)\,\sqrt{-\frac{1}{m\,t}}}{{\mathrm{J}}_{\frac{1}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)\,{\mathrm{Y}}_{\frac{n+3}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)-{\mathrm{Y}}_{\frac{1}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)\,{\mathrm{J}}_{\frac{n+3}{n+2}}\left(\frac{2\,\sqrt{-m}\,t^{\frac{n}{2}+1}}{n+2}\right)} \,d t$$ where $$\mathrm{J}_n(z)$$ is the Bessel function of the first kind while $$\mathrm{Y}_n(z)$$ is the Bessel function of the second kind.
• Interestingly, Matlab is not able to solve this ode for $$f(u)=\sin(u),\,f(u)=\cos(u),\,f(u)=\arctan(u),\,f(u)=u^2,\,f(u)=e^u,\,f(u)=\sinh(u),\,f(u)=\cosh(u),\,f(u)=\ln(u),\,f(u)=\sqrt{u^2}$$
• If $$f(u)=u'$$ $$u(t)=c_{1}+\frac{c_{2}\,{\left(-\frac{t^{n+1}}{n+1}\right)}^{\frac{n}{n+1}}\,\left(n+1\right)\,\Gamma \left(1-\frac{n}{n+1},-\frac{t^{n+1}}{n+1}\right)}{{\left(t^{n+1}\right)}^{\frac{n}{n+1}}}$$ where $$\Gamma(s,z)$$ is the incomplete Gamma function.
• I am starting to think that the equation has solution only if $f(u)$ is linear. Yet, i am really far away to prove it. Commented Aug 2 at 7:33