15.11.4 problem 4

Internal problem ID [3114]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 4
Date solved : Tuesday, March 04, 2025 at 03:58:51 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.002 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)+3*diff(y(x),x)+2*y(x) = exp(-2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left ({\mathrm e}^{-x} \left (x +c_{1} +1\right )-c_2 \right ) {\mathrm e}^{-x} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 24
ode=D[y[x],{x,2}]+3*D[y[x],x]+2*y[x]==Exp[-2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-2 x} \left (-x+c_2 e^x-1+c_1\right ) \]
Sympy. Time used: 0.252 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-2*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \left (C_{2} - x\right ) e^{- x}\right ) e^{- x} \]