83.49.24 problem Ex 24 page 139

Internal problem ID [19566]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter VIII. Linear equations of second order
Problem number : Ex 24 page 139
Date solved : Monday, March 31, 2025 at 07:33:40 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.085 (sec). Leaf size: 60
ode:=diff(diff(y(x),x),x)+(1-cot(x))*diff(y(x),x)-y(x)*cot(x) = sin(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left (\int \int {\mathrm e}^{-\frac {\pi }{2}+x} \sin \left (x \right )d x \sin \left (x \right )d x {\mathrm e}^{\frac {\pi }{2}}+\left ({\mathrm e}^{\frac {\pi }{2}} \cos \left (x \right )+c_1 \right ) \int {\mathrm e}^{-\frac {\pi }{2}+x} \sin \left (x \right )d x -{\mathrm e}^{\frac {\pi }{2}} c_2 \right ) {\mathrm e}^{-x} \]
Mathematica. Time used: 0.243 (sec). Leaf size: 53
ode=D[y[x],{x,2}]+(1-Cot[x])*D[y[x],x]-y[x]*Cot[x]==Sin[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_2 e^{\arcsin (\cos (x))}+\frac {1}{10} \left (-2 \cos (2 \arcsin (\cos (x)))-\sin (2 \arcsin (\cos (x)))+5 c_1 \cos (x)-5 c_1 \sqrt {\sin ^2(x)}\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - 1/tan(x))*Derivative(y(x), x) - y(x)/tan(x) - sin(x)**2 + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (y(x) + sin(x)**2*tan(x) - tan(x)*Derivative(y(x), (x, 2)))/(tan(x) - 1) cannot be solved by the factorable group method