78.16.1 problem 1

Internal problem ID [18301]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 23. Operator Methods for Finding Particular Solutions. Problems at page 169
Problem number : 1
Date solved : Thursday, March 13, 2025 at 11:53:14 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.003 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)-4*y(x) = exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x +4 c_{2} \right ) {\mathrm e}^{2 x}}{4}+{\mathrm e}^{-2 x} c_{1} \]
Mathematica. Time used: 0.028 (sec). Leaf size: 31
ode=D[y[x],{x,2}]-4*y[x]==Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \left (\frac {x}{4}-\frac {1}{16}+c_1\right )+c_2 e^{-2 x} \]
Sympy. Time used: 0.113 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*y(x) - exp(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- 2 x} + \left (C_{1} + \frac {x}{4}\right ) e^{2 x} \]