32.6.17 problem Exercise 12.17, page 103

Internal problem ID [5882]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 12, Miscellaneous Methods
Problem number : Exercise 12.17, page 103
Date solved : Tuesday, March 04, 2025 at 11:51:40 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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

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