2.1.2 Problem 2

2.1.2.1 second order ode missing x
2.1.2.2 Solved by factoring the differential equation
2.1.2.3 SSolved using second order ode arccos transformation
2.1.2.4 Solved by factoring the differential equation
2.1.2.5 Maple
2.1.2.6 Mathematica
2.1.2.7 Sympy

Internal problem ID [10361]
Book : Second order enumerated odes
Section : section 1
Problem number : 2
Date solved : Monday, December 08, 2025 at 08:06:47 PM
CAS classification : [[_2nd_order, _quadrature]]

2.1.2.1 second order ode missing x

0.345 (sec)

\begin{align*} {y^{\prime \prime }}^{2}&=0 \\ \end{align*}
Entering second order ode missing \(x\) solverThis is missing independent variable second order ode. Solved by reduction of order by using substitution which makes the dependent variable \(y\) an independent variable. Using
\begin{align*} y' &= p \end{align*}

Then

\begin{align*} y'' &= \frac {dp}{dx}\\ &= \frac {dp}{dy}\frac {dy}{dx}\\ &= p \frac {dp}{dy} \end{align*}

Hence the ode becomes

\begin{align*} p \left (y \right )^{2} \left (\frac {d}{d y}p \left (y \right )\right )^{2} = 0 \end{align*}

Which is now solved as first order ode for \(p(y)\).

2.1.2.2 Solved by factoring the differential equation

Time used: 0.003 (sec)

\begin{align*} p^{2} {p^{\prime }}^{2}&=0 \\ \end{align*}
Writing the ode as
\begin{align*} \left (p^{2}\right )\left ({p^{\prime }}^{2}\right )&=0 \end{align*}

Therefore we need to solve the following equations

\begin{align*} \tag{1} p^{2} &= 0 \\ \tag{2} {p^{\prime }}^{2} &= 0 \\ \end{align*}
Now each of the above equations is solved in turn.

Solving equation (1)

Entering zero order ode solverSolving for \(p\) from

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

Solving gives

\begin{align*} p &= 0 \\ \end{align*}
Solving equation (2)

Unknown ode type.

Summary of solutions found

\begin{align*} p &= 0 \\ \end{align*}
For solution (1) found earlier, since \(p=y^{\prime }\) then we now have a new first order ode to solve which is
\begin{align*} y^{\prime } = 0 \end{align*}

Entering first order ode quadrature solverSince the ode has the form \(y^{\prime }=f(x)\), then we only need to integrate \(f(x)\).

\begin{align*} \int {dy} &= \int {0\, dx} + c_3 \\ y &= c_3 \end{align*}

Summary of solutions found

\begin{align*} y &= c_3 \\ \end{align*}
2.1.2.3 SSolved using second order ode arccos transformation

2.084 (sec)

\begin{align*} {y^{\prime \prime }}^{2}&=0 \\ \end{align*}

Applying change of variable \(x = \arccos \left (\tau \right )\) to the above ode results in the following new ode

\[ {\left (\left (\tau ^{2}-1\right ) \left (\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )\right )+\left (\frac {d}{d \tau }y \left (\tau \right )\right ) \tau \right )}^{2} = 0 \]
Which is now solved for \(y \left (\tau \right )\). Entering second order ode flip role solverreversing the roles of the dependent and independent variables, the ode becomes
\begin{align*} \frac {d^{2}}{d y^{2}}\tau \left (y \right ) = \frac {\left (\frac {d}{d y}\tau \left (y \right )\right )^{2} \tau \left (y \right )}{\tau \left (y \right )^{2}-1} \end{align*}

Which is now solved for \(\tau \left (y \right )\) instead for \(y \left (\tau \right )\) Entering second order ode missing \(x\) solverThis is missing independent variable second order ode. Solved by reduction of order by using substitution which makes the dependent variable \(\tau \) an independent variable. Using

\begin{align*} \tau ' &= p \end{align*}

Then

\begin{align*} \tau '' &= \frac {dp}{dy}\\ &= \frac {dp}{d\tau }\frac {d\tau }{dy}\\ &= p \frac {dp}{d\tau } \end{align*}

Hence the ode becomes

\begin{align*} p \left (\tau \right ) \left (\frac {d}{d \tau }p \left (\tau \right )\right ) = \frac {p \left (\tau \right )^{2} \tau }{\tau ^{2}-1} \end{align*}

Which is now solved as first order ode for \(p(\tau )\).

2.1.2.4 Solved by factoring the differential equation

Time used: 0.084 (sec)

\begin{align*} p p^{\prime }&=\frac {p^{2} \tau }{\tau ^{2}-1} \\ \end{align*}
Writing the ode as
\begin{align*} \left (p\right )\left (-p^{\prime } \tau ^{2}+p \tau +p^{\prime }\right )&=0 \end{align*}

Therefore we need to solve the following equations

\begin{align*} \tag{1} p &= 0 \\ \tag{2} -p^{\prime } \tau ^{2}+p \tau +p^{\prime } &= 0 \\ \end{align*}
Now each of the above equations is solved in turn.

Solving equation (1)

Entering zero order ode solverSolving for \(p\) from

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

Solving gives

\begin{align*} p &= 0 \\ \end{align*}
Solving equation (2)

Entering first order ode linear solverIn canonical form a linear first order is

