62.38.12 problem Ex 12

Internal problem ID [12952]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter IX, Miscellaneous methods for solving equations of higher order than first. Article 62. Summary. Page 144
Problem number : Ex 12
Date solved : Monday, March 31, 2025 at 07:27:58 AM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

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

Maple. Time used: 0.059 (sec). Leaf size: 39
ode:=sin(x)*diff(diff(y(x),x),x)-cos(x)*diff(y(x),x)+2*sin(x)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left (\cos \left (x \right )+1\right ) c_2 \sin \left (x \right )^{2}-\ln \left (\cos \left (x \right )-1\right ) c_2 \sin \left (x \right )^{2}+c_1 \sin \left (x \right )^{2}+2 \cos \left (x \right ) c_2 \]
Mathematica. Time used: 0.276 (sec). Leaf size: 33
ode=Sin[x]*D[y[x],{x,2}]-Cos[x]*D[y[x],x]+2*Sin[x]*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\sin ^2(x) \left (c_2 \int _1^{\cos (x)}\frac {1}{\left (K[1]^2-1\right )^2}dK[1]+c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)*sin(x) + sin(x)*Derivative(y(x), (x, 2)) - cos(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(2*y(x) + Derivative(y(x), (x, 2)))*tan(x) + Derivative(y(x), x) cannot be solved by the factorable group method