20.1.7 problem 3.b

Internal problem ID [4247]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 7, page 37
Problem number : 3.b
Date solved : Tuesday, September 30, 2025 at 07:08:40 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} y^{\prime }&=\sin \left (x -y+1\right )^{2} \end{align*}
Maple. Time used: 0.014 (sec). Leaf size: 13
ode:=diff(y(x),x) = sin(x-y(x)+1)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x +1+\arctan \left (-x +c_1 \right ) \]
Mathematica. Time used: 0.217 (sec). Leaf size: 33
ode=D[y[x],x]==Sin[x-y[x]+1]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[2 y(x)-2 (\tan (-y(x)+x+1)-\arctan (\tan (-y(x)+x+1)))=c_1,y(x)] \]
Sympy. Time used: 1.583 (sec). Leaf size: 61
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(x - y(x) + 1)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x - 2 \operatorname {atan}{\left (\frac {\sqrt {C_{1}^{2} + 2 C_{1} x + x^{2} + 1} - 1}{C_{1} + x} \right )} + 1, \ y{\left (x \right )} = x + 2 \operatorname {atan}{\left (\frac {\sqrt {C_{1}^{2} + 2 C_{1} x + x^{2} + 1} + 1}{C_{1} + x} \right )} + 1\right ] \]