23.3.11 problem 8(a)

Internal problem ID [4152]
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(a)
Date solved : Monday, January 27, 2025 at 08:40:04 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

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

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