# Derivative of the Tangent Squared Function

In this tutorial we shall discuss the derivative of the tangent squared function and its related examples. It can be proved by the definition of differentiation.

We have a function of the form $y = f\left( x \right) = {\tan ^2}x$

By the definition of differentiation we have
$\frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{f\left( {x + \Delta x} \right) – f\left( x \right)}}{{\Delta x}}\,\,\,\,{\text{ – – – }}\left( {\text{i}} \right)$

Putting the value of the function in equation (i), we get
$\begin{gathered}\frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{{{\tan }^2}\left( {x + \Delta x} \right) – {{\tan }^2}x}}{{\Delta x}} \\ \Rightarrow \frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\left[ {\tan \left( {x + \Delta x} \right) + \tan x} \right]\left[ {\tan \left( {x + \Delta x} \right) – \tan x} \right]}}{{\Delta x}} \\ \Rightarrow \frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\left[ {\tan \left( {x + \Delta x} \right) + \tan x} \right]}}{{\Delta x}}\left[ {\frac{{\sin \left( {x + \Delta x} \right)}}{{\cos \left( {x + \Delta x} \right)}} – \frac{{\sin x}}{{\cos x}}} \right] \\ \Rightarrow \frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\left[ {\tan \left( {x + \Delta x} \right) + \tan x} \right]}}{{\Delta x}}\left[ {\frac{{\sin \left( {x + \Delta x} \right)\cos x – \cos \left( {x + \Delta x} \right)\sin x}}{{\cos \left( {x + \Delta x} \right)\cos x}}} \right] \\ \end{gathered}$

Using the formula from trigonometry $\sin \alpha \cos \beta – \cos \alpha \sin \beta = \sin \left( {\alpha – \beta } \right)$
$\begin{gathered} \frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\left[ {\tan \left( {x + \Delta x} \right) + \tan x} \right]}}{{\Delta x}}\left[ {\frac{{\sin \left( {x + \Delta x – x} \right)}}{{\cos \left( {x + \Delta x} \right)\cos x}}} \right] \\ \Rightarrow \frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\left[ {\tan \left( {x + \Delta x} \right) + \tan x} \right]}}{{\cos \left( {x + \Delta x} \right)\cos x}}\left[ {\frac{{\sin \left( {\Delta x} \right)}}{{\Delta x}}} \right] \\ \Rightarrow \frac{{dy}}{{dx}} = \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\left[ {\tan \left( {x + \Delta x} \right) + \tan x} \right]}}{{\cos \left( {x + \Delta x} \right)\cos x}}\mathop {\lim }\limits_{\Delta x \to 0} \left[ {\frac{{\sin \left( {\Delta x} \right)}}{{\Delta x}}} \right] \\ \Rightarrow \frac{{dy}}{{dx}} = \frac{{\left[ {\tan \left( {x + 0} \right) + \tan x} \right]}}{{\cos \left( {x + 0} \right)\cos x}}\left( 1 \right) \\ \Rightarrow \frac{{dy}}{{dx}} = \frac{{2\tan x}}{{{{\cos }^2}x}} \\ \Rightarrow \frac{{dy}}{{dx}} = 2\tan x{\sec ^2}x \\ \end{gathered}$

Example: Find the derivative of $y = f\left( x \right) = {\tan ^2}\left( {{x^2} + 1} \right)$

We have the given function as
$y = {\tan ^2}\left( {{x^2} + 1} \right)$

Differentiating with respect to variable $x$, we get
$\frac{{dy}}{{dx}} = \frac{d}{{dx}}{\tan ^2}\left( {{x^2} + 1} \right)$

Using the rule, $\frac{d}{{dx}}{\tan ^2}x = 2\tan x{\sec ^2}x$, we get
$\begin{gathered}\frac{{dy}}{{dx}} = 2\tan \left( {{x^2} + 1} \right){\sec ^2}\left( {{x^2} + 1} \right)\frac{d}{{dx}}\left( {{x^2} + 1} \right) \\ \Rightarrow \frac{{dy}}{{dx}} = 2\tan \left( {{x^2} + 1} \right){\sec ^2}\left( {{x^2} + 1} \right)\left( {2x} \right) \\ \Rightarrow \frac{{dy}}{{dx}} = 4x\tan \left( {{x^2} + 1} \right){\sec ^2}\left( {{x^2} + 1} \right) \\ \end{gathered}$