# Differentiating $y=\tan(x)$

Differentiate $$y=\tan(x)$$

normally we write $$y=\frac{\sin(x)}{\cos(x)}$$ and using quotient rule of differentiation

$$\frac{dy}{dx}=\frac{\cos(x)\sin(x)'-\sin(x)\cos(x)'}{\cos^2(x)}$$

$$\frac{dy}{dx}=\frac{\cos^{2}(x)+\sin^{2}(x)}{\cos^{2}(x)}=\sec^2(x)$$.

Question: Is there another alternative way of differentiating $$y=\tan(x)?$$

• Writing it as $\sec ^2(x) -1$ and differentiating would work. – JacobCheverie Apr 30 at 21:42
• Maybe using another trig identity expressing $\tan x$ such as $\tan x=[\sin(2x)]/[1+\cos(2x)]$ but it would be longer. – coffeemath Apr 30 at 21:45
• Do you mean another way to establish the formula, or another (equivalent) final formula? – Bernard Apr 30 at 21:54
• What sort of "other way" do you mean? – The Count Apr 30 at 21:54
• like using infinite series or ... – coffeee Apr 30 at 21:56

Using the tangent addition formula, $$\tan(\alpha+\beta) = \frac{\tan(\alpha)+\tan(\beta)}{1-\tan(\alpha)\tan(\beta)}$$ plus the fact that $$\lim_{h\to 0}\frac{\tan(h)}{h} = 1$$ (which can be derived from the fact that the limit of $$\frac{\sin(h)}{h}$$ as $$h\to 0$$ is $$1$$), we have: \begin{align*} \frac{d}{dx}\tan(x) &= \lim_{h\to 0}\frac{\tan(x+h) - \tan(x)}{h} = \lim_{h\to 0}\frac{\quad\frac{\tan(x)+\tan(h)}{1-\tan(x)\tan(h)} - \tan(x)}{h}\\ &= \lim_{h\to 0}\frac{\tan(x)+\tan(h) - \tan(x)(1-\tan(x)\tan(h))}{h(1-\tan(x)\tan(h))} \\ &= \lim_{h\to 0}\frac{\tan(x) + \tan(h) - \tan(x) + \tan(h)\tan^2(x)}{h(1-\tan(x)\tan(h))}\\ &= \lim_{h\to 0}\frac{\tan(h) + \tan(h)\tan^2(x)}{h(1-\tan(x)\tan(h))}\\ &= \lim_{h\to 0}\frac{\tan(h) (1 + \tan^2(x))}{h(1-\tan(x)\tan(h))}\\ &= \lim_{h\to 0}\left(\frac{\tan(h)}{h}\right)\left(\frac{1+\tan^2(x)}{1-\tan(x)\tan(h)}\right)\\ &= (1)\left(\frac{1+\tan^2(x)}{1}\right) = 1+\tan^2(x) = \sec^2(x). \end{align*}

• Dang, beat me to it. :-) – Brian Tung Apr 30 at 21:58

Construct the line x = 1, and lines from the origin that make angles $$t$$ and $$t+h$$ with the x axis. They form right triangle with sides $$1, \tan t, \sec t$$ and $$1,\tan (t+h), \sec (t+h)$$ and areas $$\frac 12 \tan t$$, and $$\frac 12 \tan (t+h)$$

And the difference between these two triangle is a triangle of area $$\frac 12 ( \tan (t+h) - \tan t)$$

Note that this area is larger than the area of the section of the circle with radius $$\sec t$$ and angle measure $$h.$$ and smaller than the area of the section of the circle with radius $$\sec (t+h)$$ and angle measure $$h.$$

$$\frac 12 h\sec^2 t\le \frac 12 (\tan (t+h) - \tan t) \le \frac 12 h\sec^2 (t+h)$$

or

$$\sec^2 t\le \frac {\tan (t+h) - \tan t}{h} \le \frac 12 h\sec^2 (t+h)$$

And the expression in the middle looks a lot like the definition of the derivative of $$\tan t$$

Taking the limit as $$h$$ goes to 0, our derivative gets squeezed.

$$\tan(x)=\sin(x) \cdot (\cos(x))^{-1}$$. Then use the product rule

• That's the same as doing the quotient rule... – Arturo Magidin Apr 30 at 21:50
• He wanted a different way of differentiating, and some people find the product rule easier even though yes, the two are both sides of the same coin. – ItIsLastThursday Apr 30 at 21:50