41.1.33 problem 33

Internal problem ID [8700]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 33
Date solved : Tuesday, September 30, 2025 at 05:41:47 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} y^{\prime }&=\left (x +y+1\right )^{2} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=diff(y(x),x) = (x+y(x)+1)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x -1-\tan \left (-x +c_1 \right ) \]
Mathematica. Time used: 0.343 (sec). Leaf size: 15
ode=D[y[x],x]==(x+y[x]+1)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x+\tan (x+c_1)-1 \end{align*}
Sympy. Time used: 0.210 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x + y(x) + 1)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- C_{1} x + C_{1} \left (-1 + i\right ) + x e^{2 i x} + \left (1 + i\right ) e^{2 i x}}{C_{1} - e^{2 i x}} \]