63.5.23 problem 8

Internal problem ID [13026]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 8
Date solved : Monday, March 31, 2025 at 07:31:20 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} x^{\prime }&=\left (t +x\right )^{2} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 16
ode:=diff(x(t),t) = (t+x(t))^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = -t -\tan \left (-t +c_1 \right ) \]
Mathematica. Time used: 0.513 (sec). Leaf size: 14
ode=D[x[t],t]==(t+x[t])^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to -t+\tan (t+c_1) \]
Sympy. Time used: 0.296 (sec). Leaf size: 34
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-(t + x(t))**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {- C_{1} t + i C_{1} + t e^{2 i t} + i e^{2 i t}}{C_{1} - e^{2 i t}} \]