72.8.13 problem 26

Internal problem ID [14698]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Review Exercises for chapter 1. page 136
Problem number : 26
Date solved : Thursday, March 13, 2025 at 04:15:21 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 22
ode:=diff(y(t),t) = t+2*y(t)/(t+1); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \left (t +1\right ) \left (\left (t +1\right ) \ln \left (t +1\right )+c_{1} t +c_{1} +1\right ) \]
Mathematica. Time used: 0.038 (sec). Leaf size: 26
ode=D[y[t],t]==t+2*y[t]/(1+t); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to (t+1)^2 \left (-\frac {t}{t+1}+\log (t+1)+c_1\right ) \]
Sympy. Time used: 0.365 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t + Derivative(y(t), t) - 2*y(t)/(t + 1),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} t^{2} + 2 C_{1} t + C_{1} + t^{2} \log {\left (t + 1 \right )} + 2 t \log {\left (t + 1 \right )} + t + \log {\left (t + 1 \right )} + 1 \]