23.3.72 problem 74

Internal problem ID [5786]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 74
Date solved : Tuesday, September 30, 2025 at 02:03:12 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} \csc \left (a \right )^{2} y-2 \tan \left (a \right ) y^{\prime }+y^{\prime \prime }&={\mathrm e}^{x \tan \left (a \right )} x^{2} \end{align*}
Maple. Time used: 0.130 (sec). Leaf size: 133
ode:=csc(a)^2*y(x)-2*tan(a)*diff(y(x),x)+diff(diff(y(x),x),x) = exp(x*tan(a))*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{x \tan \left (a \right )} \left (c_2 \left (\tan \left (a \right )^{4}-2 \sec \left (a \right )^{2}+\csc \left (a \right )^{4}\right ) {\mathrm e}^{-\csc \left (a \right ) \sec \left (a \right )^{2} \sqrt {\cos \left (a \right )^{6}-3 \cos \left (a \right )^{4}+\cos \left (a \right )^{2}}\, x}+c_1 \left (\tan \left (a \right )^{4}-2 \sec \left (a \right )^{2}+\csc \left (a \right )^{4}\right ) {\mathrm e}^{\csc \left (a \right ) \sec \left (a \right )^{2} \sqrt {\cos \left (a \right )^{6}-3 \cos \left (a \right )^{4}+\cos \left (a \right )^{2}}\, x}+\csc \left (a \right )^{2} x^{2}-\tan \left (a \right )^{2} x^{2}-2\right )}{\tan \left (a \right )^{4}-2 \sec \left (a \right )^{2}+\csc \left (a \right )^{4}} \]
Mathematica. Time used: 0.255 (sec). Leaf size: 97
ode=Csc[a]^2*y[x] - 2*Tan[a]*D[y[x],x] + D[y[x],{x,2}] == E^(x*Tan[a])*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{x \tan (a)} \left (-x^2 \tan ^2(a)+x^2 \csc ^2(a)-2\right )}{\left (\csc ^2(a)-\tan ^2(a)\right )^2}+c_1 e^{x \left (\tan (a)-\sqrt {\tan ^2(a)-\csc ^2(a)}\right )}+c_2 e^{x \left (\tan (a)+\sqrt {\tan ^2(a)-\csc ^2(a)}\right )} \end{align*}
Sympy. Time used: 0.485 (sec). Leaf size: 134
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-x**2*exp(x*tan(a)) + y(x)/sin(a)**2 - 2*tan(a)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x \left (- \frac {\sqrt {\left (\frac {\sin ^{4}{\left (a \right )}}{\cos ^{2}{\left (a \right )}} - 1\right ) \sin ^{2}{\left (a \right )}}}{\sin ^{2}{\left (a \right )}} + \tan {\left (a \right )}\right )} + C_{2} e^{x \left (\frac {\sqrt {\left (\frac {\sin ^{4}{\left (a \right )}}{\cos ^{2}{\left (a \right )}} - 1\right ) \sin ^{2}{\left (a \right )}}}{\sin ^{2}{\left (a \right )}} + \tan {\left (a \right )}\right )} - \frac {x^{2} e^{x \tan {\left (a \right )}} \sin ^{2}{\left (a \right )}}{\sin ^{2}{\left (a \right )} \tan ^{2}{\left (a \right )} - 1} - \frac {2 e^{x \tan {\left (a \right )}} \sin ^{4}{\left (a \right )}}{\sin ^{4}{\left (a \right )} \tan ^{4}{\left (a \right )} - 2 \sin ^{2}{\left (a \right )} \tan ^{2}{\left (a \right )} + 1} \]