# Derivative of tan(x) with product and chain rules instead of quotient rule

So I usually just use the product and chain rules for quotient functions, because I can never remember which product to substract from which in the numerator. But somehow I'm doing it wrong for $\tan(x)$. Say $a$ and $b$ are functions of $x$, and $f$ is the quotient of those functions. I take $a$ and multiply it with the derivative of $b^{-1}$ and add the derivative of $a$ multiplied with $b^{-1}$. I am doing something wrong here but can't see what exactly yet. \begin{gather} f=ab^{-1},\quad f'=a'b^{-1}-b^{-2}ab'\\[2ex] f(x)=\tan(x)=\frac{\sin(x)}{\cos(x)}=\sin(x)\cos^{-1}(x)\\[2ex] f'(x)=\cos(x)\cos^{-1}(x)+\sin^2(x)\cos^{-2}(x) \end{gather} This is completely wrong, as I should get $f'(x)=\frac{1}{\cos^2(x)}$ instead of $f'(x)=1+\tan^2(x)$. I know I'm applying this wrong, but I'm not sure where. Thanks.

• $1+\tan^2x=1+\frac{sin^2x}{cos^2x}=\ldots$ Commented Jul 2, 2013 at 8:54
• It's not wrong; for instance, there's no difference between $\cos^2 x$ and $1-\sin^2x$. This is a similar case. Commented Jul 2, 2013 at 8:57
• Ah thank you! So I am getting the calculus bit right, just not the trig bit.
– Leo
Commented Jul 2, 2013 at 9:39

$$\frac{1}{\cos^2x}=\frac{\cos^2x+\sin^2x}{\cos^2x}=1+\tan^2 x.$$