14.8.4 problem Problem 4

Internal problem ID [3737]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.4, Complex-Valued Trial Solutions. page 529
Problem number : Problem 4
Date solved : Tuesday, September 30, 2025 at 06:56:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+4 y&=169 \sin \left (3 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+4*y(x) = 169*sin(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 x +c_2 \right ) {\mathrm e}^{-2 x}-12 \cos \left (3 x \right )-5 \sin \left (3 x \right ) \]
Mathematica. Time used: 0.012 (sec). Leaf size: 36
ode=D[y[x],{x,2}]+4*D[y[x],x]+4*y[x]==169*Sin[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -12 \cos (3 x)+e^{-2 x} \left (-5 e^{2 x} \sin (3 x)+c_2 x+c_1\right ) \end{align*}
Sympy. Time used: 0.130 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - 169*sin(3*x) + 4*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^{- 2 x} - 5 \sin {\left (3 x \right )} - 12 \cos {\left (3 x \right )} \]