82.27.3 problem Ex. 3

Internal problem ID [18799]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. problems at page 73
Problem number : Ex. 3
Date solved : Thursday, March 13, 2025 at 12:59:15 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.003 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+y(x) = 2*exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (c_{1} x +c_{2} \right ) {\mathrm e}^{-x}+\frac {2 \,{\mathrm e}^{2 x}}{9} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 28
ode=D[y[x],{x,2}]+2*D[y[x],x]+y[x]==2*Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {2 e^{2 x}}{9}+e^{-x} (c_2 x+c_1) \]
Sympy. Time used: 0.176 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - 2*exp(2*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\right ) e^{- x} + \frac {2 e^{2 x}}{9} \]