58.1.14 problem 6(b)

Internal problem ID [14540]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 1, Differential equations and their solutions. Exercises page 13
Problem number : 6(b)
Date solved : Thursday, October 02, 2025 at 09:38:25 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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