2.2.9.3 second order ode can be made integrable

\[\begin {aligned} x^{\prime \prime }+x&=0\\ x \left (0\right ) &= 0\\ x^{\prime }\left (0\right ) &= 1\\ \end {aligned}\]

Entering second order ode can be made integrable solverMultiplying the ode by \(x^{\prime }\) gives

\[ x^{\prime } x^{\prime \prime }+x^{\prime } x = 0 \]

Integrating the above w.r.t \(t\) gives

\begin{align*} \int \left (x^{\prime } x^{\prime \prime }+x^{\prime } x\right )d t &= 0 \\ \frac {{x^{\prime }}^{2}}{2}+\frac {x^{2}}{2} &= c_1 \end{align*}

Using the initial conditions given then we solve for \(c_1\) now and obtain

\begin{align*} c_1 = {\frac {1}{2}} \end{align*}

Hence the ode to solve becomes

\begin{align*} \frac {{x^{\prime }}^{2}}{2}+\frac {x^{2}}{2} = {\frac {1}{2}} \end{align*}

Which is now solved for \(x\).

Entering first order ode dAlembert solverLet \(p=x^{\prime }\) the ode becomes

\begin{align*} \frac {p^{2}}{2}+\frac {x^{2}}{2} = {\frac {1}{2}} \end{align*}

Solving for \(x\) from the above results in

\begin{align*} x &= \sqrt {-p^{2}+1}\tag {1A}\\ x &= -\sqrt {-p^{2}+1}\tag {2A} \end{align*}

This has the form

\begin{align*} x&=t f(p)+g(p)\tag {*} \end{align*}

Where \(f,g\) are functions of \(p=x'(t)\). Each of the above ode’s is dAlembert ode which are now solved.

Solving ode 1A

Taking derivative of (*) w.r.t. \(t\) gives

\begin{align*} p &= f+(t f'+g') \frac {dp}{dt}\\ p-f &= (t f'+g') \frac {dp}{dt}\tag {2} \end{align*}

Comparing the form \(x=t f + g\) to (1A) shows that

\begin{align*} f &= 0\\ g &= \sqrt {-p^{2}+1} \end{align*}

Hence (2) becomes

\begin{align*} p = -\frac {p p^{\prime }\left (t \right )}{\sqrt {-p^{2}+1}}\tag {3} \end{align*}

The singular solution is found by setting \(\frac {dp}{dt}=0\) in the above which gives

\begin{align*} p = 0 \end{align*}

No valid singular solutions found.

The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}}\neq 0\) from eq. (3). This results in

\begin{align*} p^{\prime }\left (t \right ) = -\sqrt {-p \left (t \right )^{2}+1}\tag {4} \end{align*}

This ODE is now solved for \(p \left (t \right )\). No inversion is needed.

Integrating gives

\begin{align*} \int -\frac {1}{\sqrt {-p^{2}+1}}d p &= dt\\ -\arcsin \left (p \right )&= t +c_2 \end{align*}

Solving for \(p\) from above gives

\[ p = \sqrt {-\sin \left (t +c_2 \right )^{2}+1} \]

Substituing the above solution for \(p\) in \(x = \sqrt {-p^{2}+1}\) gives

\[ x = \sqrt {-\sin \left (t +c_2 \right )^{2}+1} \]

Initial condition \(x \left (0\right ) = 0\) is now applied. Applying the initial condition \(x \left (0\right ) = 0\), the solution becomes

\begin{align*} x &= \sqrt {-\cos \left (t \right )^{2}+1} \\ x &= \sqrt {-\cos \left (t \right )^{2}+1} \\ \end{align*}

Solving ode 2A

Taking derivative of (*) w.r.t. \(t\) gives

\begin{align*} p &= f+(t f'+g') \frac {dp}{dt}\\ p-f &= (t f'+g') \frac {dp}{dt}\tag {2} \end{align*}

Comparing the form \(x=t f + g\) to (1A) shows that

\begin{align*} f &= 0\\ g &= -\sqrt {-p^{2}+1} \end{align*}

Hence (2) becomes

\begin{align*} p = \frac {p p^{\prime }\left (t \right )}{\sqrt {-p^{2}+1}}\tag {3} \end{align*}

The singular solution is found by setting \(\frac {dp}{dt}=0\) in the above which gives

\begin{align*} p = 0 \end{align*}

No valid singular solutions found.

The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}}\neq 0\) from eq. (3). This results in

\begin{align*} p^{\prime }\left (t \right ) = \sqrt {-p \left (t \right )^{2}+1}\tag {4} \end{align*}

This ODE is now solved for \(p \left (t \right )\). No inversion is needed.

Integrating gives

\begin{align*} \int \frac {1}{\sqrt {-p^{2}+1}}d p &= dt\\ \arcsin \left (p \right )&= t +c_3 \end{align*}

Solving for \(p\) from above gives

\[ p = -\sqrt {-\sin \left (t +c_3 \right )^{2}+1} \]

Substituing the above solution for \(p\) in \(x = -\sqrt {-p^{2}+1}\) gives

\[ x = -\sqrt {-\sin \left (t +c_3 \right )^{2}+1} \]

Initial condition \(x \left (0\right ) = 0\) is now applied. Applying the initial condition \(x \left (0\right ) = 0\), the solution becomes

\begin{align*} x &= -\sqrt {-\cos \left (t \right )^{2}+1} \\ x &= -\sqrt {-\cos \left (t \right )^{2}+1} \\ \end{align*}
Solutions plot Direction field