# Second order nonlinear differential equation $x''+Hx =A(1-J/(2x^2))$

I have arrived at a differential equation and I need to solve for $x$. $$\frac{\mathrm{d}^2x}{\mathrm{d}E^2}+Hx =A\left(1-\frac{J}{2x^2}\right)$$ where $H$, $A$, and $J$ are constants.

I know that I can use elliptic integrals, but I need some help with the integration steps from here on.

• If the OP is still interested in this Question, as the recent edit seems to suggest, perhaps an explanation of the domain for $E$ could be added to the body of the Question. Jul 6, 2015 at 13:40

$d^2x \over dE^2$+$Hx$ =$a$($1$+$J\over x^4$ -$1 \over {2x^2}$)

$\frac{dx}{dE}=\frac{1}{\frac{dE}{dx}}$

$\frac{d^2 x}{dE^2}=\frac{d}{dx}\left(\frac{dx}{dE}\right)\frac{dx}{dE} = -\frac{\frac{d^2E}{dx^2}}{\left(\frac{dE}{dx}\right)^2}\frac{dx}{dE} = -\frac{\frac{d^2E}{dx^2}}{\left(\frac{dE}{dx}\right)^3}$

$-\frac{\frac{d^2E}{dx^2}}{\left(\frac{dE}{dx}\right)^3}=-Hx+a\left(1+\frac{J}{x^4}-\frac{1}{2x^2}\right)$

After integration : $\frac{1}{2\left(\frac{dE}{dx}\right)^2}=-\frac{H}{2}x^2+ax-a\frac{J}{3x^3}+a\frac{1}{2x}$+constant.

$\frac{dE}{dx}=\frac{1}{\sqrt{-Hx^2+ax-a\frac{2J}{3x^3}+a\frac{1}{x}+c_1}}$

$$E(x)=\int \frac{dx}{\sqrt{-Hx^2+ax-a\frac{2J}{3x^3}+a\frac{1}{x}+c_1}}$$ There is no closed form for this integral. So, further calculus must be numerical.

• I see that the ODE has been modified : $\frac{1}{2x^2}$ disappeared. But this doesn't change my conclusion (suppress the corresponding term in the final integral). My conclusion would change a lot if the term with $\frac{J}{x^4}$ was suppressed and the term $\frac{1}{2x^2}$ not suppressed. Jul 6, 2015 at 14:38
• Actually the term with $x^{-4}$ has disappeared, leaving only $J/2x^2$. Jul 6, 2015 at 14:41
• Since the topic is noted "on hold" and so could be removed, I will give no more answer. Jul 6, 2015 at 14:43
• Actually there are currently three votes to reopen, but I take your point. Jul 6, 2015 at 14:44

Hint

Solve the equation with the RHS equal to zero and then use the variation of parameters method.

https://en.m.wikipedia.org/wiki/Variation_of_parameters

• @ mathcounterexamples.net : Did you notice that the right term is not function of the variable $E$ , but involves the unknown function $x$. So, the variation of parameters method is not valid. The ODE is not a linear ODE. Do not expect to solve a non-linear ODE with the method of adding a particular solution to the solution of the homogeneous ODE. Jul 2, 2015 at 8:48
• No I didn't. Sorry for that! Jul 4, 2015 at 11:54
• Don't be sorry, that was misleading. At first sight I was ready to answer just like you. Fortunately, I saw the trap. Jul 4, 2015 at 13:51