13.2.4 problem 4

Internal problem ID [2302]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 1.2. Page 9
Problem number : 4
Date solved : Saturday, March 29, 2025 at 11:53:19 PM
CAS classification : [[_linear, `class A`]]

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

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