81.14.3 problem 18-13

Internal problem ID [21688]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 18. Algebra of differential operators. Page 435
Problem number : 18-13
Date solved : Thursday, October 02, 2025 at 08:00:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y&=2 x +{\mathrm e}^{2 x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)-y(x) = 2*x+exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_2 +{\mathrm e}^{x} c_1 -2 x +\frac {{\mathrm e}^{2 x}}{3} \]
Mathematica. Time used: 0.11 (sec). Leaf size: 32
ode=D[y[x],{x,2}]-y[x]==2*x+Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -2 x+\frac {e^{2 x}}{3}+c_1 e^x+c_2 e^{-x} \end{align*}
Sympy. Time used: 0.047 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x - y(x) - exp(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + C_{2} e^{x} - 2 x + \frac {e^{2 x}}{3} \]