Step 1: Substitution
Let $v = x - y - 1$. Then $\dfrac{dv}{dx} = 1 - \dfrac{dy}{dx}$.
Step 2: Substitute $\dfrac{dy}{dx}$
Given $\dfrac{dy}{dx} = \cos^2(v)$, so:
$\dfrac{dv}{dx} = 1 - \cos^2(v) = \sin^2(v)$.
Step 3: Separate and integrate
$\dfrac{dv}{\sin^2(v)} = dx \Rightarrow \int \csc^2(v) \, dv = \int dx$
$- \cot(v) = x + C_1$
Step 4: Substitute back $v$
$- \cot(x - y - 1) = x + C_1$
Step 5: Solve for $x$
$x = - \cot(x - y - 1) - C_1$
Let $C = -C_1$, then:
$x = C - \cot(x - y - 1)$