74.5.9 problem 9

Internal problem ID [15894]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.3, page 49
Problem number : 9
Date solved : Thursday, March 13, 2025 at 06:56:22 AM
CAS classification : [_linear]

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

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