# Derivatives of Trig Functions

Lesson Features »

Lesson Priority: VIP Knowledge

Objectives
• Learn how to take the derivative of any of the six trig functions
• Use derivatives of trig functions alongside derivative rules we've already seen
Lesson Description

Here we will learn the knowledge and tricks to take the derivative of sin, cos, and the other four trig functions. Note: this lesson covers the basics. If you are looking for more challenging practice problems involving trig functions, check out the upcoming lessons on Differentiation Techniques.

Practice Problems

Practice problems and worksheet coming soon!

## Trig Slope Relationships

In Pre-Calculus, we spent a LOT of time building algebraic and conceptual bridges among the six trig functions. We even found ways to build any of the six functions very fundamentally out of just sine and cosine, which may beg the question why we don't simply just do everything with sine and cosine. Beside some of the coincidental uses for all six trig functions, their existence is better justified with Calculus. As we're about to see, we'll be able to take the derivative of each of them very quickly, because their slopes are, for the most part, closely related.

## Sine and Cosine

While we will want to know and use all six trig functions at our leisure throughout a Calculus course, I would be lying if I said we use them all equally frequently. As was the case in our study of classic trigonometry, we'll find ourselves working with sine and cosine much more often than the others.Here are the derivatives that you need to know (i.e. memorize).
Define: Derivatives of sin and cos$$\frac{d}{dx} \, \sin(x) = \cos(x)$$$$\frac{d}{dx} \, \cos(x) = -\sin(x)$$
It's apparent right off the bat that there is a danger for mixing up details here - these results are very similar. Practice and care are the best way to avoid accidentally writing the wrong function, or forgetting a minus sign. When we see all six trig function derivatives together, the global pattern we'll see will also hopefully help you keep it straight.Take a look at the graph of $f(x) = \sin(x)$.Recall also that we can refer to a function's derivative function as its "slope function". Now take a look at the same graph but with some strategic tangent lines drawn in:By eyeballing it, we can see that the slope of $f(x)$ at $0$ looks to be $1$, the slope at $\pi/2$ looks to be $0$, the slope at $\pi$ seems to be $-1$, and so on. It is true that the function $g(x) = \cos(x)$ also has values $(0,1)$, $(\pi/2,0)$, $(\pi, -1)$, etc. In other words, the slopes of the sine function align with the values of the cosine function, which is analogous to the relationship between $f(x)$ and $f'(x)$ (the slopes of $f(x)$ are the values of $f'(x)$). This certainly doesn't count as proof, but it does align with the assertion that the derivative of the sine function appears to be the cosine function.We could actually prove this fact using the proper limit definition of the derivative. At the end of this lesson, in the section "Put It To The Test", we will be asked to do just that. As a preview, to prove this fact, we will set up a difference quotient with $f(x) = \sin(x)$ and $f(x+h) = \sin(x+h)$, and obtain the desired result by using the trig identity $\sin(A+B) = \sin(A)\cos(B) + \sin(B)\cos(A)$.In terms of big picture knowledge, neither the non-rigorous graphical approach nor the rigorous limit definition approach is very important to you. You'll use these two derivatives so frequently that you'll memorize them without trying.

## The Real Mc-Co

Now we'll look at the derivative of the other four trig functions, and we'll see why the nomenclature of the trig functions is the way it is (the three distinct names with the other three functions having the same name but with "co" in front).Presented without rigorous proof, here are all six trig function derivatives:
Definition:$$\begin{array}{ll} \frac{d}{dx} \, \sin(x) & = \cos(x) \\ \frac{d}{dx} \, \cos(x) & = -\sin(x) \\ \frac{d}{dx} \, \tan(x) & = \sec^2(x) \\ \frac{d}{dx} \, \cot(x) & = -\csc^2(x) \\ \frac{d}{dx} \, \sec(x) & = \sec(x)\tan(x) \\ \frac{d}{dx} \, \csc(x) & = -\csc(x)\cot(x) \end{array}$$
The bad news is that you have to memorize these. The good news is that there is a strong pattern. Take a look at these, lined up so that each function on the left is across from it's "co" brother on the right (sine across from CO-sine, tangent across from CO-tangent, and secant across from CO-secant).$$\begin{array}{ll} \frac{d}{dx} \, \sin(x) = \cos(x) & \frac{d}{dx} \, \cos(x) = -\sin(x) \\ \frac{d}{dx} \, \tan(x) = \sec^2(x) & \frac{d}{dx} \, \cot(x) = -\csc^2(x) \\ \frac{d}{dx} \, \sec(x) = \sec(x)\tan(x) & \frac{d}{dx} \, \csc(x) = -\csc(x)\cot(x) \end{array}$$Each expression on the left is identical to the expression on the right if you make two swaps:1) change all functions to their "co" functions2) make the right side negativeTherefore, if you look at these six facts while wearing the right lens, you're really looking at three facts to memorize. I refer to this pattern as the cofunction derivative relationship rule, and it works for all purely trigonometric derivaties (that is, taking the derivative of a "cofunction" expression will yield the same answer as the derivative of the original function, but negative and with the opposite cofunctions).

Example 1The derivative of $f(x) = \tan^3(x)$ is $3\tan^2(x) \sec^2(x)$. Use the cofunction derivative relationship rule to determine the derivative of $g(x) = \cot^3(x)$.$\blacktriangleright$ The cofunction derivative relationship rule says that the derivative of the "co" version of any trig expression will be the same as the derivative of the original trig expression, but with opposite cofunctions instead, and a negative sign in front. Therefore,$$\frac{d}{dx} \, \tan^3(x) = 3\tan^2(x) \sec^2(x)$$$$\longrightarrow \frac{d}{dx} \, \cot^3(x) = -3\cot^2(x) \csc^2(x)$$
You Should Know
Many students ask me in Pre-Calculus why the trig functions are named the way they are, given that the only relationships we learn are ones that do not relate the functions to their "co" brothers. For example, a relationship we learn back then is that cosecant is the reciprocal of the sine, but nothing about the relationship between cosecant and secant. The reality is that these functions are named aptly due to their Calculus-based relationship of slopes - the derivative of the secant is of the same form as the derivative of the cosecant, and their expressions are "co" brothers of one another.
It goes without saying that anything you've learned up to this point about derivatives in general is fair game now for these six trig functions. Specifically, we know that sums, differences, and constant multipliers will not affect our work. For example, since we know$$\frac{d}{dx} \, \sec(x) = \sec(x) \tan(x)$$it follows that$$\frac{d}{dx} \, 4\sec(x) = 4\sec(x) \tan(x)$$Similarly, we can work with multiple terms at once, which by now should be more matter-of-fact than surprising to you.$$\frac{d}{dx} \, \sin(x) = \cos(x)$$$$\frac{d}{dx} \, \cos(x) = -\sin(x)$$$$\Rightarrow \frac{d}{dx} \, \left[ \sin(x) + \cos(x) \right] = \cos(x) - \sin(x)$$It is also fair game at this point to be asked to find tangent or normal lines to functions that involve basic trig functions. We'll see an example of this in the lesson examples below.

## Put It To The Test

There are many more uses of trigonometric function derivatives once you learn the Product Rule, Quotient Rule, and Chain Rule. However, we should be prepared to spit out our six memorized facts, and understand some of the conceptual pieces that go along with this topic, such as the graphical implications, and generic derivative related tasks, such as finding the equation of a tangent or normal line.
Pro Tip
We use this knowledge so very incredibly frequently in Calculus. At the end of the day, however the content of this lesson comes down to knowing six facts. But even though there aren't too many unique ways to explicitly test this material right now, it will be constantly integrated into upcoming topics.

Example 2Memorize all six trig function derivatives and fill in the results below.$$\frac{d}{dx} \, \sin(x) =$$$$\frac{d}{dx} \, \cos(x) =$$$$\frac{d}{dx} \, \tan(x) =$$$$\frac{d}{dx} \, \cot(x) =$$$$\frac{d}{dx} \, \sec(x) =$$$$\frac{d}{dx} \, \csc(x) =$$
Show solution
$\blacktriangleright$ There is no calculation involved in this question - you just have to know them. Try and memorize them using the "co" relationship trick:$$\begin{array}{ll} \frac{d}{dx} \, \sin(x) & = \cos(x) \\ \frac{d}{dx} \, \cos(x) & = -\sin(x) \\ \frac{d}{dx} \, \tan(x) & = \sec^2(x) \\ \frac{d}{dx} \, \cot(x) & = -\csc^2(x) \\ \frac{d}{dx} \, \sec(x) & = \sec(x)\tan(x) \\ \frac{d}{dx} \, \csc(x) & = -\csc(x)\cot(x) \end{array}$$

Example 3Prove $\frac{d}{dx} \sin(x) = \cos(x)$ using the limit definition of the derivative, and the given facts that$$\lim_{x \to 0} \frac{\sin(x)}{x} = 1$$$$\lim_{x \to 0} \frac{\cos(x)-1}{x} = 0$$
Show solution
$\blacktriangleright$ Let $f(x) = \sin(x)$, such that $f(x+h) = \sin(x+h)$. We will set up a difference quotient and take the limit.$$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$$$=\lim_{h \to 0} \frac{\sin(x+h) - \sin(x)}{h}$$Recall that $\sin(A+B) = \sin(A)\cos(B) + \sin(B)\cos(A)$.$$f'(x) = \lim_{h \to 0} \frac{\left[ \sin(x)\cos(h) + \sin(h)\cos(x) \right] - \sin(x)}{h}$$$$=\lim_{h \to 0} \frac{\sin(x)\cos(h) - \sin(x) + \sin(h)\cos(x)}{h}$$$$=\lim_{h \to 0} \sin(x) \left[ + \frac{\cos(h)-1}{h} \right] + \cos(x) \left[ \frac{\sin(h)}{h} \right]$$$$=\sin(x) \left[ \lim_{h \to 0} \frac{\cos(h)-1}{h} \right] + \cos(x) \left[ \frac{\sin(h)}{h} \right]$$Now we need to employ the given facts from the problem instructions. Note that these special limit results are not attainable on our own yet, only because they require a concept we will learn in the future (see the lesson on L'Hopital's Rule »).Per the given information, it follows that$$\lim_{h \to 0} \frac{\cos(h)-1}{h} = 0$$$$\lim_{h \to 0} \frac{\sin(h)}{h} = 1$$Therefore,$$f'(x) = \sin(x) (0) + \cos(x) (1) = \cos(x)$$

Example 4Find the line tangent to the function $y = \tan(x)$ at $x = \pi/3$.
Show solution
$\blacktriangleright$ Recall from earlier derivative work that the major steps in finding the equation of a tangent line at a point are 1) finding the correct slope and 2) finding the $(x,y)$ coordinates of the tangency point, so that we can simply use the good ol' point-slope form of a linear equation. First, let's find the slope.Another way to ask "what is the slope of $y$ when $x=a$" is to simply ask "what is $y'$ when $x=a$?" This is the practical "slope function" definition of how we interpret the meaning of the derivative.$$y = \tan(x)$$$$\Rightarrow y' = \sec^2(x)$$So when $x=\pi/3$, the slope of $y$ is $\sec^2(\pi/3)$, which is:$$\sec^2\left(\frac{\pi}{3}\right)$$$$=\frac{1}{\cos^2\left(\frac{\pi}{3}\right)}$$$$=\frac{1}{\left(\frac{1}{2}\right)^2}$$$$=4$$The only other thing we need is the coordinates of the point of tangency. When $x=\pi/3$, $y=\tan(\pi/3)=\sqrt{3}$. Therefore, the tangent line we seek is$$y - \sqrt{3} = 4\left( x - \frac{\pi}{3} \right)$$

