88.16.6 problem 6

Internal problem ID [24111]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 4. Linear equations. Exercises at page 116
Problem number : 6
Date solved : Thursday, October 02, 2025 at 09:59:19 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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