4.7.2 Example \(x^{\prime \prime }\left ( t\right ) =x\left ( t\right ) -x^{3}\left ( t\right ) \)

This is problem 25 from chapter 8, page 184 from book ”A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015”

Solve

\begin{align*} x^{\prime \prime }\left ( t\right ) & =x\left ( t\right ) -x^{3}\left ( t\right ) \\ x\left ( 0\right ) & =\frac {1}{\sqrt {2}}\\ x^{\prime }\left ( 0\right ) & =0 \end{align*}

Multiplying both sides of the ode by \(x^{\prime }\) gives

\[ x^{\prime }x^{\prime \prime }=\left ( x-x^{3}\right ) x^{\prime }\]

\(\frac {d}{dt}\left ( x^{\prime }\right ) ^{2}=2x^{\prime }x^{\prime \prime }\). Hence the above can be written as

\[ \frac {1}{2}\frac {d}{dt}\left ( x^{\prime }\right ) ^{2}=\left ( x-x^{3}\right ) \frac {dx}{dt}\]

Integrating both sides w.r.t. \(t\) gives

\begin{align*} \frac {1}{2}\int \frac {d}{dt}\left ( x^{\prime }\right ) ^{2}dt & =\int \left ( x-x^{3}\right ) \frac {dx}{dt}dt\\ \frac {1}{2}\int d\left ( x^{\prime }\right ) ^{2} & =\int \left ( x-x^{3}\right ) dx\\ \frac {1}{2}\left ( x^{\prime }\right ) ^{2} & =\frac {x^{2}}{2}-\frac {x^{4}}{4}+c \end{align*}

Where \(c\) is constant of integration. The above simplifies to

\begin{equation} \left ( x^{\prime }\right ) ^{2}=x^{2}-\frac {1}{2}x^{4}+2c \tag {1}\end{equation}

We can now use initial conditions to solve for \(c\). At \(t=0\) using \(x\left ( 0\right ) =\frac {1}{\sqrt {2}},x^{\prime }\left ( 0\right ) =0\) we obtain

\begin{align*} 0 & =\frac {1}{2}-\left ( \frac {1}{2}\right ) \left ( \frac {1}{4}\right ) +2c\\ c & =-\frac {3}{16}\end{align*}

Hence (1) becomes

\begin{equation} \left ( x^{\prime }\right ) ^{2}=x^{2}-\frac {1}{2}x^{4}-\frac {3}{8} \tag {2}\end{equation}

This gives two first order autonomous odes to solve. These are

\begin{align} x^{\prime } & =\sqrt {x^{2}-\frac {1}{2}x^{4}-\frac {3}{8}}\tag {3}\\ x^{\prime } & =-\sqrt {x^{2}-\frac {1}{2}x^{4}-\frac {3}{8}} \tag {4}\end{align}

Starting with ode (3)

\begin{align*} \frac {dx}{dt} & =\sqrt {x^{2}-\frac {1}{2}x^{4}-\frac {3}{8}}\\ \frac {dx}{\sqrt {x^{2}-\frac {1}{2}x^{4}-\frac {3}{8}}} & =dt \end{align*}

Integrating

\begin{equation} \int \frac {dx}{\sqrt {x^{2}-\frac {1}{2}x^{4}-\frac {3}{8}}}=t+c_{1} \tag {5}\end{equation}

This integral gives result in terms of Elliptic function using Maple. The question is, can we leave the above integral unevaluated and solve for \(c_{1}\)?

Let us write the integral above as

\[ \int _{x\left ( 0\right ) }^{x\left ( t\right ) }\frac {d\tau }{\sqrt {\tau ^{2}-\frac {1}{2}\tau ^{4}-\frac {3}{8}}}=t+c_{1}\]

At \(t=0\) the above becomes

\[ \int _{\frac {1}{\sqrt {2}}}^{x\left ( t\right ) }\frac {d\tau }{\sqrt {\tau ^{2}-\frac {1}{2}\tau ^{4}-\frac {3}{8}}}=c_{1}\]

Hence the solution (5) becomes

\[ \int _{x\left ( 0\right ) }^{x\left ( t\right ) }\frac {d\tau }{\sqrt {\tau ^{2}-\frac {1}{2}\tau ^{4}-\frac {3}{8}}}=t+\int _{\frac {1}{\sqrt {2}}}^{x\left ( t\right ) }\frac {d\tau }{\sqrt {\tau ^{2}-\frac {1}{2}\tau ^{4}-\frac {3}{8}}}\]

But this do not check out using Maple odetest. Let us now use the actual antiderivative of the integral produced by Maple 2026, which is

\[ \int \frac {dx}{\sqrt {x^{2}-\frac {1}{2}x^{4}-\frac {3}{8}}}=\frac {2\sqrt {6}\sqrt {9-6x^{2}}\sqrt {1-2x^{2}}\operatorname *{EllipticF}\left ( \frac {x\sqrt {6}}{3},\sqrt {3}\right ) }{3\sqrt {16x^{2}-8x^{4}-6}}\]

Therefore (5) becomes

\begin{align*} \frac {2\sqrt {6}\sqrt {9-6x^{2}}\sqrt {1-2x^{2}}\operatorname *{EllipticF}\left ( \frac {x\sqrt {6}}{3},\sqrt {3}\right ) }{3\sqrt {16x^{2}-8x^{4}-6}} & =t+c_{1}\\ 2\sqrt {6}\sqrt {9-6x^{2}}\sqrt {1-2x^{2}}\operatorname *{EllipticF}\left ( \frac {x\sqrt {6}}{3},\sqrt {3}\right ) & =3\sqrt {16x^{2}-8x^{4}-6}t+c_{1}3\sqrt {16x^{2}-8x^{4}-6}\end{align*}

At \(t=0\), using \(x\left ( 0\right ) =\frac {1}{\sqrt {2}}\) gives

\begin{align*} 2\sqrt {6}\sqrt {9-6\left ( \frac {1}{2}\right ) }\sqrt {1-1}\operatorname *{EllipticF}\left ( \frac {\frac {1}{\sqrt {2}}\sqrt {6}}{3},\sqrt {3}\right ) & =0+c_{1}\left ( 3\sqrt {16x^{2}-8x^{4}-6}\right ) \\ 0 & =c_{1}\left ( 0\right ) \end{align*}

This mean this is valid for any \(c_{1}\). So we are free to choose \(c_{1}\) value. Let us pick \(c_{1}=0\). Hence the solution now becomes

\[ \frac {2\sqrt {6}\sqrt {9-6x^{2}}\sqrt {1-2x^{2}}\operatorname *{EllipticF}\left ( \frac {x\sqrt {6}}{3},\sqrt {3}\right ) }{3\sqrt {16x^{2}-8x^{4}-6}}=t \]

And this verifies OK using Maple 2026. Same approach works for the second ode (3).