Derivatives of Trigonometric Functions

Perhaps, well, do you know that the derivative of sine is cosine? In this article, I go through the derivatives of the six trigonometric functions. One-by-one, we see how to use the product rule and the quotient rule to figure out these derivatives. But I start it all with the derivative of the sine function using the definition of the derivative.

Formulas for finding the derivative of the six trigonometric functions are given. We assume that the trigonometric functions are functions of real numbers (angles measured in radians) because the trigonometric differentiation formulas rely on limit formulas that become more complicated if the degree measurement is used instead of radian measure.

Derivative Formulas

Theorem. The trigonometric functions sine, cosine, tangent, cotangent, cosecant, and secant are all differentiable functions on their domain and their derivative functions are:

$\qquad \displaystyle \frac{d}{dx}\left( \sin x \right) =\cos x$

$\qquad \displaystyle \frac{d}{dx}\left(\cos x \right)=-\sin x$

$\qquad \displaystyle \frac{d}{dx}\left(\tan x \right)=\sec ^2x$

$\qquad \displaystyle \frac{d}{dx}\left(\cot x \right)=-\csc ^2x$

$\qquad \displaystyle \frac{d}{dx}\left(\sec x \right)=\sec x \tan x$

$\qquad \displaystyle \frac{d}{dx}\left( \csc x \right)= – \csc x \cot x $

Proof. For the derivative of the cosine function, we use the formula \begin{equation} \cos (A+B)=\cos A \cos B-\sin A \sin B \end{equation} along with the definition of the derivative: \begin{align*} \frac{d}{dx} \left(\cos x \right) & =\lim_{h\to 0}\frac{\cos (x+h)-\cos x}{h} \\ & =\lim_{h\to 0}\frac{\cos x \cos h-\sin x \sin h-\cos x}{h} \\ & =\lim_{h\to 0}\frac{\cos x(\cos h-1) -\sin x \sin h}{h} \\ & =\lim_{h\to 0}\frac{\cos x(\cos h-1)}{h}+\lim_{h\to 0}\frac{ -\sin x \sin h}{h} \\ & =(\cos x)\lim_{h\to 0}\frac{(\cos h-1)}{h}-\sin (x)\lim_{h\to 0}\frac{ \sin h}{h} \\ & =(\cos x)(0)-(\sin x)(1) \\ & =-\sin x. \end{align*}

For the derivative of the sine function, we use the formula \begin{equation} \sin (A+B)=\sin A \cos B+\cos A \sin B \end{equation} along with the definition of the derivative: \begin{align*} \frac{d}{dx} \left( \sin x \right) & =\lim_{h\to 0}\frac{\sin (x+h)-\sin x}{h} \\ & =\lim_{h\to 0}\frac{\sin x \cos h+\cos x \sin h-\sin x}{h} \\ &=\lim_{h\to 0}\frac{\sin x(\cos h-1) +\cos x \sin h}{h} \\ & = \lim_{h\to 0}\frac{\sin x(\cos h-1)}{h}+\lim_{h\to 0}\frac{ \cos x \sin h}{h} \\ &=(\sin x)\lim_{h\to 0}\frac{(\cos h-1)}{h}+\cos (x)\lim_{h\to 0}\frac{ \sin h}{h} \\ &=(\sin x)(0)+\cos (x)(1)\\ &=\cos x. \end{align*}

For the derivative of the tangent function, we use the formula \begin{equation} \tan x= \frac{\sin x}{\cos x} \end{equation} along with the quotient rule: \begin{align*} \frac{d}{dx} \left(\tan x \right) & =\frac{(\cos x)(\cos x)-\sin x(-\sin x)}{\cos ^2x} =\frac{\cos ^2 x+\sin ^2x}{\cos ^2x}\\ & =\sec ^2x \end{align*}

For the derivative of the cotangent function, we use the formula \begin{equation} \cot x=\frac{\cos x}{\sin x} \end{equation} along with the quotient rule: \begin{align*} \frac{d}{dx}\cot x & =\frac{\sin x(-\sin x)-(\cos x)(\cos x)}{\sin ^2 x} \\ & =-\csc ^2x. \end{align*}

For the derivative of the secant function, we use the formula \begin{equation} \sec x=\frac{1}{\cos x} \end{equation} along with the quotient rule: \begin{equation} \frac{d}{dx}\sec x=\frac{(\cos x)(0)-1(-\sin x)}{\cos ^2x}=\frac{\sin x}{\cos ^2x}=\sec x \tan x. \end{equation}

