23.3.14 problem 8(d)

Internal problem ID [4155]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 4. The general linear differential equation of order n. Exercises at page 63
Problem number : 8(d)
Date solved : Monday, January 27, 2025 at 08:40:51 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&={\mathrm e}^{x}-2 \,{\mathrm e}^{2 x}+\sin \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 44

dsolve(diff(y(x),x$2)+3*diff(y(x),x)+2*y(x)=exp(x)-2*exp(2*x)+sin(x),y(x), singsol=all)
 
\[ y \left (x \right ) = -\frac {\left (\frac {3 \left (3 \cos \left (x \right )-\sin \left (x \right )\right ) {\mathrm e}^{2 x}}{5}-6 c_{2} {\mathrm e}^{x}+{\mathrm e}^{4 x}+6 c_{1} -{\mathrm e}^{3 x}\right ) {\mathrm e}^{-2 x}}{6} \]

Solution by Mathematica

Time used: 0.313 (sec). Leaf size: 45

DSolve[D[y[x],{x,2}]+3*D[y[x],x]+2*y[x]==Exp[x]-2*Exp[2*x]+Sin[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to c_1 e^{-2 x}+c_2 e^{-x}+\frac {1}{30} \left (-5 e^x \left (e^x-1\right )+3 \sin (x)-9 \cos (x)\right ) \]