23.3.151 problem 153

Internal problem ID [5865]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 153
Date solved : Friday, October 03, 2025 at 01:44:47 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} -2 \left (1+\cos \left (x \right )\right ) \sec \left (x \right ) y-\left (2+3 \cos \left (x \right )\right ) \csc \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.197 (sec). Leaf size: 24
ode:=-2*(cos(x)+1)*sec(x)*y(x)-(2+3*cos(x))*csc(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left (\cos \left (x \right )^{2}\right ) \cos \left (x \right ) c_2 +\sin \left (x \right )^{2} c_2 +c_1 \cos \left (x \right ) \]
Mathematica. Time used: 0.172 (sec). Leaf size: 30
ode=-2*(1 + Cos[x])*Sec[x]*y[x] - (2 + 3*Cos[x])*Csc[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_2 \left (-\cos ^2(x)+2 \cos (x) \log (\cos (x))+1\right )-c_1 \cos (x) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*cos(x) - 2)*y(x)/cos(x) - (3*cos(x) + 2)*Derivative(y(x), x)/sin(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-2*y(x)*sin(x) - 2*y(x)*tan(x) + sin(x)*D