10.19 problem 19

Internal problem ID [1173]

Book: Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section: Chapter 5 linear second order equations. Section 5.7 Variation of Parameters. Page 262
Problem number: 19.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {\sin \left (x \right ) y^{\prime \prime }+\left (2 \sin \left (x \right )-\cos \left (x \right )\right ) y^{\prime }+\left (\sin \left (x \right )-\cos \left (x \right )\right ) y-{\mathrm e}^{-x}=0} \]

Solution by Maple

Time used: 0.047 (sec). Leaf size: 31

dsolve(sin(x)*diff(y(x),x$2)+(2*sin(x)-cos(x))*diff(y(x),x)+(sin(x)-cos(x))*y(x)=exp(-x),y(x), singsol=all)
 

\[ y \left (x \right ) = {\mathrm e}^{\frac {\pi }{2}-x} c_{2} +\cos \left (x \right ) {\mathrm e}^{-x} c_{1} -\sin \left (x \right ) {\mathrm e}^{-x} \]

Solution by Mathematica

Time used: 0.343 (sec). Leaf size: 52

DSolve[Sin[x]*y''[x]+(2*Sin[x]-Cos[x])*y'[x]+(Sin[x]-Cos[x])*y[x]==Exp[-x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to -\sqrt {\sin ^2(x)} e^{-\arccos (\cos (x))}+(c_2 \cos (x)+c_1) e^{-2 \sqrt {\sin ^2(x)} \csc (x) \cot ^{-1}(\cot (x)+\csc (x))} \\ \end{align*}