2.3.26 Problem 26

2.3.26.1 second order ode missing x
2.3.26.2 Solved by factoring the differential equation
2.3.26.3 Maple
2.3.26.4 Mathematica
2.3.26.5 Sympy

Internal problem ID [10158]
Book : Own collection of miscellaneous problems
Section : section 3.0
Problem number : 26
Date solved : Monday, December 29, 2025 at 09:46:49 PM
CAS classification : [[_2nd_order, _missing_x], _Liouville, [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

2.3.26.1 second order ode missing x

0.694 (sec)

\begin{align*} y^{\prime \prime }+\sin \left (y\right ) {y^{\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 ) \left (\frac {d}{d y}p \left (y \right )\right )+\sin \left (y \right ) p \left (y \right )^{2} = 0 \end{align*}

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

2.3.26.2 Solved by factoring the differential equation

Time used: 0.183 (sec)

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

Therefore we need to solve the following equations

\begin{align*} \tag{1} p &= 0 \\ \tag{2} \sin \left (y \right ) p+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(y)p &= p(y) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(y) &=\sin \left (y \right )\\ p(y) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dy}}\\ &= {\mathrm e}^{\int \sin \left (y \right )d y}\\ &= {\mathrm e}^{-\cos \left (y \right )} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}y}} \mu p &= 0 \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}y}} \left (p \,{\mathrm e}^{-\cos \left (y \right )}\right ) &= 0 \end{align*}

Integrating gives

\begin{align*} p \,{\mathrm e}^{-\cos \left (y \right )}&= \int {0 \,dy} + c_1 \\ &=c_1 \end{align*}

Dividing throughout by the integrating factor \({\mathrm e}^{-\cos \left (y \right )}\) gives the final solution

\[ p = {\mathrm e}^{\cos \left (y \right )} c_1 \]
Simplifying the above gives
\begin{align*} p &= {\mathrm e}^{\cos \left (y \right )} c_1 \\ \end{align*}

Summary of solutions found

\begin{align*} p &= 0 \\ p &= {\mathrm e}^{\cos \left (y \right )} c_1 \\ \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_2 \\ y &= c_2 \end{align*}

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

\begin{align*} y^{\prime } = {\mathrm e}^{\cos \left (y\right )} c_1 \end{align*}

Entering first order ode autonomous solverUnable to integrate (or intergal too complicated), and since no initial conditions are given, then the result can be written as

\[ \int _{}^{y}\frac {{\mathrm e}^{-\cos \left (\tau \right )}}{c_1}d \tau = x +c_3 \]

Summary of solutions found

\begin{align*} \int _{}^{y}\frac {{\mathrm e}^{-\cos \left (\tau \right )}}{c_1}d \tau &= x +c_3 \\ y &= c_2 \\ \end{align*}
2.3.26.3 Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+sin(y(x))*diff(y(x),x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \int _{}^{y}{\mathrm e}^{-\cos \left (\textit {\_a} \right )}d \textit {\_a} -c_1 x -c_2 = 0 \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
<- 2nd_order Liouville successful
 
2.3.26.4 Mathematica. Time used: 0.154 (sec). Leaf size: 129
ode=D[y[x],{x,2}]+y[x]*Sin[y[x]](D[y[x],x])^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {\exp \left (-\int _1^{K[2]}-K[1] \sin (K[1])dK[1]\right )}{c_1}dK[2]\&\right ][x+c_2]\\ y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}-\frac {\exp \left (-\int _1^{K[2]}-K[1] \sin (K[1])dK[1]\right )}{c_1}dK[2]\&\right ][x+c_2]\\ y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {\exp \left (-\int _1^{K[2]}-K[1] \sin (K[1])dK[1]\right )}{c_1}dK[2]\&\right ][x+c_2] \end{align*}
2.3.26.5 Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(y(x))*Derivative(y(x), x)**2 + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -sqrt(-Derivative(y(x), (x, 2))/sin(y(x))) + Derivative(y(x), x) cannot be solved by the factorable group method