Differentiation

If $y = x + \tan x$, prove that $\cos^2 x \dfrac{d^2 y}{dx^2} - 2y + 2x = 0$


$ \begin{aligned} y & = x + \tan x \\ \therefore \dfrac{dy}{dx} & = 1 + \sec^2 x \\ \therefore \dfrac{d^2 y}{dx^2} & = 2 \sec x \times \sec x \tan x \\ & = 2 \sec^2 x \tan x \\ & = \dfrac{2 \tan x}{\cos^2 x} \\ \therefore \cos^2 x \dfrac{d^2 y}{dx^2} & = 2 \tan x \end{aligned} $

Since $y = x + \tan x$ $\implies$ $\tan x = y - x$

$\therefore$ $\cos^2 x \dfrac{d^2 y}{dx^2} = 2 \left(y-x\right)$

i.e. $\cos^2 x \dfrac{d^2 y}{dx^2} - 2y + 2x = 0$