For the derivative of the cosecant function, we use the formula \begin{equation} \csc x=\frac{1}{\sin x} \end{equation} along with the quotient rule: \begin{align*} \frac{d}{dx}\csc x & =\frac{(\sin x)(0)-1(\cos x)}{\sin ^2x} \\ & =-\csc x \cot x. \end{align*} as desired.

Derivatives of Trigonometric Functions and Simplification

Since the trigonometric functions are differentiable functions on their domains they are also continuous functions on their domain.

Example. Find the derivative of the function \begin{equation} g(x) = \frac{x^2+\tan x}{3x+2 \tan x}. \end{equation}

Solution. For the function $g$ we use the quotient rule and the derivative rules for sine and cosine, we determine, \begin{equation} g'(x)=\frac{(3x+2 \tan x) \left(2x+\sec ^2x\right)-\left(x^2+\tan x\right)\left(3+2\sec ^2x\right)}{3x+2 \tan x} \end{equation} as needed.

Example. Find the derivative of the function \begin{equation} f(x) = \frac{\sin x + \cos x}{\sin x-\cos x}. \end{equation}

Solution. For the function $f$ we use the quotient rule, derivative rules for sine and cosine, and a few trigonometric identities, we determine, \begin{equation} f'(x)=\frac{(\sin x-\cos x)(\cos x-\sin x)-(\sin x+\cos x)(\cos x+\sin x)}{(\sin x-\cos x)^2}. \end{equation} After expanding and simplifying, $$ f'(x)=\frac{-2}{1-\sin 2x} $$ as desired.

Exercises on Derivatives of Trigonometric Functions

Exercise. Find the derivative of each of the following.

$(1)\quad \displaystyle y=-10x+3 \cos x$

$(2)\quad \displaystyle y=\csc x-4\sqrt{x}+7$

$(3)\quad \displaystyle y=(\sin x+\cos x)\sec x$

$(4)\quad \displaystyle y=\frac{4}{\cos x}+\frac{1}{\tan x}$

$(5)\quad \displaystyle y=x^2 \cos x-2 x \sin x-2 \cos x$

$(6)\quad \displaystyle s=\frac{1+\csc t}{1-\csc t}$

$(7)\quad \displaystyle r=\theta \sin \theta +\cos \theta $

$(8)\quad \displaystyle p=(1+\csc q) \cos q$

Exercise. Is there a value of $b$ that will make $$ g(x)= \begin{cases} x+b & x<0 \\ \cos x & x\geq 0\end{cases} $$ continuous at $x=0?$ Differentiable at $x=0?$ Give reasons for your answer.

Exercise. Find an equation of the tangent line to $y = 3 \tan x – 2 \csc x$ at $x=\frac{\pi}{3}.$

Exercise. Show that the function $$ f(x) = \begin{cases} \displaystyle x^3\sin{\frac{1}{x}}&\text{if } x\neq 0 \\ 0 & \text{if } x=0 \end{cases} $$ has a continuous first derivative.

Exercise. (a) Sketch the graph of the curve $y=\sin x$ on the interval $-\frac{3\pi }{2} \leq x\leq 2\pi $ and their tangents at the $x$ values of $x=-\pi,$ $x=0,$ and $x=3\pi /2.$ (b) Sketch the graph of the curve $y=1+\cos x$ on the interval $-\frac{3\pi }{2}\leq x\leq 2\pi $ and their tangents at the $x$ values of $x=-\pi /3$ and $x=3\pi /2.$

Exercise. Find all points on the curve $y=\cot x,$ $0<x<\pi ,$ where the tangent line is parallel to the line $y=-x.$ Sketch the curve and tangent(s) together, labeling each with its equation.

Exercise. Find an equation for the tangent to the curve $y=1+\sqrt{2}\csc x+\cot x$ at the point $\left(\frac{\pi }{4},4\right)$ and find an equation for the horizontal tangent line.

Exercise. Suppose the function given by $s=\sin t+\cos t$ represents the position of a body moving on a coordinate line ($s$ in meters, $t$ in seconds). Find the body’s velocity, speed, and acceleration at time $t=\pi /4 \sec .$

David A. Smith at Dave4Math

David Smith (Dave) has a B.S. and M.S. in Mathematics and has enjoyed teaching precalculus, calculus, linear algebra, and number theory at both the junior college and university levels for over 20 years. David is the founder and CEO of Dave4Math.

Leave a Comment