14.3.10 problem Problem 10

Internal problem ID [3619]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.6, First-Order Linear Differential Equations. page 59
Problem number : Problem 10
Date solved : Tuesday, September 30, 2025 at 06:48:35 AM
CAS classification : [_linear]

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