Example 5Using the cofunction derivative relationship rule, determine the derivative of$$f(x) = \csc^2(x)\cos(x) + \tan(x)\sin^2(x)$$given that the derivative of$$g(x) = \sec^2(x)\sin(x) + \cot(x)\cos^2(x)$$is$$g'(x) = -2\cos^2(x) - \cot^2(x) + \sec^3(x) + \tan^2(x)\sec(x)$$
Show solution
$\blacktriangleright$ Someday fairly soon, you'll have all the tools you need to compute the requested derivative explicitly. However, that is not the intention of this question - f(x) is the cofunction version of $g(x)$, and the cofunction derivative relationship rule tells us in this case that the derivative of $g(x)$ and the derivative of $f(x)$ will be of the same form, just with opposite signs and opposite cofunctions. Therefore:Given$$f(x) = \csc^2(x)\cos(x) + \tan(x)\sin^2(x)$$$$g(x) = \sec^2(x)\sin(x) + \cot(x)\cos^2(x)$$it follows that$$g'(x) = -2\cos^2(x) - \cot^2(x) + \sec^3(x) + \tan^2(x)\sec(x)$$$$\Rightarrow f'(x) = 2\sin^2(x) + \tan^2(x) - \csc^3(x) - \cot^2(x)\csc(x)$$This cofunction rule doesn't always find its way into usefulness in Calculus courses but it's a fact, and in the right circumstance, it can save you a lot of time!

