Solving second order ODE:Numerical and Analytical-Help

48 Views Asked by At

$$\frac{d^2x}{dt^2} - a^2x + \frac{k}{x^2} = 0$$ Can anyone help me with solving this ODE ?

What type of ODE is this? Is there a general solution for this? If not, please give me some help on solving this numerically.

Thank you

1

There are 1 best solutions below

0
On BEST ANSWER

$$\frac{d^2x}{dt^2} - a^2x + \frac{k}{x^2} = 0$$ $$2\frac{d^2x}{dt^2}\frac{dx}{dt} - 2a^2x\frac{dx}{dt} + 2\frac{k}{x^2}\frac{dx}{dt} = 0$$ $$\left(\frac{dx}{dt}\right)^2-a^2x^2-\frac{2k}{x}=c_1$$ In the particular case $c_1=0$ it is not very difficult to solve the ODE.

In the general case : $$\frac{dx}{dt}=\pm \sqrt{a^2x^2+\frac{2k}{x}+c_1}$$ $$t=\pm\int \frac{dx}{\sqrt{a^2x^2+\frac{2k}{x}+c_1}}+c_2$$ $$t=\pm\int \frac{x\:dx}{\sqrt{a^2x^4+2kx+c_1x^2}}+c_2$$ One have to solve the equation : $\quad a^2x^4+2kx+c_1x^2=0\quad$ for $x$.

This is analytically possible. Of course, the roots namely $0$ , $r_1$ , $r_2$ and $r_3$ are ugly, but nevertheless can be explicitly written. So, now $r_1$ , $r_2$ and $r_3$ are considered as known. $$t=\pm\int \frac{x\:dx}{\sqrt{x(x-r_1)(x-r_2)(x-r_3)}}+c_2$$ The integral can be expressed in terms of elliptic functions. Since I am a bit lazy, I let WolframAlpha do the job for me. After a few simplifications :

enter image description here

The solution of the ODE is obtained on the inverse form : $\quad t(x)$.

The inverse function would give $x(t)$. But, the explicit form cannot be derived in terms of standard functions. Thus the numerical calculus is required.

It should be simpler to use numerical calculus directly to solve the ODE instead of the above analytic way. On this subject, the literature is extensive. https://en.wikipedia.org/wiki/Numerical_methods_for_ordinary_differential_equations