83.13.2 problem 3

Internal problem ID [19107]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Exercise III (E) at page 39
Problem number : 3
Date solved : Monday, March 31, 2025 at 06:48:37 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.002 (sec). Leaf size: 35
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right ) c_2 +{\mathrm e}^{-\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right ) c_1 +{\mathrm e}^{-x} \]
Mathematica. Time used: 0.138 (sec). Leaf size: 55
ode=D[y[x],{x,2}]+D[y[x],x]+y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x} \left (c_2 e^{x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_1 e^{x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )+1\right ) \]
Sympy. Time used: 0.185 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} + e^{- x} \]