48.3.1 problem Example 3.29

Internal problem ID [7525]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.5 HIGHER ORDER ODE. Page 181
Problem number : Example 3.29
Date solved : Sunday, March 30, 2025 at 12:13:38 PM
CAS classification : [_Lienard]

\begin{align*} \sin \left (x \right ) u^{\prime \prime }+2 \cos \left (x \right ) u^{\prime }+\sin \left (x \right ) u&=0 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 24
ode:=sin(x)*diff(diff(u(x),x),x)+2*cos(x)*diff(u(x),x)+sin(x)*u(x) = 0; 
dsolve(ode,u(x), singsol=all);
 
\[ u = \csc \left (x \right ) \left (c_1 \sin \left (\sqrt {2}\, x \right )+c_2 \cos \left (\sqrt {2}\, x \right )\right ) \]
Mathematica. Time used: 0.082 (sec). Leaf size: 51
ode=Sin[x]*D[u[x],{x,2}]+2*Cos[x]*D[u[x],x]+Sin[x]*u[x]==0; 
ic={}; 
DSolve[{ode,ic},u[x],x,IncludeSingularSolutions->True]
 
\[ u(x)\to \frac {1}{4} e^{-i \sqrt {2} x} \left (4 c_1-i \sqrt {2} c_2 e^{2 i \sqrt {2} x}\right ) \csc (x) \]
Sympy
from sympy import * 
x = symbols("x") 
u = Function("u") 
ode = Eq(u(x)*sin(x) + sin(x)*Derivative(u(x), (x, 2)) + 2*cos(x)*Derivative(u(x), x),0) 
ics = {} 
dsolve(ode,func=u(x),ics=ics)
 
NotImplementedError : The given ODE (u(x) + Derivative(u(x), (x, 2)))*tan(x)/2 + Derivative(u(x), x) cannot be solved by the factorable group method