28.1.18 problem 18

Internal problem ID [4324]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 18
Date solved : Tuesday, March 04, 2025 at 06:23:27 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.033 (sec). Leaf size: 12
ode:=diff(y(x),x) = sin(x-y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = x +\arctan \left (-x +c_{1} \right ) \]
Mathematica. Time used: 0.197 (sec). Leaf size: 31
ode=D[y[x],x]==Sin[x-y[x]]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[2 y(x)-2 (\tan (x-y(x))-\arctan (\tan (x-y(x))))=c_1,y(x)] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(x - y(x))**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out