35.6.18 problem 18

Internal problem ID [6168]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 6. SECOND-ORDER LINEAR EQUATIONSWITH CONSTANT COEFFICIENTS AND RIGHT-HAND SIDE NOT ZERO. page 422
Problem number : 18
Date solved : Sunday, March 30, 2025 at 10:41:49 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.006 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+17*y(x) = 60*exp(-4*x)*sin(5*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\sin \left (4 x \right ) c_2 \,{\mathrm e}^{3 x}+\cos \left (4 x \right ) c_1 \,{\mathrm e}^{3 x}+2 \cos \left (5 x \right )\right ) {\mathrm e}^{-4 x} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 42
ode=D[y[x],{x,2}]+2*D[y[x],x]+17*y[x]==60*Exp[-4*x]*Sin[5*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-4 x} \left (2 \cos (5 x)+c_2 e^{3 x} \cos (4 x)+c_1 e^{3 x} \sin (4 x)\right ) \]
Sympy. Time used: 0.359 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(17*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 60*exp(-4*x)*sin(5*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (4 x \right )} + C_{2} \cos {\left (4 x \right )} + 2 e^{- 3 x} \cos {\left (5 x \right )}\right ) e^{- x} \]