30.2.3 problem 3

Internal problem ID [7431]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 3
Date solved : Tuesday, September 30, 2025 at 04:32:46 PM
CAS classification : [_separable]

\begin{align*} \left (t^{2}+1\right ) y^{\prime }&=y t -y \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=(t^2+1)*diff(y(t),t) = t*y(t)-y(t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = c_1 \sqrt {t^{2}+1}\, {\mathrm e}^{-\arctan \left (t \right )} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 35
ode=(t^2+1)*D[y[t],t]==y[t]*t-y[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to c_1 \exp \left (\int _1^t\frac {K[1]-1}{K[1]^2+1}dK[1]\right )\\ y(t)&\to 0 \end{align*}
Sympy. Time used: 0.177 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t*y(t) + (t**2 + 1)*Derivative(y(t), t) + y(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} \sqrt {t^{2} + 1} e^{- \operatorname {atan}{\left (t \right )}} \]