29.12.9 problem 328

Internal problem ID [4928]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 12
Problem number : 328
Date solved : Sunday, March 30, 2025 at 04:15:13 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=2*x^2*diff(y(x),x)+x*cot(x)-1+2*x^2*y(x)*cot(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {1}{2 x}+c_1 \csc \left (x \right ) \]
Mathematica. Time used: 0.059 (sec). Leaf size: 18
ode=2 x^2 D[y[x],x]+x Cot[x]-1+2 x^2 y[x] Cot[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {1}{2 x}+c_1 \csc (x) \]
Sympy. Time used: 4.492 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**2*y(x)/tan(x) + 2*x**2*Derivative(y(x), x) + x/tan(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \frac {\log {\left (x \right )}}{2} - \frac {\log {\left (x^{2} \right )}}{4} - \frac {\operatorname {Ci}{\left (x \right )}}{2} + \frac {\int \frac {\sin {\left (x \right )}}{x \tan {\left (x \right )}}\, dx}{2} + \int \frac {y{\left (x \right )} \sin {\left (x \right )}}{\tan {\left (x \right )}}\, dx + \frac {\sin {\left (x \right )}}{2 x} = C_{1} \]