74.8.21 problem 21

Internal problem ID [16086]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Review exercises, page 80
Problem number : 21
Date solved : Monday, March 31, 2025 at 02:41:22 PM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=diff(y(t),t)+t*y(t) = t; 
dsolve(ode,y(t), singsol=all);
 
\[ y = 1+{\mathrm e}^{-\frac {t^{2}}{2}} c_1 \]
Mathematica. Time used: 0.042 (sec). Leaf size: 24
ode=D[y[t],t]+t*y[t]==t; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to 1+c_1 e^{-\frac {t^2}{2}} \\ y(t)\to 1 \\ \end{align*}
Sympy. Time used: 0.273 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t*y(t) - t + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} e^{- \frac {t^{2}}{2}} + 1 \]