23.3.63 problem 65

Internal problem ID [5777]
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 : 65
Date solved : Tuesday, September 30, 2025 at 02:02:57 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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