Example 6Sketch the graph of $2\cos(x)$ and estimate its tangent slope at the points $x=0$, $x=\pi/2$, and $x=\pi$. Then calculate the values of $-2\sin(0)$, $-2\sin(\pi/2)$, and $-2\sin(\pi)$. What pattern do you see?
Show solution
$\blacktriangleright$ First, here's a sketch of the function. Note the important points on the wave, as we should always note when we're asked to sketch a sinusoid.The slopes of the function at $x=0$, $x=\pi/2$, and $x=\pi$ look to be $0$, $-2$, and $0$, respectively. Let's calculate the function values that the instructions ask for.$$-2\sin(0) = 0$$$$-2\sin(\pi/2) = -2$$$$-2\sin(\pi) = 0$$Unsurprisingly, these match. The pattern is that the slopes of $2\cos(x)$ seem to correspond with the values of the function $-2\sin(x)$. As we should be able to state from our knowledge of derivatives so far, the derivative of $2\cos(x)$ is $-2\sin(x)$. The slope and function behavior agrees for our test points, and would continue to match if we picked more points. Just remember that the fact that these values align as expected is not sufficient proof on its own, but rather a result that matches what we expect.

Lesson Takeaways
• Know all six trigonometric function derivatives by heart
• Have at least a loose understanding of how graphs of trig functions can confirm (but not prove) these derivative facts
• Be able to use these derivative facts similarly to how we've already learned to use derivatives, such as interpreting results as tangent slopes, and using results to find tangent and normal lines
• Apply sum and constant rules, so that you can not only take the derivative of a trig function on its own, but also take the derivative of sums of trig functions, and / or constant multiples of them
• Popular Content
• Get Taught
• Other Stuff

