36.2.3 problem 3

Internal problem ID [6296]
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 : Sunday, March 30, 2025 at 10:49:47 AM
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.04 (sec). Leaf size: 28
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 \sqrt {t^2+1} e^{-\arctan (t)} \\ y(t)\to 0 \\ \end{align*}
Sympy. Time used: 0.277 (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 )}} \]