12.10.19 problem 19

Internal problem ID [1823]
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
Date solved : Tuesday, January 28, 2025 at 02:35:54 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} \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} \end{align*}

Solution by Maple

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

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 = -{\mathrm e}^{\arcsin \left (\cos \left (x \right )\right )} \left (\left (\int \csc \left (x \right )^{2} {\mathrm e}^{-\arcsin \left (\cos \left (x \right )\right )-x}d x \right ) \cos \left (x \right )-\cos \left (x \right ) c_1 -\int \cot \left (x \right ) \csc \left (x \right ) {\mathrm e}^{-\arcsin \left (\cos \left (x \right )\right )-x}d x -c_2 \right ) \]

Solution by Mathematica

Time used: 0.330 (sec). Leaf size: 41

DSolve[Sin[x]*D[y[x],{x,2}]+(2*Sin[x]-Cos[x])*D[y[x],x]+(Sin[x]-Cos[x])*y[x]==Exp[-x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\sqrt {\sin ^2(x)} e^{-\arccos (\cos (x))}+c_1 e^{\arcsin (\cos (x))}+c_2 \cos (x) e^{\arcsin (\cos (x))} \]