58.11.4 problem 4

Internal problem ID [14735]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 4
Date solved : Thursday, October 02, 2025 at 09:50:38 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+2 y&=10 \sin \left (4 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 33
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+2*y(x) = 10*sin(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} \sin \left (x \right ) c_2 +{\mathrm e}^{-x} \cos \left (x \right ) c_1 -\frac {7 \sin \left (4 x \right )}{13}-\frac {4 \cos \left (4 x \right )}{13} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 42
ode=D[y[x],{x,2}]+2*D[y[x],x]+2*y[x]==10*Sin[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {7}{13} \sin (4 x)-\frac {4}{13} \cos (4 x)+c_2 e^{-x} \cos (x)+c_1 e^{-x} \sin (x) \end{align*}
Sympy. Time used: 0.142 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - 10*sin(4*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} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- x} - \frac {7 \sin {\left (4 x \right )}}{13} - \frac {4 \cos {\left (4 x \right )}}{13} \]