23.3.61 problem 63

Internal problem ID [5775]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 63
Date solved : Tuesday, September 30, 2025 at 02:02:55 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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