30.6.29 problem 30

Internal problem ID [7564]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 30
Date solved : Tuesday, September 30, 2025 at 04:53:07 PM
CAS classification : [[_linear, `class A`]]

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