67.15.51 problem 22.11 (j)

Internal problem ID [16769]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 22. Method of undetermined coefficients. Additional exercises page 412
Problem number : 22.11 (j)
Date solved : Thursday, October 02, 2025 at 01:38:41 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+20 y&={\mathrm e}^{4 x} \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+20*y(x) = exp(4*x)*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (\cos \left (4 x \right ) c_1 +c_2 \sin \left (4 x \right )+\frac {\left (-\frac {\cos \left (2 x \right )}{2}+\sin \left (2 x \right )\right ) {\mathrm e}^{2 x}}{20}\right ) \]
Mathematica. Time used: 0.109 (sec). Leaf size: 90
ode=D[y[x],{x,2}]-4*D[y[x],x]+20*y[x]==Exp[4*x]*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{2 x} \left (\cos (4 x) \int _1^x-\frac {1}{4} e^{2 K[2]} \sin (2 K[2]) \sin (4 K[2])dK[2]+\sin (4 x) \int _1^x\frac {1}{4} e^{2 K[1]} \cos (4 K[1]) \sin (2 K[1])dK[1]+c_2 \cos (4 x)+c_1 \sin (4 x)\right ) \end{align*}
Sympy. Time used: 0.221 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(20*y(x) - exp(4*x)*sin(2*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} \sin {\left (4 x \right )} + C_{2} \cos {\left (4 x \right )} + \frac {\left (2 \sin {\left (2 x \right )} - \cos {\left (2 x \right )}\right ) e^{2 x}}{40}\right ) e^{2 x} \]