89.26.15 problem 17

Internal problem ID [24882]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 11. Variation of parameters and other methods. Miscellaneous Exercises at page 177
Problem number : 17
Date solved : Thursday, October 02, 2025 at 10:49:02 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=\csc \left (x \right )^{3} \cot \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+y(x) = csc(x)^3*cot(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\cot \left (x \right )^{2}+6 c_1 \right ) \cos \left (x \right )}{6}+\sin \left (x \right ) c_2 \]
Mathematica. Time used: 0.008 (sec). Leaf size: 29
ode=D[y[x],{x,2}]+y[x]== csc(x)^3*cot(x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (x^4-12 x^2+24\right ) \cot \csc +c_1 \cos (x)+c_2 \sin (x) \end{align*}
Sympy. Time used: 0.214 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - cot(x)*csc(x)**3 + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} \sin {\left (x \right )} + \left (C_{1} + \frac {1}{6 \sin ^{2}{\left (x \right )}}\right ) \cos {\left (x \right )} \]