13.1.3 problem Example 5

Internal problem ID [2296]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 1.2. Page 6
Problem number : Example 5
Date solved : Saturday, March 29, 2025 at 11:53:07 PM
CAS classification : [_separable]

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

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