29.1.20 problem 19

Internal problem ID [4627]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 19
Date solved : Sunday, March 30, 2025 at 03:31:05 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(y(x),x)+csc(x)+2*y(x)*cot(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\cos \left (x \right )+c_1 \right ) \csc \left (x \right )^{2} \]
Mathematica. Time used: 0.036 (sec). Leaf size: 15
ode=D[y[x],x]+Csc[x]+2*y[x]*Cot[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \csc ^2(x) (\cos (x)+c_1) \]
Sympy. Time used: 0.792 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)/tan(x) + Derivative(y(x), x) + 1/sin(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \cos {\left (x \right )}}{\sin ^{2}{\left (x \right )}} \]