20.4.5 problem 2(e)

Internal problem ID [4273]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 11, page 49
Problem number : 2(e)
Date solved : Tuesday, September 30, 2025 at 07:11:39 AM
CAS classification : [_linear]

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