Math24.net Calculus
 Home Calculus Limits and Continuity Differentiation Applications of Derivative Integration Sequences and Series Double Integrals Triple Integrals Line Integrals Surface Integrals Fourier Series Differential Equations 1st Order Equations 2nd Order Equations Nth Order Equations Systems of Equations Formulas and Tables
Derivatives of Trigonometric Functions
The basic trigonometric functions include the following 6 functions: sine ($$\sin x$$), cosine ($$\cos x$$), tangent ($$\tan x$$), cotangent ($$\cot x$$), secant ($$\sec x$$) and cosecant ($$\csc x$$).

For each of these functions, there is an inverse trigonometric function. The are called the inverse sine ($$\arcsin x$$), inverse cosine ($$\arccos x$$), inverse tangent ($$\arctan x$$), inverse cotangent ($$\text{arccot }x$$), inverse secant ($$\text{arcsec }x$$) and inverse cosecant ($$\text{arccsc }x$$), respectively.

All these functions are continuous and differentiable in their domains. Below we make a list of derivatives for these $$12$$ functions.
Derivatives of Basic Trigonometric Functions
We have already derived the derivatives of sine and cosine on the Definition of the Derivative page. They are as follows: ${\left( {\sin x} \right)^\prime } = \cos x,\;\;{\left( {\cos x} \right)^\prime } = - \sin x.$ Using the quotient rule it is easy to obtain an expression for the derivative of tangent: ${{\left( {\tan x} \right)^\prime } = {\left( {\frac{{\sin x}}{{\cos x}}} \right)^\prime } } = {\frac{{{{\left( {\sin x} \right)}^\prime }\cos x - \sin x{{\left( {\cos x} \right)}^\prime }}}{{{{\cos }^2}x}} } = {\frac{{\cos x \cdot \cos x - \sin x \cdot \left( { - \sin x} \right)}}{{{{\cos }^2}x}} } = {\frac{{{{\cos }^2}x + {{\sin }^2}x}}{{{{\cos }^2}x}} } = {\frac{1}{{{{\cos }^2}x}}.\;\;}$ The derivative of cotangent can be found in the same way. However, this can be also done using the chain rule for differentiating a composite function: $\require{cancel} {{\left( {\cot x} \right)^\prime } = {\left( {\frac{1}{{\tan x}}} \right)^\prime } } = { - \frac{1}{{{{\tan }^2}x}} \cdot {\left( {\tan x} \right)^\prime } } = { - \frac{1}{{\frac{{{{\sin }^2}x}}{{{{\cos }^2}x}}}} \cdot \frac{1}{{{{\cos }^2}x}} } = { - \frac{\cancel{{{\cos }^2}x}}{{{{\sin }^2}x \cdot \cancel{{{\cos }^2}x}}} } = { - \frac{1}{{{{\sin }^2}x}}.}$ Similarly, we find the derivatives of secant and cosecant: ${{\left( {\sec x} \right)^\prime } = {\left( {\frac{1}{{\cos x}}} \right)^\prime } } = { - \frac{1}{{{{\cos }^2}x}} \cdot {\left( {\cos x} \right)^\prime } } = {\frac{{\sin x}}{{{{\cos }^2}x}} } = {\frac{{\sin x}}{{\cos x}} \cdot \frac{1}{{\cos x}} } = {\tan x\sec x,}$ ${{\left( {\csc x} \right)^\prime } = {\left( {\frac{1}{{\sin x}}} \right)^\prime } } = { - \frac{1}{{{{\sin }^2}x}} \cdot {\left( {\sin x} \right)^\prime } } = {-\frac{{\cos x}}{{{{\sin }^2}x}} } = {-\frac{{\cos x}}{{\sin x}} \cdot \frac{1}{{\sin x}} } = {-\cot x\csc x.}$
Derivatives of Inverse Trigonometric Functions
The derivatives of the inverse trigonometric functions can be derived using the inverse function theorem. For example, the sine function $$x = \varphi \left( y \right) = \sin y$$ is the inverse function for $$y = f\left( x \right) = \arcsin x.$$ Then the derivative of $$y = \arcsin x$$ is given by ${{\left( {\arcsin x} \right)^\prime } = f'\left( x \right) = \frac{1}{{\varphi '\left( y \right)}} } = {\frac{1}{{{{\left( {\sin y} \right)}^\prime }}} } = {\frac{1}{{\cos y}} } = {\frac{1}{{\sqrt {1 - {\sin^2}y} }} } = {\frac{1}{{\sqrt {1 - {\sin^2}\left( {\arcsin x} \right)} }} } = {\frac{1}{{\sqrt {1 - {x^2}} }}\;\;\left( { - 1 < x < 1} \right).}$ Using this technique, we can find the derivatives of the other inverse trigonometric functions: ${{\left( {\arccos x} \right)^\prime } = \frac{1}{{{{\left( {\cos y} \right)}^\prime }}} } = {\frac{1}{{\left( { - \sin y} \right)}} } = {- \frac{1}{{\sqrt {1 - {{\cos }^2}y} }} } = {- \frac{1}{{\sqrt {1 - {{\cos }^2}\left( {\arccos x} \right)} }} } = {- \frac{1}{{\sqrt {1 - {x^2}} }}\;\;\left( { - 1 < x < 1} \right),}\qquad$ ${{\left( {\arctan x} \right)^\prime } = \frac{1}{{{{\left( {\tan y} \right)}^\prime }}} } = {\frac{1}{{\frac{1}{{{{\cos }^2}y}}}} } = {\frac{1}{{1 + {{\tan }^2}y}} } = {\frac{1}{{1 + {{\tan }^2}\left( {\arctan x} \right)}} } = {\frac{1}{{1 + {x^2}}},}$ ${\left( {\text{arccot }x} \right)^\prime } = \frac{1}{{{{\left( {\cot y} \right)}^\prime }}} = \frac{1}{{\left( { - \frac{1}{{{\sin^2}y}}} \right)}} = - \frac{1}{{1 + {{\cot }^2}y}} = - \frac{1}{{1 + {{\cot }^2}\left( {\text{arccot }x} \right)}} = - \frac{1}{{1 + {x^2}}},$ ${{\left( {\text{arcsec }x} \right)^\prime } = \frac{1}{{{{\left( {\sec y} \right)}^\prime }}} } = {\frac{1}{{\tan y\sec y}} } = {\frac{1}{{\sec y\sqrt {{{\sec }^2}y - 1} }} } = {\frac{1}{{\sec \left( {\text{arcsec }x} \right) \cdot \sqrt {{{\sec }^2}\left( {\text{arcsec }x} \right) - 1} }} } = {\frac{1}{{\left| x \right|\sqrt {{x^2} - 1} }}.\;\;\;\;}$ In the last formula, the absolute value $$\left| x \right|$$ in the denominator appears due to the fact that the product $${\tan y\sec y}$$ should always be positive in the range of admissible values of $$y$$, where $$y \in \left( {0,{\large\frac{\pi }{2}\normalsize}} \right) \cup \left( {{\large\frac{\pi }{2}\normalsize},\pi } \right),$$ i.e. the derivative of the inverse secant is always positive.