Lesson Metrics

At the top of the lesson, you can see the lesson title, as well as the DNA of Math path to see how it fits into the big picture. You can also see the description of what will be covered in the lesson, the specific objectives that the lesson will cover, and links to the section's practice problems (if available).

Key Lesson Sections

Headlines - Every lesson is subdivided into mini sections that help you go from "no clue" to "pro, dude". If you keep getting lost skimming the lesson, start from scratch, read through, and you'll be set straight super fast.

Examples - there is no better way to learn than by doing. Some examples are instructional, while others are elective (such examples have their solutions hidden).

Perils and Pitfalls - common mistakes to avoid.

Mister Math Makes it Mean - Here's where I show you how teachers like to pour salt in your exam wounds, when applicable. Certain concepts have common ways in which teachers seek to sink your ship, and I've seen it all!

Put It To The Test - Shows you examples of the most common ways in which the concept is tested. Just knowing the concept is a great first step, but understanding the variation in how a concept can be tested will help you maximize your grades!

Lesson Takeaways - A laundry list of things you should be able to do at lesson end. Make sure you have a lock on the whole list!

Special Notes

Definitions and Theorems: These are important rules that govern how a particular topic works. Some of the more important ones will be used again in future lessons, implicitly or explicitly.

Pro-Tip: Knowing these will make your life easier.

Remember! - Remember notes need to be in your head at the peril of losing points on tests.

You Should Know - Somewhat elective information that may give you a broader understanding.

Warning! - Something you should be careful about.