Given Differential equation is:

Differentiating w.r.t x on both sides we get,

Substitute (2) in (1) we get,

Bringing like variables on same side (i.e., variable seperable technique) we get,

Integrating on both sides we get,
⇒ ∫sec2zdz = ∫dx
We know that:
(1) ∫sec2xdx = tanx + C
(2) ∫adx = ax + C
⇒ tanz = x + C
Since z = x – 2y we substitute this,
⇒ tan(x – 2y) = x + C
∴ The solution for the given Differential Equation is tan(x – 2y) = x + C.