# Derivative of tangent

I have a book where are shown steps to derivate $\tan(x)$ incompletely:

$D(\dfrac{\sin x}{\cos x})$

$= \dfrac{\cos x D(\sin x) - \sin x D(\cos x)}{\cos^2 x}$

$= \dfrac{\cos x \cos x + \sin x \sin x}{\cos^2 x}$

$= \dfrac {1}{\cos^2 x} = \sec^2 x$

Can you explain me how to get to step 2?

-

You may want to take a look here: It's called the quotient rule for derivatives.

$\textbf{Added.}$ Well, if you don't like that then use the standard definition of derivative which is $$f'(x) = \lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$$ Using this with $f(x)=\tan{x}$ we have

\begin{align*} f'(x) &= \lim_{h \to 0} \frac{\tan(x+h)-\tan{x}}{h} \\ &= \lim_{h \to 0} \frac{\frac{\sin(x+h)}{\cos(x+h)} - \frac{\sin{x}}{\cos{x}}}{h} \\ &=\lim_{h \to 0} \frac{ \sin(x+h)\cdot \cos{x} - \cos(x+h)\cdot\sin{x}}{h} \times \frac{1}{\cos(x+h)\cdot \cos{x}} \\ &=\lim_{h \to 0} \frac{\sin(x+h -x)}{h} \cdot \lim_{h \to 0} \frac{1}{\cos(x+h)\cdot \cos{x}} \qquad \Bigl[ \small\because \sin(A-B) = \sin{A}\cdot \cos{B} - \cos{A}\cdot \sin{B} \Bigr] \\ &= \frac{1}{\cos^{2}{x}} = \sec^{2}{x} \qquad\qquad \qquad \Bigl[ \small\because \lim_{x \to 0} \frac{\sin{x}}{x} =1 \Bigr] \end{align*}

$\textbf{Added 2.}$ Or if you are aware of the product rule then you can also do like this: $$(uv)' = u'v + uv'$$ and note that

• $u=\sin{x}$

• $v = \frac{1}{\cos{x}} = \sec{x}$ and it's derivative $v' == \sec{x} \cdot \tan{x}$

-

we have $D(\frac{u}{v})=\frac{D(u)v-D(v)u}{v^2}$.now $u=sinx$ and $v=cosx$ so $D(\dfrac{\sin x}{\cos x})=1+tg^2x$

-