7.5.61 problem 61

Internal problem ID [165]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.6 (substitution and exact equations). Problems at page 72
Problem number : 61
Date solved : Saturday, March 29, 2025 at 04:37:44 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.015 (sec). Leaf size: 23
ode:=diff(y(x),x) = sin(x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x -2 \arctan \left (\frac {c_1 -x +2}{c_1 -x}\right ) \]
Mathematica. Time used: 0.377 (sec). Leaf size: 64
ode=D[y[x],x]==Sin[x-y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [y(x)-\sec (x-y(x)) \left (2 \sqrt {\cos ^2(x-y(x))} \arcsin \left (\frac {\sqrt {1-\sin (x-y(x))}}{\sqrt {2}}\right )+\sin (x-y(x))+1\right )=c_1,y(x)\right ] \]
Sympy. Time used: 1.830 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(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 {C_{1} + x - 2}{C_{1} + x} \right )} \]