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

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.809 (sec). Leaf size: 121

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]
 

\[ y(x)\to -\sqrt {\sin ^2(x)} \exp \left (-\arccos (\cos (x))-4 \arctan \left (\frac {\sqrt {\sin ^2(x)}}{\cos (x)+1}\right )+4 \cot ^{-1}\left (\frac {\cos (x)+1}{\sqrt {\sin ^2(x)}}\right )\right )+c_2 \cos (x) \exp \left (2 \left (\cot ^{-1}\left (\frac {\cos (x)+1}{\sqrt {\sin ^2(x)}}\right )-2 \arctan \left (\frac {\sqrt {\sin ^2(x)}}{\cos (x)+1}\right )\right )\right )+c_1 e^{-2 \cot ^{-1}\left (\frac {\cos (x)+1}{\sqrt {\sin ^2(x)}}\right )} \]