I am trying to differentiate:
$\frac{dz}{dw} = \frac{d}{dw} \frac{wc}{R^{-2} + w^2c^2} = \frac{d}{dw} (wc)(R^{-2} + w^2c^2)^{-1} = \frac{C}{R^{-2} w^2c^2} + \frac{-2wc^2}{R^{-2} + w^2 c^2}$
Now to find the maximum value of $z$ I need to set the entire expression to 0
$\frac{C}{R^{-2} w^2c^2} + \frac{-2wc}{R^{-2} + w^2 c^2} = 0$
From here, I got $R^{-2} c + w^2c^2 - 2wc^2 = 0$ which I will not get to the final answer of $w=1/Rc $ where have I differentiated wrongly?