88.22.1 problem 5

Internal problem ID [24161]
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 5. Special Techniques for Linear Equations. Exercises at page 160 (Laplace transform)
Problem number : 5
Date solved : Thursday, October 02, 2025 at 10:00:20 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using Laplace method

Maple. Time used: 0.042 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)+y(x) = 2*exp(x); 
dsolve(ode,y(x),method='laplace');
 
\[ y = {\mathrm e}^{x} \left (x y^{\prime }\left (0\right )+x^{2}-y \left (0\right ) \left (x -1\right )\right ) \]
Mathematica. Time used: 0.01 (sec). Leaf size: 19
ode=D[y[x],{x,2}]-2*D[y[x],{x,1}]+y[x]==2*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (x^2+c_2 x+c_1\right ) \end{align*}
Sympy. Time used: 0.108 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - 2*exp(x) - 2*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^{x} \]