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]]

Solve \begin {gather*} \boxed {\sin \relax (x ) y^{\prime \prime }+\left (2 \sin \relax (x )-\cos \relax (x )\right ) y^{\prime }+\left (\sin \relax (x )-\cos \relax (x )\right ) y-{\mathrm e}^{-x}=0} \end {gather*}

Solution by Maple

Time used: 0.078 (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 \relax (x ) = {\mathrm e}^{\frac {\pi }{2}-x} c_{2}+{\mathrm e}^{-x} \cos \relax (x ) c_{1}-{\mathrm e}^{-x} \sin \relax (x ) \]

Solution by Mathematica

Time used: 0.204 (sec). Leaf size: 36

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 e^{\text {ArcSin}(\cos (x))} \left (-e^{-\pi /2} \sqrt {\sin ^2(x)}+c_2 \cos (x)+c_1\right ) \\ \end{align*}