2.11.26 problem 49

Internal problem ID [894]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number : 49
Date solved : Tuesday, September 30, 2025 at 04:19:10 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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