85.13.4 problem 4

Internal problem ID [22510]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. B Exercises at page 40
Problem number : 4
Date solved : Thursday, October 02, 2025 at 08:44:08 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} y^{\prime }&=\left (x +y\right )^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 16
ode:=diff(y(x),x) = (x+y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x -\tan \left (-x +c_1 \right ) \]
Mathematica. Time used: 0.308 (sec). Leaf size: 14
ode=D[y[x],x]==(x+y[x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x+\tan (x+c_1) \end{align*}
Sympy. Time used: 0.168 (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}} \]