47.1.30 problem 30

Internal problem ID [7411]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 30
Date solved : Wednesday, March 05, 2025 at 04:27:06 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.020 (sec). Leaf size: 15
ode:=diff(y(x),x) = cos(x-y(x)-1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x -1-2 \,\operatorname {arccot}\left (-x +c_{1} \right ) \]
Mathematica. Time used: 5.799 (sec). Leaf size: 59
ode=D[y[x],x]==Cos[x-y[x]-1]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -i \log \left (\frac {e^{i (x-1)} (2 x-c_1)}{2 x-4 i-c_1}\right ) \\ y(x)\to -i \log \left (e^{i (x-1)}\right ) \\ \end{align*}
Sympy. Time used: 1.239 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(-x + y(x) + 1) + 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 )} - 1 \]