14.1.4 problem 4

Internal problem ID [2475]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 1. First order differential equations. Section 1.2. Linear equations. Excercises page 9
Problem number : 4
Date solved : Sunday, March 30, 2025 at 12:02:33 AM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.001 (sec). Leaf size: 20
ode:=diff(y(t),t)+y(t) = t*exp(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.053 (sec). Leaf size: 26
ode=D[y[t],t]+y[t]==t*Exp[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.169 (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} \]