substitution in $y' = \cos(y-x)$ equation I have one simple DE with separable variables to test substitutions skill:
$$\begin{align*}
y' &= \cos(y-x) \\
\frac{dy}{dx} &= \cos(y-x) \\
t &= y -x \\
\frac{dy}{dx} &= \cos t
\end{align*}$$
But what should I do next? I mean I do not know if there's an algorithm to handle substitutions in DEs or no 
 A: $y-x=u$ derive $y'-1=u'\to y'=u'+1$
The equation becomes
$u'+1=\cos u$
$\dfrac{du}{dx}=\cos u-1$
$\dfrac{du}{\cos u-1}=dx$
$\int dx=x+C$
$\cos u=\dfrac{1-t^2}{1+t^2}$ substituting $t=\tan\frac{u}{2}$ 
$u=2\arctan t$ and $du=\dfrac{2dt}{1+t^2}$
$$\int \frac{1}{\cos u-1} \, du=\int \frac{2}{\left(\frac{1-t^2}{1+t^2}-1\right) \left(t^2+1\right)} \, dt=\int -\frac{1}{t^2} \, dt=\dfrac{1}{t}=\cot\frac{u}{2}$$
$x+C=\cot\dfrac{u}{2}$
$x+C=\cot\dfrac{y-x}{2}$
$y=x+2\,\text{arccot}(x+C)$
Hope this helps
A: How's 'bout
$\dfrac{dt}{dx} = \dfrac{dy}{dx} - 1? \tag 1$
Then the equation
$\dfrac{dy}{dx} = \cos t \tag 2$
becomes
$\dfrac{dt}{dx} + 1 = \cos t; \tag 3$
we might get further by writing
$\dfrac{dt}{dx} = \cos t - 1, \tag 4$
whence
$\dfrac{dx}{dt} = \dfrac{1}{\cos t - 1}, \tag 5$
if we multiply the numerator and denominator on the left by $\cos t + 1$ we find
$\dfrac{dx}{dt} = \dfrac{\cos t + 1}{\cos^2 t - 1} = -\dfrac{\cos t + 1}{\sin^2 t} = -(\sin^{-2} t)\cos t - \csc^2 t; \tag 6$
at this point we observe that the right-hand side of (6) can be integrated in closed form, to wit:
$\dfrac{d(\csc t)}{dt} = \dfrac{d(\sin^{-1} t)}{dt} = -(\sin^{-2} t) \cos t, \tag 7$
$\dfrac{d (\cot t)}{dt} = -\csc^2 t; \tag 8$
then
$\dfrac{dx}{dt} = \dfrac{d(\csc t)}{dt} + \dfrac{d (\cot t)}{dt}; \tag 9$
thus,
$x(t) = \csc t + \cot t + C, \tag{10}$
for some arbitrary constant of integration $C$, which is determined from the (as yet unstated) initial conditions.
Of course, we need to be careful to stay away from the singularities, i.e., places where denominators vanish, but other than that, we have an exact solution for $x$ in terms of $t$.  Since
$y = x + t, \tag{11}$
we have 
$y(t) = x(t) + t = \csc t + \cot t + t + C, \tag{12}$
so we have a solution, albeit in parametric form.  Can we convert it to the for $y(x)$?  I leave this to my readers . . . 
