75.2.8 problem 28

Internal problem ID [16614]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 2. The method of isoclines. Exercises page 27
Problem number : 28
Date solved : Monday, March 31, 2025 at 03:01:33 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.012 (sec). Leaf size: 14
ode:=diff(y(x),x) = cos(x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x -2 \,\operatorname {arccot}\left (-x +c_1 \right ) \]
Mathematica. Time used: 4.978 (sec). Leaf size: 55
ode=D[y[x],x]==Cos[x-y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -i \log \left (\frac {e^{i x} (2 x-c_1)}{2 x-4 i-c_1}\right ) \\ y(x)\to -i \log \left (e^{i x}\right ) \\ \end{align*}
Sympy. Time used: 0.933 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(x - y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x + 2 \operatorname {atan}{\left (\frac {1}{C_{1} + x} \right )} \]