88.19.1 problem 1

Internal problem ID [24129]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 5. Special Techniques for Linear Equations. Exercises at page 139
Problem number : 1
Date solved : Thursday, October 02, 2025 at 10:00:04 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y+2 y^{\prime }+y^{\prime \prime }&={\mathrm e}^{3 x} \sin \left (3 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 32
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+y(x) = exp(3*x)*sin(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 x +c_2 \right ) {\mathrm e}^{-x}-\frac {24 \left (\cos \left (3 x \right )-\frac {7 \sin \left (3 x \right )}{24}\right ) {\mathrm e}^{3 x}}{625} \]
Mathematica. Time used: 0.104 (sec). Leaf size: 45
ode=D[y[x],{x,2}]+2*D[y[x],{x,1}]+y[x]==Exp[3*x]*Sin[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 e^{-x}+c_2 e^{-x} x+\frac {1}{625} e^{3 x} (7 \sin (3 x)-24 \cos (3 x)) \end{align*}
Sympy. Time used: 0.197 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - exp(3*x)*sin(3*x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{2} x\right ) e^{- x} + \frac {\left (7 \sin {\left (3 x \right )} - 24 \cos {\left (3 x \right )}\right ) e^{3 x}}{625} \]