48.3.13 problem Example 3.42

Internal problem ID [7537]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.5 HIGHER ORDER ODE. Page 181
Problem number : Example 3.42
Date solved : Wednesday, March 05, 2025 at 04:44:23 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+4 y&=50 \,{\mathrm e}^{2 x} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+4*y(x) = 50*exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (c_{1} x +25 x^{2}+c_{2} \right ) \]
Mathematica. Time used: 0.024 (sec). Leaf size: 23
ode=D[y[x],{x,2}]-4*D[y[x],x]+4*y[x]==50*Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \left (25 x^2+c_2 x+c_1\right ) \]
Sympy. Time used: 0.216 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - 50*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} + 25 x\right )\right ) e^{2 x} \]