Similarly, we can obtain an expression for the derivative of the inverse cosecant function: ${{\left( {\text{arccsc }x} \right)^\prime } = \frac{1}{{{{\left( {\csc y} \right)}^\prime }}} } = {-\frac{1}{{\cot y\csc y}} } = {-\frac{1}{{\csc y\sqrt {{{\csc }^2}y - 1} }} } = {-\frac{1}{{\csc \left( {\text{arccsc }x} \right) \cdot \sqrt {{{\csc }^2}\left( {\text{arccsc }x} \right) - 1} }} } = {-\frac{1}{{\left| x \right|\sqrt {{x^2} - 1} }}.}$
Table of Derivatives of Trigonometric Functions
The derivatives of $$6$$ basic trigonometric functions and $$6$$ inverse trigonometric functions considered above are presented in the following table:

DerivativeDomain
$${\left( {\sin x} \right)^\prime } = \cos x$$$$- \infty < x < \infty$$
$${\left( {\cos x} \right)^\prime } = -\sin x$$$$- \infty < x < \infty$$
$${\left( {\tan x} \right)^\prime } = {\large\frac{1}{{{{\cos }^2}x}}\normalsize} = {\sec ^2}x$$$$x \ne {\large\frac{\pi }{2}\normalsize} + \pi n,\;n \in \mathbb{Z}$$
$${\left( {\cot x} \right)^\prime } = -{\large\frac{1}{{{{\sin }^2}x}}\normalsize} = {-\csc ^2}x$$$$x \ne \pi n,\;n \in \mathbb{Z}$$
$${\left( {\sec x} \right)^\prime } = \tan x\sec x$$$$x \ne {\large\frac{\pi }{2}\normalsize} + \pi n,\;n \in \mathbb{Z}$$
$${\left( {\csc x} \right)^\prime } = -\cot x\csc x$$$$x \ne \pi n,\;n \in \mathbb{Z}$$
$${\left( {\arcsin x} \right)^\prime } = {\large\frac{1}{{\sqrt {1 - {x^2}} }}\normalsize}$$$$- 1 < x < 1$$
$${\left( {\arccos x} \right)^\prime } = -{\large\frac{1}{{\sqrt {1 - {x^2}} }}\normalsize}$$$$- 1 < x < 1$$
$${\left( {\arctan x} \right)^\prime } = {\large\frac{1}{{1 + {x^2}}}\normalsize}$$$$- \infty < x < \infty$$
$${\left( {\text{arccot }x} \right)^\prime } = -{\large\frac{1}{{1 + {x^2}}}\normalsize}$$$$- \infty < x < \infty$$
$${\left( {\text{arcsec }x} \right)^\prime } = {\large\frac{1}{{\left| x \right|\sqrt {{x^2} - 1} }}\normalsize}$$$$x \in \left( { - \infty , - 1} \right) \cup \left( {1,\infty } \right)$$
$${\left( {\text{arccsc }x} \right)^\prime } = -{\large\frac{1}{{\left| x \right|\sqrt {{x^2} - 1} }}\normalsize}$$$$x \in \left( { - \infty , - 1} \right) \cup \left( {1,\infty } \right)$$

In the examples below, find the derivative of the given trigonometric function.