\begin{align*} p^{\prime } + q(\tau )p &= p(\tau ) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(\tau ) &=-\frac {\tau }{\tau ^{2}-1}\\ p(\tau ) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,d\tau }}\\ &= {\mathrm e}^{\int -\frac {\tau }{\tau ^{2}-1}d \tau }\\ &= \frac {1}{\sqrt {\tau ^{2}-1}} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\tau }} \mu p &= 0 \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\tau }} \left (\frac {p}{\sqrt {\tau ^{2}-1}}\right ) &= 0 \end{align*}

Integrating gives

\begin{align*} \frac {p}{\sqrt {\tau ^{2}-1}}&= \int {0 \,d\tau } + c_3 \\ &=c_3 \end{align*}

Dividing throughout by the integrating factor \(\frac {1}{\sqrt {\tau ^{2}-1}}\) gives the final solution

\[ p = \sqrt {\tau ^{2}-1}\, c_3 \]

Summary of solutions found

\begin{align*} p &= 0 \\ p &= \sqrt {\tau ^{2}-1}\, c_3 \\ \end{align*}
For solution (1) found earlier, since \(p=\tau ^{\prime }\) then we now have a new first order ode to solve which is
\begin{align*} \tau ^{\prime } = 0 \end{align*}

Entering first order ode quadrature solverSince the ode has the form \(\tau ^{\prime }=f(y)\), then we only need to integrate \(f(y)\).

\begin{align*} \int {d\tau } &= \int {0\, dy} + c_4 \\ \tau &= c_4 \end{align*}

For solution (2) found earlier, since \(p=\tau ^{\prime }\) then we now have a new first order ode to solve which is

\begin{align*} \tau ^{\prime } = \sqrt {\tau ^{2}-1}\, c_3 \end{align*}

Entering first order ode autonomous solverIntegrating gives

\begin{align*} \int \frac {1}{\sqrt {\tau ^{2}-1}\, c_3}d \tau &= dy\\ \frac {\ln \left (\tau +\sqrt {\tau ^{2}-1}\right )}{c_3}&= y +c_5 \end{align*}

Singular solutions are found by solving

\begin{align*} \sqrt {\tau ^{2}-1}\, c_3&= 0 \end{align*}

for \(\tau \). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} \tau = -1\\ \tau = 1 \end{align*}

Solving for \(\tau \) gives

\begin{align*} \tau &= -1 \\ \tau &= 1 \\ \tau &= \frac {\left ({\mathrm e}^{2 c_5 c_3 +2 y c_3}+1\right ) {\mathrm e}^{-c_5 c_3 -y c_3}}{2} \\ \end{align*}
Now that the reversed roles ode was solved, we will change back to the original roles. This results in the above solution becoming the following.
\begin{align*} \tau &= \frac {\left ({\mathrm e}^{2 c_5 c_3 +2 y c_3}+1\right ) {\mathrm e}^{-c_5 c_3 -y c_3}}{2} \\ \end{align*}
Solving for \(y\) from the above solution(s) gives (after possible removing of solutions that do not verify)
\begin{align*} y&=\frac {-c_5 c_3 +\ln \left (\tau -\sqrt {\tau ^{2}-1}\right )}{c_3}\\ y&=\frac {-c_5 c_3 +\ln \left (\tau +\sqrt {\tau ^{2}-1}\right )}{c_3} \end{align*}

Applying change of variable \(\tau = \cos \left (x \right )\) to the solutions above gives

\begin{align*} y \left (x \right ) &= \frac {-c_5 c_3 +\ln \left (\cos \left (x \right )-\sqrt {\cos \left (x \right )^{2}-1}\right )}{c_3} \\ y \left (x \right ) &= \frac {-c_5 c_3 +\ln \left (\cos \left (x \right )+\sqrt {\cos \left (x \right )^{2}-1}\right )}{c_3} \\ \end{align*}
2.1.2.5 Maple. Time used: 0.004 (sec). Leaf size: 9
ode:=diff(diff(y(x),x),x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 x +c_2 \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
<- quadrature successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )^{2}=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=0 \\ \bullet & {} & \textrm {Characteristic polynomial of ODE}\hspace {3pt} \\ {} & {} & r^{2}=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {0\pm \left (\sqrt {0}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =0 \\ \bullet & {} & \textrm {1st solution of the ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (x \right )=1 \\ \bullet & {} & \textrm {Repeated root, multiply}\hspace {3pt} y_{1}\left (x \right )\hspace {3pt}\textrm {by}\hspace {3pt} x \hspace {3pt}\textrm {to ensure linear independence}\hspace {3pt} \\ {} & {} & y_{2}\left (x \right )=x \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y \left (x \right )=\mathit {C1} y_{1}\left (x \right )+\mathit {C2} y_{2}\left (x \right ) \\ \bullet & {} & \textrm {Substitute in solutions}\hspace {3pt} \\ {} & {} & y \left (x \right )=\mathit {C2} x +\mathit {C1} \end {array} \]
2.1.2.6 Mathematica. Time used: 0.002 (sec). Leaf size: 12
ode=(D[y[x],{x,2}])^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_2 x+c_1 \end{align*}
2.1.2.7 Sympy. Time used: 0.015 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), (x, 2))**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} x \]