One of the most important types of motion in physics is simple harmonic motion, which is associated with such systems as an object with mass oscillating on a spring. Simple harmonic motion can be described by using either sine or cosine functions. In this section we expand our knowledge of derivative formulas to include derivatives of these and other trigonometric functions. We begin with the derivatives of the sine and cosine functions and then use them to obtain formulas for the derivatives of the remaining four trigonometric functions. Being able to calculate the derivatives of the sine and cosine functions will enable us to find the velocity and acceleration of simple harmonic motion.
Derivatives of the Sine and Cosine Functions
We begin our exploration of the derivative for the sine function by using the formula to make a reasonable guess at its derivative. Recall that for a function \(f(x),\)
\[f′(x)=\lim_{h→0}\dfrac{f(x+h)−f(x)}{h}.\]
Consequently, for values of \(h\) very close to 0,
\[f′(x)≈\dfrac{f(x+h)−f(x)}{h}.\]
We see that by using \(h=0.01\),
\[\dfrac{d}{dx}(\sin x)≈\dfrac{\sin (x+0.01)−\sin x}{0.01}\]
By setting
\[D(x)=\dfrac{\sin (x+0.01)−\sin x}{0.01}\]
and using a graphing utility, we can get a graph of an approximation to the derivative of \(\sin x\) (Figure).
Figure \(\PageIndex{1}\): The graph of the function \(D(x)\) looks a lot like a cosine curve.
Upon inspection, the graph of \(D(x)\) appears to be very close to the graph of the cosine function. Indeed, we will show that
\[\dfrac{d}{dx}(\sin x)=\cos x.\]
If we were to follow the same steps to approximate the derivative of the cosine function, we would find that
\[\dfrac{d}{dx}(\cos x)=−\sin x.\]
The Derivatives of sin x and cos x
The derivative of the sine function is the cosine and the derivative of the cosine function is the negative sine.
\[\dfrac{d}{dx}(\sin x)=\cos x\]
\[\dfrac{d}{dx}(\cos x)=−\sin x\]
Proof
Because the proofs for \(\dfrac{d}{dx}(\sin x)=\cos x\) and \(\dfrac{d}{dx}(\cos x)=−\sin x\) use similar techniques, we provide only the proof for \(\dfrac{d}{dx}(\sin x)=\cos x.\) Before beginning, recall two important trigonometric limits we learned in Introduction to Limits:
\(\lim_{h→0}\dfrac{sinh}{h}=1\) and \(\lim_{h→0}\dfrac{coshh−1}{h}=0\).
The graphs of \(y=\dfrac{(sinh)}{h}\) and \(y=\dfrac{(cosh−1)}{h}\) are shown in Figure.
Figure \(\PageIndex{2}\): These graphs show two important limits needed to establish the derivative formulas for the sine and cosine functions.
We also recall the following trigonometric identity for the sine of the sum of two angles:
\[\sin (x+h)=\sin x\cosh+\cos x\sinh.\]
Now that we have gathered all the necessary equations and identities, we proceed with the proof.
\(\dfrac{d}{dx}\sin x=\lim_{h→0}\dfrac{\sin (x+h)−\sin x}{h}\) |
Apply the definition of the derivative. |
\(=\lim_{h→0}\dfrac{\sin xcosh+\cos xsinh−\sin x}{h}\) |
Use trig identity for the sine of the sum of two angles. |
\(=\lim_{h→0}\dfrac{(\sin xcosh−\sin x}{h}+\dfrac{\cos xsinh}{h})\) |
Regroup. |
\(=limh→0(\sin x(\dfrac{\cos xh−1}{h})+\dfrac{\cos xsinh}{h}))\) |
Factor out \(\sin x\) and \(\cos x\). |
\(=\sin x(0)+\cos x(1)\) |
Apply trig limit formulas. |
\(=\cos x\) |
Simplify. |
□
Figure shows the relationship between the graph of \(f(x)=\sin x\) and its derivative \(f′(x)=\cos x\). Notice that at the points where \(f(x)=\sin x\) has a horizontal tangent, its derivative \(f′(x)=\cos x\) takes on the value zero. We also see that where f\((x)=\sin x\) is increasing, \(f′(x)=\cos x>0\) and where \(f(x)=\sin x\) is decreasing, \(f′(x)=\cos x<0.\)
Figure \(\PageIndex{3}\): Where \(f(x)\) has a maximum or a minimum, \(f'(x)=0\) that is, \(f'(x)=0\) where \(f(x)\) has a horizontal tangent. These points are noted with dots on the graphs
Example \(\PageIndex{1}\): Differentiating a Function Containing sin x
Find the derivative of \(f(x)=5x^3\sin x\).
Solution
Using the product rule, we have
\(f'(x)=\dfrac{d}{dx}(5x^3)⋅\sin x+\dfrac{d}{dx}(\sin x)⋅5x^3=15x^2⋅\sin x+\cos x⋅5x^3.\)
After simplifying, we obtain
\(f′(x)=15x^2\sin x+5x^3\cos x.\)
Exercise \(\PageIndex{1}\)
Find the derivative of \[f(x)=\sin x\cos x.\]
- Hint
-
Don’t forget to use the product rule.
- Answer
-
\[f′(x)=\cos^2x−\sin^2x\]
Example \(\PageIndex{2}\): Finding the Derivative of a Function Containing cos x
Find the derivative of \(g(x)=\dfrac{\cos x}{4x^2}\).
Solution
By applying the quotient rule, we have
\[g′(x)=\dfrac{(−\sin x)4x^2−8x(\cos x)}{(4x^2)^2}.\]
Simplifying, we obtain
\[g′(x)=\dfrac{−4x^2\sin x−8x\cos x}{16x^4}=\dfrac{−x\sin x−2\cos x}{4x^3}.\]
Exercise \(\PageIndex{2}\)
Find the derivative of \[f(x)=\dfrac{x}{\cos x}.\]
- Hint
-
Use the quotient rule.
- Answer
-
\[\dfrac{\cos x+x\sin x}{\cos^2x}\]
Example \(\PageIndex{3}\): An Application to Velocity
A particle moves along a coordinate axis in such a way that its position at time \(t\) is given by \(s(t)=2sint−t\) for \(0≤t≤2π.\) At what times is the particle at rest?
Solution
To determine when the particle is at rest, set \(s′(t)=v(t)=0.\) Begin by finding \(s′(t).\) We obtain
\[s′(t)=2 \cos t−1,\]
so we must solve
\[2 \cos t−1=0\) for \(0≤t≤2π.\]
The solutions to this equation are \(t=\dfrac{π}{3}\) and \(t=\dfrac{5π}{3}\). Thus the particle is at rest at times \(t=\dfrac{π}{3}\) and \(t=\dfrac{5π}{3}\).6)
Exercise \(\PageIndex{3}\)
A particle moves along a coordinate axis. Its position at time \(t\) is given by \(s(t)=\sqrt{3}t+2cost\) for \(0≤t≤2π.\) At what times is the particle at rest?
- Hint
-
Use the previous example as a guide.
- Answer
-
\[t=\dfrac{π}{3},t=\dfrac{2π}{3}\]
Derivatives of Other Trigonometric Functions
Since the remaining four trigonometric functions may be expressed as quotients involving sine, cosine, or both, we can use the quotient rule to find formulas for their derivatives.
Example \(\PageIndex{4}\): The Derivative of the Tangent Function
Find the derivative of \(f(x)=\tan x.\)
Solution
Start by expressing \(\tan x \) as the quotient of \(\sin x\) and \(\cos x\):
\(f(x)=\tan x =\dfrac{\sin x}{\cos x}\).
Now apply the quotient rule to obtain
\(f′(x)=\dfrac{\cos x\cos x−(−\sin x)\sin x}{(\cos x)^2}\).
Simplifying, we obtain
\[f′(x)=\dfrac{\cos^2x+sin^2x}{\cos^2x}.\]
Recognizing that \(\cos^2x+\sin^2x=1,\) by the Pythagorean theorem, we now have
\[f′(x)=\dfrac{1}{\cos^2x}\]
Finally, use the identity \(sec x=\dfrac{1}{\cos x}\) to obtain
\(f′(x)=\text{sec}^2x\).
Exercise \(\PageIndex{4}\)
Find the derivative of \[f(x)=\cot x .\]
- Hint
-
Rewrite \(\cot x \) as \(\dfrac{\cos x}{\sin x}\) and use the quotient rule.
- Answer
-
\[f′(x)=−csc^2x\]
The derivatives of the remaining trigonometric functions may be obtained by using similar techniques. We provide these formulas in the following theorem.
Derivatives of \(\tan x\), \(\cot x\), \(secx\), and \(cscx\)
The derivatives of the remaining trigonometric functions are as follows:
\[\dfrac{d}{dx}(\tan x )=\sec^2x\]
\[\dfrac{d}{dx}(\cot x )=−\csc^2x\]
\[\dfrac{d}{dx}(secx)=\sec x \tan x\]
\[\dfrac{d}{dx}(cscx)=−\csc x \cot x.\]
Example \(\PageIndex{5}\): Finding the Equation of a Tangent Line
Find the equation of a line tangent to the graph of \(f(x)=\cot x \) at \(x=\dfrac{π}{4}\).
Solution
To find the equation of the tangent line, we need a point and a slope at that point. To find the point, compute
\(f(\dfrac{π}{4})=cot\dfrac{π}{4}=1\).
Thus the tangent line passes through the point \((\dfrac{π}{4},1)\). Next, find the slope by finding the derivative of \(f(x)=\cot x \) and evaluating it at \(\dfrac{π}{4}\):
\(f′(x)=−csc^2x\) and \(f′(\dfrac{π}{4})=−csc^2(\dfrac{π}{4})=−2\).
Using the point-slope equation of the line, we obtain
\(y−1=−2(x−\dfrac{π}{4})\)
or equivalently,
\(y=−2x+1+\dfrac{π}{2}\).
Example \(\PageIndex{6}\): Finding the Derivative of Trigonometric Functions
Find the derivative of \(f(x)=cscx+x\tan x .\)
Solution
To find this derivative, we must use both the sum rule and the product rule. Using the sum rule, we find
\(f′(x)=\dfrac{d}{dx}(cscx)+\dfrac{d}{dx}(x\tan x )\).
In the first term, \(\dfrac{d}{dx}(cscx)=−cscx\cot x ,\) and by applying the product rule to the second term we obtain
\(\dfrac{d}{dx}(x\tan x )=(1)(\tan x )+(sec^2x)(x)\).
Therefore, we have
\(f′(x)=−cscx\cot x +\tan x +xsec^2x\).
Exercise \(\PageIndex{5}\)
Find the derivative of \(f(x)=2\tan x −3\cot x .\)
- Hint
-
Use the rule for differentiating a constant multiple and the rule for differentiating a difference of two functions.\(f′(x)=2sec^2x+3csc^2x\)
- Answer
-
\(f′(x)=2sec^2x+3csc^2x\)
Exercise \(\PageIndex{6}\)
Find the slope of the line tangent to the graph of \(f(x)=\tan x \) at \(x=\dfrac{π}{6}\).
- Hint
-
Evaluate the derivative at \(x=\dfrac{π}{6}\).
- Answer
-
\(\dfrac{4}{3}\)
Key Equations
- Derivative of sine function
\(\dfrac{d}{dx}(\sin x)=\cos x\)
- Derivative of cosine function
\(\dfrac{d}{dx}(\cos x)=−\sin x\)
- Derivative of tangent function
\(\dfrac{d}{dx}(\tan x )=sec^2x\)
- Derivative of cotangent function
\(\dfrac{d}{dx}(\cot x )=−csc^2x\)
- Derivative of secant function
\(\dfrac{d}{dx}(secx)=secx\tan x \)
- Derivative of cosecant function
\(\dfrac{d}{dx}(cscx)=−cscx\cot x \)