Example 1
$y = \cos 2x - 2\sin x$
Solution.
Using the linear properties of the derivative, the chain rule and the double angle formula, we obtain: ${y'\left( x \right) = {\left( {\cos 2x - 2\sin x} \right)^\prime } } = {{\left( {\cos 2x} \right)^\prime } - {\left( {2\sin x} \right)^\prime } } = {\left( { - \sin 2x} \right) \cdot {\left( {2x} \right)^\prime } - 2{\left( {\sin x} \right)^\prime } } = { - 2\sin 2x - 2\cos x } = { - 2\sin x\cos x - 2\cos x } = { - 2\cos x\left( {\sin x + 1} \right).}$
Example 2
$y = \tan x + \frac{1}{3}{\tan ^3}x$
Solution.
The derivative of this function is as follows: ${y'\left( x \right) = {\left( {\tan x + \frac{1}{3}{{\tan }^3}x} \right)^\prime } } = {{\left( {\tan x} \right)^\prime } + {\left( {\frac{1}{3}{{\tan }^3}x} \right)^\prime } } = {\frac{1}{{{{\cos }^2}x}} + \frac{1}{3} \cdot 3{\tan ^2}x \cdot {\left( {\tan x} \right)^\prime } } = {\frac{1}{{{{\cos }^2}x}} + {\tan ^2}x \cdot \frac{1}{{{{\cos }^2}x}} } = {\frac{{1 + {{\tan }^2}x}}{{{{\cos }^2}x}}.}$ The numerator can be simplified using the trigonometric identity ${1 + {\tan^2}x = {\sec ^2}x } = {\frac{1}{{{{\cos }^2}x}}.}$ Therefore ${y'\left( x \right) = \frac{{1 + {{\tan }^2}x}}{{{{\cos }^2}x}} } = {\frac{{\frac{1}{{{{\cos }^2}x}}}}{{{{\cos }^2}x}} } = {\frac{1}{{{{\cos }^4}x}} } = {{\sec ^4}x.}$
Example 3
$y = \arctan \frac{{x + 1}}{{x - 1}}\;\;\left( {x \ne 1} \right)$
Solution.
By the chain and quotient rules, we have ${y'\left( x \right) = {\left( {\arctan \frac{{x + 1}}{{x - 1}}} \right)^\prime } } = {\frac{1}{{1 + {{\left( {\frac{{x + 1}}{{x - 1}}} \right)}^2}}} \cdot {\left( {\frac{{x + 1}}{{x - 1}}} \right)^\prime } } = {\frac{{{{\left( {x - 1} \right)}^2}}}{{{{\left( {x - 1} \right)}^2} + {{\left( {x + 1} \right)}^2}}} \cdot \frac{{{{\left( {x + 1} \right)}^\prime }\left( {x - 1} \right) - \left( {x + 1} \right){{\left( {x - 1} \right)}^\prime }}}{{{{\left( {x - 1} \right)}^2}}} } = {\frac{{1 \cdot \left( {x - 1} \right) - \left( {x + 1} \right) \cdot 1}}{{{{\left( {x - 1} \right)}^2} + {{\left( {x + 1} \right)}^2}}} } = {\frac{{\cancel{\color{blue}{x}} - \color{red}{1} - \cancel{\color{blue}{x}} - \color{red}{1}}}{{\color{maroon}{x^2} - \cancel{\color{green}{2x}} + \color{DarkViolet}{1} + \color{maroon}{x^2} + \cancel{\color{green}{2x}} + \color{DarkViolet}{1}}} } = {\frac{{ - \color{red}{2}}}{{\color{maroon}{2{x^2}} + \color{DarkViolet}{2}}} } = { - \frac{1}{{1 + {x^2}}}.}$
Example 4
$y = \arctan \left( {x - \sqrt {1 + {x^2}} } \right)$
Solution.
We apply the chain rule twice and simplify the resulting expression: ${y'\left( x \right) = {\left[ {\arctan \left( {x - \sqrt {1 + {x^2}} } \right)} \right]^\prime } } = {\frac{1}{{1 + {{\left( {x - \sqrt {1 + {x^2}} } \right)}^2}}} \cdot {\left( {x - \sqrt {1 + {x^2}} } \right)^\prime } } = {\frac{1}{{1 + {x^2} - 2x\sqrt {1 + {x^2}} + {{\left( {\sqrt {1 + {x^2}} } \right)}^2}}} \cdot \left( {1 - \frac{1}{{2\sqrt {1 + {x^2}} }} \cdot {{\left( {1 + {x^2}} \right)}^\prime }} \right) } = {\frac{1}{{1 + {x^2} - 2x\sqrt {1 + {x^2}} + 1 + {x^2}}} \cdot \left( {1 - \frac{{\cancel{2}x}}{{\cancel{2}\sqrt {1 + {x^2}} }}} \right) } = {\frac{1}{{2\left( {1 + {x^2} - x\sqrt {1 + {x^2}} } \right)}} \cdot \frac{{\sqrt {1 + {x^2}} - x}}{{\sqrt {1 + {x^2}} }} } = {\frac{\cancel{\sqrt {1 + {x^2}} - x}}{{2\sqrt {1 + {x^2}} \cancel{\left( {\sqrt {1 + {x^2}} - x} \right)}\sqrt {1 + {x^2}} }} } = {\frac{1}{{2{{\left( {\sqrt {1 + {x^2}} } \right)}^2}}} } = {\frac{1}{{2\left( {1 + {x^2}} \right)}}.}$
Example 5
$y = \frac{1}{{{{\cos }^n}x}}$
Solution.
We find the derivative of this function using the power rule and the chain rule: ${y'\left( x \right) = {\left( {\frac{1}{{{{\cos }^n}x}}} \right)^\prime } } = {{\left[ {{{\left( {\cos x} \right)}^{ - n}}} \right]^\prime } } = { - n{\left( {\cos x} \right)^{ - n - 1}} \cdot {\left( {\cos x} \right)^\prime } } = { - n{\left( {\cos x} \right)^{ - n - 1}} \cdot \left( { -\sin x} \right) } = {\frac{{n\sin x}}{{{{\cos }^{n + 1}}x}}.}$ Here we assume that $$\cos x \ne 0$$, i.e. $$x \ne {\large\frac{\pi }{2}\normalsize} + \pi n,\;n \in \mathbb{Z}.$$

Example 6
$y = {\cos ^2}\sin x$
Solution.
Applying the power rule and the chain rule, we obtain: ${y'\left( x \right) = {\left( {{{\cos }^2}\sin x} \right)^\prime } } = {2\cos \sin x \cdot {\left( {\cos \sin x} \right)^\prime } } = {2\cos \sin x \cdot \left( { - \sin\sin x} \right) \cdot {\left( {\sin x} \right)^\prime } } = { - 2\cos \sin x \cdot \sin \sin x \cdot \cos x.}$ The last expression can be simplified by the double angle formula: ${2\cos \sin x \cdot \sin \sin x } = {\sin \left( {2\sin x} \right).}$ Consequently, the derivative is $y'\left( x \right) = - \sin \left( {2\sin x} \right)\cos x.$
Example 7
$y = {\sin ^2}\sqrt x$
Solution.
We apply the chain rule several times. ${y'\left( x \right) = {\left( {{{\sin }^2}\sqrt x } \right)^\prime } } = {2\sin \sqrt x \cdot {\left( {\sin \sqrt x } \right)^\prime } } = {2\sin \sqrt x \cdot \cos \sqrt x \cdot {\left( {\sqrt x } \right)^\prime } } = {2\sin \sqrt x \cos \sqrt x \cdot \frac{1}{{2\sqrt x }}.}$ By the double angle formula, $\sin \left( {2\sqrt x } \right) = 2\sin \sqrt x \cos \sqrt x .$ Hence, the derivative is ${y'\left( x \right) = \sin \left( {2\sqrt x } \right) \cdot \frac{1}{{2\sqrt x }} } = {\frac{{\sin \left( {2\sqrt x } \right)}}{{2\sqrt x }}.}$
Example 8
$y = {\sin ^3}x + {\cos ^3}x$
Solution.
We use the formulas for the derivative of a sum of functions and the derivative of a power function. ${y'\left( x \right) = {\left( {{{\sin }^3}x + {{\cos }^3}x} \right)^\prime } } = {{\left( {{{\sin }^3}x} \right)^\prime } + {\left( {{{\cos }^3}x} \right)^\prime } } = {3\,{\sin ^2}x \cdot {\left( {\sin x} \right)^\prime } + 3\,{\cos ^2}x \cdot {\left( {\cos x} \right)^\prime }.}$ Substituting the derivatives and simplifying yields ${y'\left( x \right) = 3\,{\sin ^2}x \cdot \cos x + 3\,{\cos ^2}x \cdot \left( { - \sin x} \right) } = {3\,{\sin ^2}x\cos x - 3\,{\cos ^2}x\sin x } = {3\sin x\cos x\left( {\sin x - \cos x} \right).}$ Since $$\sin 2x = 2\sin x\cos x,$$ the final expression for the derivative has the form ${y'\left( x \right) = 3 \cdot \frac{{\sin 2x}}{2}\left( {\sin x - \cos x} \right) } = {\frac{3}{2}\sin 2x\left( {\sin x - \cos x} \right).}$
Example 9
$y = \tan \frac{x}{2} - \cot \frac{x}{2}$
Solution.
The first step is obvious: ${y'\left( x \right) = {\left( {\tan \frac{x}{2} - \cot \frac{x}{2}} \right)^\prime } } = {{\left( {\tan \frac{x}{2}} \right)^\prime } - {\left( {\cot \frac{x}{2}} \right)^\prime }.}$ Since ${{\left( {\tan x} \right)^\prime } = \frac{1}{{{{\cos }^2}x}},}\;\; {{\left( {\cot x} \right)^\prime } = - \frac{1}{{{{\sin }^2}x}},}$ then using the chain rule, we find: ${y'\left( x \right) = \frac{1}{{{{\cos }^2}\frac{x}{2}}} \cdot {\left( {\frac{x}{2}} \right)^\prime } - \left( { - \frac{1}{{{{\sin }^2}\frac{x}{2}}}} \right) \cdot {\left( {\frac{x}{2}} \right)^\prime } } = {\frac{1}{{{{\cos }^2}\frac{x}{2}}} \cdot \frac{1}{2} + \frac{1}{{{\sin^2}\frac{x}{2}}} \cdot \frac{1}{2} } = {\frac{{{\sin^2}\frac{x}{2} + {{\cos }^2}\frac{x}{2}}}{{2\,{{\cos }^2}\frac{x}{2}{\sin^2}\frac{x}{2}}}.}$ To simplify this expression we use the trigonometric identities $${\sin^2}x + {\cos ^2}x = 1$$ and $$\sin x = 2\sin {\large\frac{x}{2}\normalsize} \cos {\large\frac{x}{2}\normalsize}.$$ This yields: ${y'\left( x \right) = \frac{1}{{2{{\cos }^2}\frac{x}{2}{\sin^2}\frac{x}{2}}} } = {\frac{{2 \cdot 1}}{{4{{\cos }^2}\frac{x}{2}{\sin^2}\frac{x}{2}}} } = {\frac{2}{{{{\left( {2\cos \frac{x}{2}\sin \frac{x}{2}} \right)}^2}}} } = {\frac{2}{{{{\sin }^2}x}}.}$
Example 10
Using the chain rule, derive the formula for the derivative of the inverse sine function.

Solution.
The function $$y\left( x \right) = \arcsin x$$ is defined on the open interval $$\left( { - 1,1} \right)$$. The sine of the inverse sine is equal $\sin \left( {\arcsin x} \right) = x.$ We take the derivative of both sides (the left-hand side is considered as a composite function). ${{\left[ {\sin \left( {\arcsin x} \right)} \right]^\prime } = x',}\;\; {\Rightarrow \cos \left( {\arcsin x} \right) \cdot {\left( {\arcsin x} \right)^\prime } = 1.}$ It follows that the derivative of inverse sine function is given by ${{\left( {\arcsin x} \right)^\prime } = \frac{1}{{\cos \left( {\arcsin x} \right)}} } = {\frac{1}{{\sqrt {1 - {{\left[ {\cos \left( {\arcsin x} \right)} \right]}^2}} }} } = {\frac{1}{{\sqrt {1 - {x^2}} }},}$ where $$- 1 < x < 1$$.

Example 11
$y = \arcsin \sqrt {1 - {x^2}}$
Solution.
By the chain rule, we have ${y'\left( x \right) = {\left( {\arcsin \sqrt {1 - {x^2}} } \right)^\prime } } = {\frac{1}{{\sqrt {1 - {{\left( {\sqrt {1 - {x^2}} } \right)}^2}} }} \cdot {\left( {\sqrt {1 - {x^2}} } \right)^\prime } } = {\frac{1}{{\sqrt {1 - {{\left( {\sqrt {1 - {x^2}} } \right)}^2}} }} \cdot \frac{1}{{2\sqrt {1 - {x^2}} }} \cdot {\left( {1 - {x^2}} \right)^\prime } } = {\frac{1}{{\sqrt {\cancel{1} - \cancel{1} + {x^2}} }} \cdot \frac{1}{{2\sqrt {1 - {x^2}} }} \cdot \left( { - 2x} \right) } = {\frac{{ - \cancel{2}x}}{{\cancel{2}\sqrt {{x^2}} \sqrt {1 - {x^2}} }} } = { - \frac{{x}}{{\left| x \right|\sqrt {1 - {x^2}} }}.}$ The ratio $$\large\frac{x}{{\left| x \right|}}\normalsize$$ is just a sign of the variable $$x$$ ($$\text{sign }x$$). Therefore, the final answer is written as ${{\left( {\arcsin \sqrt {1 - {x^2}} } \right)^\prime } } = { - \frac{{\text{sign }x}}{{\sqrt {1 - {x^2}} }}.}$
Example 12
$y = \frac{2}{{\sqrt 3 }}\text{arccot}\frac{{2x + 1}}{{\sqrt 3 }}$
Solution.
${y'\left( x \right) = {\left( {\frac{2}{{\sqrt 3 }}\text{arccot}\frac{{2x + 1}}{{\sqrt 3 }}} \right)^\prime } } = {\frac{2}{{\sqrt 3 }} \cdot \left( { - \frac{1}{{1 + {{\left( {\frac{{2x + 1}}{{\sqrt 3 }}} \right)}^2}}}} \right) \cdot {\left( {\frac{{2x + 1}}{{\sqrt 3 }}} \right)^\prime } } = { - \frac{2}{{\sqrt 3 }} \cdot \frac{1}{{1 + \frac{{4{x^2} + 4x + 1}}{3}}} \cdot \frac{2}{{\sqrt 3 }} } = { - \frac{4}{3} \cdot \frac{1}{{\frac{{3 + 4{x^2} + 4x + 1}}{3}}} } = { - \frac{4}{3} \cdot \frac{3}{{4{x^2} + 4x + 4}} } = { - \frac{{\cancel{4} \cdot \cancel{3}}}{{\cancel{3} \cdot \cancel{4}\left( {{x^2} + x + 1} \right)}} } = { - \frac{1}{{{x^2} + x + 1}}.}$
Example 13
$y = {\sec ^2}\frac{x}{2} + {\csc ^2}\frac{x}{2}$
Solution.
Applying the linear properties of the derivative and the chain rule, we obtain: ${y'\left( x \right) = {\left( {{{\sec }^2}\frac{x}{2} + {{\csc }^2}\frac{x}{2}} \right)^\prime } } = {{\left( {{{\sec }^2}\frac{x}{2}} \right)^\prime } + {\left( {{{\csc }^2}\frac{x}{2}} \right)^\prime } } = {2\sec \frac{x}{2} \cdot {\left( {\sec \frac{x}{2}} \right)^\prime } + 2\csc \frac{x}{2} \cdot {\left( {\csc\frac{x}{2}} \right)^\prime } } = {2\sec \frac{x}{2} \cdot \tan \frac{x}{2}\sec \frac{x}{2} \cdot {\left( {\frac{x}{2}} \right)^\prime } + 2\csc \frac{x}{2} \cdot \left( { - \cot \frac{x}{2}\csc\frac{x}{2}} \right) \cdot {\left( {\frac{x}{2}} \right)^\prime } } = {2\,{\sec ^2}\frac{x}{2}\tan \frac{x}{2} \cdot \frac{1}{2} - 2\,{\csc ^2}\frac{x}{2}\cot\frac{x}{2} \cdot \frac{1}{2} } = {{\sec ^2}\frac{x}{2}\tan \frac{x}{2} - {\csc ^2}\frac{x}{2}\cot\frac{x}{2}.}$ Simplify this expression by using known trigonometric identities: $y'\left( x \right) = {\sec ^2}\frac{x}{2}\tan \frac{x}{2} - {\csc ^2}\frac{x}{2}\cot\frac{x}{2} = \frac{1}{{{{\cos }^2}\frac{x}{2}}} \cdot \frac{{\sin \frac{x}{2}}}{{\cos\frac{x}{2}}} - \frac{1}{{{\sin^2}\frac{x}{2}}} \cdot \frac{{\cos\frac{x}{2}}}{{\sin\frac{x}{2}}} = \frac{{\sin \frac{x}{2}}}{{{\cos^3}\frac{x}{2}}} - \frac{{\cos\frac{x}{2}}}{{{\sin^3}\frac{x}{2}}} = \frac{{{\sin^4}\frac{x}{2} - {{\cos }^4}\frac{x}{2}}}{{{\cos^3}\frac{x}{2}{\sin^3}\frac{x}{2}}} = \frac{{\left( {{\sin^2}\frac{x}{2} - {{\cos }^2}\frac{x}{2}} \right)\left( {{\sin^2}\frac{x}{2} + {{\cos }^2}\frac{x}{2}} \right)}}{{\frac{1}{8}{{\left( {2\cos\frac{x}{2}\sin\frac{x}{2}} \right)}^3}}} = - \frac{{8\left( {{\sin^2}\frac{x}{2} - {{\cos }^2}\frac{x}{2}} \right) \cdot 1}}{{{{\sin }^3}x}} = - \frac{{8\cos x}}{{{{\sin }^3}x}} = - 8\frac{{\cos x}}{{\sin x}} \cdot \frac{1}{{{{\sin }^2}x}} = - 8\cot x\,{\csc ^2}x.$ In this example, the domain has the form: $$x \in \mathbb{R},\;x \ne \pi n,\;n \in \mathbb{Z}.$$

Example 14
$y = \ln \tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right)$
Solution.
It is assumed here that the values of $$x$$ satisfy the domain of the function, which is determined by solving the inequality: ${\tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right) > 0,\;\; }\kern0pt {\Rightarrow \pi n < \frac{x}{2} + \frac{\pi }{4} < \frac{\pi }{2} + \pi n,\;\; }\kern0pt {\Rightarrow 2\pi n < x + \frac{\pi }{2} < \pi + 2\pi n,\;\; }\kern0pt {{\Rightarrow - \frac{\pi }{2} + 2\pi n < x < \frac{\pi }{2} + 2\pi n}\;\;}\kern0pt {\text{or}\;\;\left| {x - 2\pi n} \right| < \frac{\pi }{2},\;n \in \mathbb{Z}.}$ The derivative of this function is ${y'\left( x \right) = {\left[ {\ln \tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right)} \right]^\prime } } = {\frac{1}{{\tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right)}} \cdot {\left[ {\tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right)} \right]^\prime } } = {\frac{1}{{\tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right)}} \cdot \frac{1}{{{\cos^2}\left( {\frac{x}{2} + \frac{\pi }{4}} \right)}} \cdot {\left( {\frac{x}{2} + \frac{\pi }{4}} \right)^\prime } } = {\frac{{\cos\left( {\frac{x}{2} + \frac{\pi }{4}} \right)}}{{\sin\left( {\frac{x}{2} + \frac{\pi }{4}} \right){\cos^2}\left( {\frac{x}{2} + \frac{\pi }{4}} \right)}} \cdot \frac{1}{2} } = {\frac{1}{{2\sin\left( {\frac{x}{2} + \frac{\pi }{4}} \right)\cos\left( {\frac{x}{2} + \frac{\pi }{4}} \right)}} } = {\frac{1}{{\sin\left( {x + \frac{\pi }{2}} \right)}} } = {\frac{1}{{\cos x}} } = {\sec x.}$
Example 15
$y = {\sin ^n}x\cos nx$
Solution.
First we differentiate as the product of two functions: ${y'\left( x \right) = {\left( {{{\sin }^n}x\cos nx} \right)^\prime } } = {{\left( {{{\sin }^n}x} \right)^\prime }\cos nx + {\sin ^n}x{\left( {\cos nx} \right)^\prime }.}$ Next, using the power rule and the chain rule, we have ${y'\left( x \right) = n{\sin ^{n - 1}}x \cdot {\left( {\sin x} \right)^\prime } \cdot \cos {nx} + {\sin ^n}x\left( { - \sin {nx}} \right) \cdot {\left( {nx} \right)^\prime } } = {n{\sin ^{n - 1}}x\cos x\cos nx - n{\sin ^n}x\sin nx } = {n{\sin ^{n - 1}}x\left( {\cos x\cos nx - \sin x\sin nx} \right).}$ Apply now the trigonometric identity $\cos \left( {\alpha + \beta } \right) = \cos \alpha \cos \beta - \sin \alpha \sin \beta .$ Then the derivative takes the following form: ${y'\left( x \right) = n{\sin ^{n - 1}}x\cos \left( {x + nx} \right) } = {n{\sin ^{n - 1}}x\cos \left[ {\left( {n + 1} \right)x} \right].}$
Example 16
Show that $${\large\frac{d}{{dx}}\normalsize} \left( {x\arcsin x + \sqrt {1 - {x^2}} } \right) = \arcsin x.$$

Solution.
Convert the left side as follows: ${\frac{d}{{dx}}\left( {x\arcsin x} \right) + \frac{d}{{dx}}\sqrt {1 - {x^2}} = \arcsin x,}\;\; {\Rightarrow x' \cdot \arcsin x + x \cdot {\left( {\arcsin x} \right)^\prime } + \frac{1}{{2\sqrt {1 - {x^2}} }} \cdot \left( {1 - {x^2}} \right) = \arcsin x.}$ Since $${\left( {\arcsin x} \right)^\prime } = {\large\frac{1}{{\sqrt {1 - {x^2}} }}\normalsize},$$ we have ${{1 \cdot \arcsin x + x \cdot \frac{1}{{\sqrt {1 - {x^2}} }} + \frac{{\left( { - 2x} \right)}}{{2\sqrt {1 - {x^2}} }} = \arcsin x,}\;\; }\kern0pt {{\Rightarrow \arcsin x + \cancel{\frac{x}{{\sqrt {1 - {x^2}} }}} - \cancel{\frac{x}{{\sqrt {1 - {x^2}} }}} = \arcsin x,}\;\; }\kern0pt {{\Rightarrow \arcsin x \equiv \arcsin x.}}$ Thus, the identity is proved.

Example 17
${y = {\left( {\tan x} \right)^{\cos x}},}\;\; {\text{where}\;\;0 < x < \frac{\pi }{2}.}$
Solution.
We represent this function as follows: ${y\left( x \right) = {\left( {\tan x} \right)^{\cos x}} } = {{\left( {{e^{\ln \tan x}}} \right)^{\cos x}} } = {{e^{\ln \tan x \cdot \cos x}}.}$ Note that here we always have $$\tan x < 0$$ when $$0 < x < {\large\frac{\pi }{2}\normalsize}.$$ Using the chain and product rules, we obtain: ${y'\left( x \right) = {\left( {{e^{\ln \tan x \cdot \cos x}}} \right)^\prime } } = {{e^{\ln \tan x \cdot \cos x}} \cdot {\left( {\ln \tan x \cdot \cos x} \right)^\prime } } = {{\left( {\tan x} \right)^{\cos x}}\left[ {{{\left( {\ln \tan x} \right)}^\prime } \cdot \cos x + \ln \tan x \cdot {{\left( {\cos x} \right)}^\prime }} \right] } = {{\left( {\tan x} \right)^{\cos x}}\left[ {\frac{1}{{\tan x}} \cdot {{\left( {\tan x} \right)}^\prime } \cdot \cos x + \ln \tan x \cdot \left( { -\sin x} \right)} \right] } = {{\left( {\tan x} \right)^{\cos x}}\left[ {\frac{1}{{\tan x}} \cdot \frac{{\cos x}}{{{{\cos }^2}x}} - \sin x \cdot \ln \tan x} \right] } = {{\left( {\tan x} \right)^{\cos x}}\left[ {\frac{1}{{\sin x}} - \sin x\ln \tan x} \right] } = {{\left( {\tan x} \right)^{\cos x}}\left[ {\frac{1}{{\sin x}} - \sin x\ln \tan x} \right]} = {{\left( {\tan x} \right)^{\cos x}}\left( {\csc x - \sin x\ln \tan x} \right).}$
Example 18
$y = \arcsin \frac{{1 - {x^2}}}{{1 + {x^2}}}$
Solution.
Note that that inverse sine function is defined on the interval $$\left[ { - 1,1} \right]$$. In our case, the condition that defines the allowed values of $$x$$ looks as follows: ${- 1 \le \frac{{1 - {x^2}}}{{1 + {x^2}}} \le 1,}\;\; {\Rightarrow - 1 - {x^2} \le 1 - {x^2} \le 1 + {x^2},}\;\; {\Rightarrow \left\{ {\begin{array}{*{20}{l}} { - 1 - {x^2} \le 1 - {x^2}}\\ {1 - {x^2} \le 1 + {x^2}} \end{array}} \right.,}\;\; {\Rightarrow \left\{ {\begin{array}{*{20}{l}} { - 1 \le 1}\\ { - {x^2} \le {x^2}} \end{array}} \right..}$ It is seen that these inequalities are satisfied for any real $$x.$$

We compute the derivative using the chain rule: ${y'\left( x \right) = {\left( {\arcsin \frac{{1 - {x^2}}}{{1 + {x^2}}}} \right)^\prime } } = {\frac{1}{{\sqrt {1 - {{\left( {\frac{{1 - {x^2}}}{{1 + {x^2}}}} \right)}^2}} }} \cdot {\left( {\frac{{1 - {x^2}}}{{1 + {x^2}}}} \right)^\prime } } = {\frac{1}{{\sqrt {\frac{{{{\left( {1 + {x^2}} \right)}^2} - {{\left( {1 - {x^2}} \right)}^2}}}{{{{\left( {1 + {x^2}} \right)}^2}}}} }} \cdot \frac{{{{\left( {1 - {x^2}} \right)}^\prime }\left( {1 + {x^2}} \right) - \left( {1 - {x^2}} \right){{\left( {1 + {x^2}} \right)}^\prime }}}{{{{\left( {1 + {x^2}} \right)}^2}}} } = {\frac{{1 + {x^2}}}{{\sqrt {{{\left( {1 + {x^2}} \right)}^2} - {{\left( {1 - {x^2}} \right)}^2}} }} \cdot \frac{{\left( {2x} \right) \cdot \left( {1 + {x^2}} \right) - \left( {1 - {x^2}} \right) \cdot 2x}}{{{{\left( {1 + {x^2}} \right)}^2}}} } = {\frac{{1 + {x^2}}}{{\sqrt {4{x^2}} }} \cdot \frac{{ - \color{blue}{2x} - \cancel{\color{red}{2{x^3}}} - \color{blue}{2x} + \cancel{\color{red}{2{x^3}}}}}{{{{\left( {1 + {x^2}} \right)}^2}}} } = {\frac{{ - \color{blue}{4x}}}{{\left( {1 + {x^2}} \right)\sqrt {4{x^2}} }} } = {\frac{{ - 2x}}{{\left( {1 + {x^2}} \right)\left| x \right|}}.}$ Take into account that the ratio $$\large\frac{x}{{\left| x \right|}}\normalsize$$ is equal to $$\pm 1$$ depending on the sign of the variable $$x,$$ i.e. $\frac{x}{{\left| x \right|}} = \text{sign }x\;\left( {x \ne 0} \right).$ Then the derivative can be written as ${y'\left( x \right) = {\left( {\arcsin \frac{{1 - {x^2}}}{{1 + {x^2}}}} \right)^\prime } } = { - \frac{{2\text{sign }x}}{{1 + {x^2}}}\,\left( {x \ne 0} \right).}$
Example 19
$y = \sin \left( {{{\cos }^2}x} \right) \cdot \cos \left( {{{\sin }^2}x} \right)$
Solution.
By the product rule, ${y'\left( x \right) = {\left[ {\sin \left( {{{\cos }^2}x} \right) \cdot \cos \left( {{{\sin }^2}x} \right)} \right]^\prime } } = {{\left[ {\sin \left( {{{\cos }^2}x} \right)} \right]^\prime }\cos \left( {{{\sin }^2}x} \right) + \sin \left( {{{\cos }^2}x} \right){\left[ {\cos \left( {{{\sin }^2}x} \right)} \right]^\prime }.}$ Next, differentiating as a composite function and simplifying, we obtain: ${y'\left( x \right) = \cos \left( {{{\cos }^2}x} \right) \cdot {\left( {{{\cos }^2}x} \right)^\prime } \cdot \cos \left( {{{\sin }^2}x} \right) + \sin \left( {{{\cos }^2}x} \right) \cdot \left( { - \sin\left( {{{\sin }^2}x} \right)} \right) \cdot {\left( {{{\sin }^2}x} \right)^\prime } } = {\cos \left( {{{\cos }^2}x} \right) \cdot 2\cos x \cdot {\left( {\cos x} \right)^\prime } \cdot \cos \left( {{{\sin }^2}x} \right) + \sin \left( {{{\cos }^2}x} \right) \cdot \left( { - \sin\left( {{{\sin }^2}x} \right)} \right) \cdot 2\sin x \cdot {\left( {\sin x} \right)^\prime } } = {2\cos \left( {{{\cos }^2}x} \right)\cos x\left( { - \sin x} \right)\cos \left( {{{\sin }^2}x} \right) + 2\sin \left( {{{\cos }^2}x} \right)\left( { - \sin\left( {{{\sin }^2}x} \right)} \right)\sin x\cos x } = {2\sin x\cos x\left[ {\cos \left( {{{\cos }^2}x} \right)\cos \left( {{\sin^2}x} \right) + \sin \left( {{{\cos }^2}x} \right)\sin\left( {{\sin^2}x} \right)} \right].}$ Apply the trigonometric identities ${\sin 2\alpha = 2\sin \alpha \cos \alpha \;\;\text{and}}\;\; {\cos \left( {\alpha - \beta } \right) = \cos \alpha \cos \beta + \sin \alpha \sin \beta .}$ Then the derivative can be written as $y'\left( x \right) = - 2\sin 2x\cos \left( {{{\cos }^2}x - {{\sin }^2}x} \right).$ The argument $$y$$ of the cosine in square brackets can be further simplified by the double angle formula: $\cos 2x = {\cos ^2}x - {\sin ^2}x.$ As a result, we obtain the following expression for the derivative: $y'\left( x \right) = - 2\sin 2x\cos \left( {\cos 2x} \right).$
Example 20
$y = \frac{1}{x}\text{arccsc}\frac{1}{x}$
Solution.
We start calculating the derivative by the product rule: ${y'\left( x \right) = {\left( {\frac{1}{x}\text{arccsc} \frac{1}{x}} \right)^\prime } } = {{\left( {\frac{1}{x}} \right)^\prime }\text{arccsc} \frac{1}{x} + \frac{1}{x}{\left( {\text{arccsc} \frac{1}{x}} \right)^\prime }.}$ Using the formula for the derivative of the inverse cosecant function ${\left( {\text{arccsc}\,z} \right)^\prime } = - \frac{1}{{\left| z \right|\sqrt {{z^2} - 1} }}$ and the chain rule, we have ${y'\left( x \right) = - \frac{1}{{{x^2}}}\text{arccsc}\frac{1}{x} } {- \frac{1}{x} \cdot \frac{1}{{\frac{1}{{\left| x \right|}}\sqrt {{{\left( {\frac{1}{x}} \right)}^2} - 1} }} \cdot {\left( {\frac{1}{x}} \right)^\prime }.}$ Simplify this expression: ${y'\left( x \right) = - \frac{1}{{{x^2}}}\text{arccsc} \frac{1}{x} - \frac{{\left| x \right|}}{{x\sqrt {{{\left( {\frac{1}{x}} \right)}^2} - 1} }} \cdot \left( { - \frac{1}{{{x^2}}}} \right) } = {\frac{{\left| x \right|}}{{{x^3}\sqrt {{{\left( {\frac{1}{x}} \right)}^2} - 1} }} - \frac{1}{{{x^2}}}\text{arccsc} \frac{1}{x} } = {\frac{{\left| x \right|}}{{{x^3}\sqrt {\frac{{1 - {x^2}}}{{{x^2}}}} }} - \frac{1}{{{x^2}}}\text{arccsc} \frac{1}{x} } = {\frac{{{{\left| x \right|}^2}}}{{{x^3}\sqrt {1 - {x^2}} }} - \frac{1}{{{x^2}}}\text{arccsc} \frac{1}{x} } = {\frac{1}{{x\sqrt {1 - {x^2}} }} - \frac{1}{{{x^2}}}\text{arccsc} \frac{1}{x}.}$ The domain of the given function and its derivative is of the form: $$x \in \left( { - 1,0} \right) \cup \left( {0,1} \right).$$