38.6.23 problem 23

Internal problem ID [8453]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 23
Date solved : Tuesday, September 30, 2025 at 05:37:17 PM
CAS classification : [_linear]

\begin{align*} x y^{\prime }+\left (3 x +1\right ) y&={\mathrm e}^{-3 x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=x*diff(y(x),x)+(3*x+1)*y(x) = exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x +c_1 \right ) {\mathrm e}^{-3 x}}{x} \]
Mathematica. Time used: 0.045 (sec). Leaf size: 18
ode=x*D[y[x],x]+(3*x+1)*y[x]==Exp[-3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{-3 x} (x+c_1)}{x} \end{align*}
Sympy. Time used: 0.201 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + (3*x + 1)*y(x) - exp(-3*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\frac {C_{1}}{x} + 1\right ) e^{- 3 x} \]