14.2.19 problem 20

Internal problem ID [2507]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 1. First order differential equations. Section 1.4 separable equations. Excercises page 24
Problem number : 20
Date solved : Sunday, March 30, 2025 at 12:05:45 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.012 (sec). Leaf size: 32
ode:=diff(y(t),t) = (t+y(t)+1)/(t-y(t)+3); 
dsolve(ode,y(t), singsol=all);
 
\[ y = 1+\tan \left (\operatorname {RootOf}\left (2 \textit {\_Z} +\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+2 \ln \left (t +2\right )+2 c_1 \right )\right ) \left (-t -2\right ) \]
Mathematica. Time used: 0.065 (sec). Leaf size: 57
ode=D[y[t],t]==(t+y[t]+1)/(t-y[t]+3); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \arctan \left (\frac {y(t)+t+1}{-y(t)+t+3}\right )=\log \left (\frac {t^2+y(t)^2-2 y(t)+4 t+5}{2 (t+2)^2}\right )+2 \log (t+2)+c_1,y(t)\right ] \]
Sympy. Time used: 2.138 (sec). Leaf size: 34
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(Derivative(y(t), t) - (t + y(t) + 1)/(t - y(t) + 3),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ \log {\left (t + 2 \right )} = C_{1} - \log {\left (\sqrt {1 + \frac {\left (y{\left (t \right )} - 1\right )^{2}}{\left (t + 2\right )^{2}}} \right )} + \operatorname {atan}{\left (\frac {y{\left (t \right )} - 1}{t + 2} \right )} \]