The Chain Rule

The chain rule is another trick for taking complex derivatives by breaking them down into simpler parts.  Rather than using this when we are multiplying or dividing two functions, we use the chain rule when our complex function can be thought of as plugging one function into another one.  These are known as composite functions.

Let’s say we have a function called h(x) which is the composition of two simpler functions, f(x) and g(x) where: $$h(x)=f(g(x)).$$

Then, $$h'(x)=f'(g(x))\cdot g'(x)$$

This is known as the chain rule.

The phrase I use to remember The Chain Rule is:

The derivative of the outside, leave the inside function alone.  Then multiply by the derivative of the inside.

Similarly to the product rule and quotient rule, the first thing you need to do after identifying you need to use the chain rule is figure out which part of the function you want to call f(x) and what to call g(x).  Once you figure out which part to call f(x) and g(x), the rest of the process is almost identical to applying the product and quotient rules.

I would like to show a few examples of how to assign f(x) and g(x) then we can go through one of them all the way to the end.

Example 1

Find the derivative of h(x)=\sqrt{x^3-4x^2+7x+1}.

Recognizing when to use the chain rule

The way I like to think about breaking it down into f(x) and g(x) is to consider which is the outside function and the inside function.  In this case, it is pretty clear that we have x^3-4x^2+7x+1 all inside of a square root.  Therefore, we can think of the square root as the outside function and the x^3-4x^2+7x+1 as the inside function.  In other words, we are plugging our inside function into our outside function.

Since we can say that the above function, h(x), can be described by one function being plugged into another function, this tells us that we can use the chain rule to find its derivative.

Determining f and g

As mentioned before, the first thing you need to do is isolate the inside and outside functions.  I think that it is usually easier to decide on the inside function first.  The reason for this is that the inside function is often surrounded by parenthesis, or in this case, a square root.

So as a result, we can say that our inside function is $$g(x)=x^3-4x^2+7x+1.$$

Once we have figured out our inside function, we need to write everything else that’s left over as an isolated function, which we will call f(x).  The simplest way to do this is look at our original function, h(x), and replace the entire inside function, g(x), with a single x.

Since h(x)=\sqrt{x^3-4x^2+7x+1}, all we need to do is replace the entire part which we have called the inside function, which is x^3-4x^2+7x+1, with a single x.  The function we are left with after doing this will be our outside function, which will be called f(x).

Doing this leaves us with:


Now that we have figured out f(x) and g(x), we just need to figure out f'(x) and g'(x) and plug these functions into the chain rule formula as shown above.

I will work one of these all the way to the end a little later, but for now I’d like to do a couple more examples up to this point.

Example 2

Find the derivative of h(x)=2sin(x^2+4).

Determining f and g

Like last time, the first thing we need to do is determine what we will call our inside function and our outside function.  First we will figure out the inside function.  As I said before, the inside function is usually a bit easier to see because an easy place to start is to simply take the part of the function inside parenthesis.

If we do this in this case, we would say that our inside function is g(x)=x^2+4.  I would like to point out that this will not always work every time.  However, it is a good place to start.  You can always come back to this step if you realize your original choice for the inside function doesn’t work well.

If we say that our inside function is the x^2+4 part, all we need to do to figure out the outside function is replace that piece with a single x and see what we have left.  If we do this, we are left with f(x)=2sin(x).

Now we have two functions, f(x)=2sin(x) and g(x)=x^2+4, that are much easier to derive.  Therefore, we can use these functions, find their derivatives, and put all those pieces into the chain rule formula.

Now I would like to do one example all the way from beginning to end.

Example 3

Find the derivative of h(x)=\big(x^3+18\big)^{56}.

Determining f and g

Just like the first two examples, the first thing we want to do is determine our inside and our outside functions.  As before, let’s start with the inside function.  This is another case where our inside function is fairly obvious because it’s surrounded by a set of parenthesis.  Therefore, we will call our inside function g(x)=x^3+18.

Once we have our inside function, we need to determine our outside function.  To do this, we will go back to our original function and replace the inside function with a single x.  So we will replace the x^3+18 all with a single x.  Doing this gives us f(x)=x^{56}.

Dealing with each piece of the formula

Now we have determined our outside and inside functions to be f(x)=x^{56} and g(x)=x^3+18.  Now, in order to use the chain rule formula to find the derivative of our original function h(x) we also need to find f'(x) and g'(x).

Both of these derivatives can be found simply using the power rule.  If you can’t remember how to do this, I discussed the power rule in this article here.  All you need to do is move the power down in front of the x and lower its power by 1.

Doing this gives us:



Putting it all together

Now, similarly to the product and quotient rule, once we have the four necessary components we can just plug them into the chain rule formula and simplify.  Remember,

$$h'(x)=f'(g(x))\cdot g'(x)$$

Before I proceed I would like to quickly explain what the notation f'(g(x)) means.  Think about what it means to find, for example, f(2).  All this means is that you need to plug 2 into your function called f.  Or in other words, go to your function f(x) and replace every x with a 2.  By this same reasoning, f'(g(x)) means we need to take our function f' and replace each x with our entire function g(x).  So we will change each x in our equation into (x^3+18).  I suggest putting parenthesis around the entire function when you plug it into each x because this will help make sure you simplify correctly.

Now let’s go ahead and use the formula.  We will plug g(x) into f'(x), then multiply that whole piece by our entire function g'(x).


Now you just want to simplify, and this tells you that our final derivative is:


Enter your email and name below and I’ll send you my calculus 1 study guide straight to your inbox!

Go check out my other lessons on the derivatives page.  There’s a lot of topics covered there that are worth taking a look at.  You can also see some more practice problems using the chain rule here.  And don’t forget, if you have any questions about this article or any suggestions for future lessons I haven’t touched on, leave a comment or email me at!

The Quotient Rule

Similar to the product rule, the quotient rule is a tool for finding complex derivatives by breaking them down into simpler pieces.  There is one main difference between the two.  As the names imply, the product rule is applicable when you need to find the derivative of a function that is actually the product of two simpler functions and the quotient rule is used when your function can be described as one simpler function being divided by another.

Like the product rule, there are a few different ways you might see the quotient rule represented.  I recommend picking the one that makes the most sense to you so that you can memorize the formula.

For our functions f(x) and g(x):


$$\Bigg(\frac{f}{g}\Bigg)’=\frac{f’\cdot g-f\cdot g’}{g^2}$$

$$\Bigg(\frac{f(x)}{g(x)}\Bigg)’=\frac{f'(x)\cdot g(x)-f(x)\cdot g'(x)}{g^2(x)}$$

Unlike the product rule, the order does matter here.  This is because we are using subtraction and division rather than addition and multiplication.  Since we need the pieces to be in the correct order, it is helpful to come up with some method for memorizing the quotient rule as I have shown it above.

How to remember the quotient rule

We need to take the derivative of some function, that can be represented as a fraction made up of two functions that are easier to derive.  In other words we will be considering the “top” of the fraction and the “bottom” of the fraction as two separate, simpler functions.  The method I like to use to remember this formula is to think of the function in the numerator and the “high” portion and the denominator as the “low” portion.  These will be abbreviated as “Hi” and “Lo.”

$$\Bigg(\frac{f(x)}{g(x)}\Bigg)’=\Bigg(\frac{Hi}{Lo}\Bigg)’=\frac{Lo \ dHi-Hi \ dLo}{Lo^2}$$

And if you read it out loud, it almost seems to have a little jingle to it, which makes is easier to remember:

Lo d Hi minus Hi d Lo, all over Lo squared.

Just to add a little clarification, the “d” means you should take the derivative of the following piece.  So, “d Hi” should be where you plug in the derivative of the function that makes up the top half of the fraction.

Example 1

Find the derivative of h(x)=\frac{e^x}{\sqrt{x}}.

Recognizing when to use the quotient rule

Just like we did with the product rule example, we want to first recognize how we will split up this function.  In other words, we need to recognize which part we will consider f(x) and which part we will consider g(x).  The main difference is that this distinction does matter with the quotient rule.  We need to call f(x) our top function and g(x) our bottom function.

Therefore, we need to say f(x)=e^x and g(x)=\sqrt{x}.  Once we have made this distinction, we can consider these two functions individually for a moment and find each of their derivatives.  I already found these derivatives in Example 1 of The Product Rule.  If you want to see this again, click here.

By using the previous example, we already know f'(x) and g'(x).  I recommend writing out f(x), f'(x), g(x), and g'(x) all in one place before using the quotient rule formula.  So far we have:





Putting it all together

Now that we have figured out these four parts, we can simply plug them into the quotient rule formula we have above.  This tells us that:



Please don’t forget to leave a comment or email me at with any questions or suggestions for future lessons!  Also, I recommend going to the derivatives page to see other topics I’ve covered.  And you can see more quotient rule practice problems here.  Just send me an email if you can’t find what you’re looking for and I’ll see what I can do to help!

Also, enter your name and email in the form below and I’ll send you my calculus 1 study guide as a FREE bonus for joining my email list!

The Product Rule

The product rule is a very useful tool to use in finding the derivative of a function that is simply the product of two simpler functions.  There are a few different ways you might see the product rule written.  I would recommend picking whichever one is easiest for you to remember and understand so that you can work with it from memory.  Although you may only need to remember one of these, you should be able to recognize the other representations as the product rule when you see them.  All of the following are different ways of writing the product rule:

Take any two functions f(x) and g(x).

$$\frac{d}{dx} \Big[f(x)g(x) \Big]=f(x) \frac{d}{dx} \Big[g(x) \Big]+g(x) \frac{d}{dx} \Big[f(x) \Big]$$

$$\big(f \cdot g \big)’=f \cdot g’+g \cdot f’$$

$$\big(f(x) \cdot g(x) \big)’=f(x) \cdot g'(x)+g(x) \cdot f'(x)$$

Of course, when you add two things together the order doesn’t matter.  In other words a+b=b+a.  The same is true for multiplication, a \cdot b=b \cdot a.  As a result we can reorder the product rule equations shown above, so

$$\big(f \cdot g \big)’=f’ \cdot g+g’ \cdot f.$$

How to remember the product rule

As long as you multiply the first function with the derivative of the of the second and multiply the second function with the derivative of the first, then add the two together, it will work out.  The phrase I like to think about when I need to remember the product rule is:

“The derivative of the first times the second plus the derivative of the second times the first.”

I like that phrasing personally, but I recommend you come up with some trick for remembering the product rule because it comes up frequently.

How to start with the product rule

The next thing that is important to discuss is how to decide which function will be f(x) and which function will be g(x) when you realize you need to use the product rule.  As long as you can reduce the full function to the product of two smaller functions, the product rule can be applied and it doesn’t really matter which part of the product you call f and which one you call g.

Let’s consider the following example:

Example 1

Find the derivative of h(x) = e^x \sqrt{x}.

Recognizing when to use product rule

This is perhaps one of the more obvious cases where we can see that the product rule can be used here.  This function is simply the product of the two simpler functions: e^x and \sqrt{x}.

How to begin

The first thing we need to do is decide which of those two functions should be f and which will be g.  As I mentioned before, this decision doesn’t matter as long as you stick with it through the whole problem (you will have issues if you switch the two half way through the problem).

I will say f(x)=e^x and g(x)=\sqrt{x}.  Once you name your f and g functions, the next thing I would recommend doing is figure out the derivative of each.

Dealing with each piece of the formula

Remember, the product rule formula requires the use of f' and g', so it’s easiest to figure those out now so we can just plug them in.

First we’ll find f'(x).  Luckily this one is easy.  The derivative of e^x is also e^x.  Or $$\frac{d}{dx}e^{x}=e^{x}$$  Therefore we have $$f'(x)=e^{x}.$$

Now we’ll find g'(x).  This one is a bit more tricky, but keep in mind, there is another way to write \sqrt{x} that makes finding the derivative seem a lot easier.  Always remember, \sqrt{x} can also be written as x^{\frac{1}{2}}.  $$\sqrt{x}=x^{1/2}.$$  Now that we have it written as x to some power, we can find this derivative using the power rule.

Just move the power down in front and lower the power of x by 1.  This means $$\frac{d}{dx}x^{\frac{1}{2}}=\frac{1}{2}x^{-\frac{1}{2}}.$$  Therefore, we know


Putting it all together

Now we have figured out f' and g', so we have all the pieces we need to plug into the product rule formula.  To summarize, so far we have:





When you are using the product rule, I would recommend listing out f, g, f', and g' before trying to plug anything into the power rule formula.  It is best to list these out all in one place, like I have done above so it’s easy to refer back to all of the pieces you will need to use.

Now we just need to plug all of these into our product rule formula.  I will use h'(x)=f'(x)\cdot g(x)+g'(x)\cdot f(x), but as I said before, any of the formulas shown previously will work.  Use the one with notation that you are most comfortable with.


This is a perfectly acceptable answer for h'(x), but we can also simplify this by factoring out an e^{x}.  Doing this tells us that:

$$h'(x)=\big(e^{x}\cdot \sqrt{x}\big)’=e^{x}\bigg(x^{\frac{1}{2}}+\frac{1}{2}x^{-\frac{1}{2}}\bigg)$$

Product Rule with 3 Functions

My favorite way to think about using the produce rule with 3 terms is the way it’s explained in The Calculus Lifesaver by Adrian Banner. This book explains everything you need to know in calculus in a very intuitive way that makes a lot of sense when you’re trying to learn calculus and it is very affordable priced under $20 on Amazon. I highly recommend checking that book out.

In that book, Adrian Banner describes how you can actually apply the product rule to find the derivative of a function that is the product of any number of smaller functions.

When it is being applies to 3 functions, the formula is fairly simple and follows the same pattern as using the product rule on only 2 terms.

Let’s say we want to find the derivative of $$f(x)=(x^3+1)(x^4-2x+6)(x^2-x)$$

First we start with assigning each term to a new variable. So let’s say:

$$u=x^3+1$$ $$v=x^4-2x+6$$ $$w=x^2-x$$

Then we can apply these three terms to the product rule formula for 3 terms.

$$f'(x)= \frac{du}{dx}vw + u \frac{dv}{dx} w + uv \frac{dw}{dx}$$

So you can see that we will need to find the derivative of each of our 3 terms individually before we plug them into the product rule formula. All 3 of these derivatives can be found using the power rule.

$$\frac{du}{dx}= 3x^2$$ $$\frac{dv}{dx}= 4x^3-2$$ $$\frac{dw}{dx}= 2x-1$$

And now we can simply plug all of these pieces into the formula to get the derivative.

$$f'(x)= (3x^2)(x^4-2x+6)(x^2-x)$$ $$\ + (x^3+1) (4x^3-2) (x^2-x)$$ $$\ + (x^3+1)(x^4-2x+6) (2x-1)$$

And that’s all there is to it.  If you want to get some more practice with derivatives and other rules and shortcuts you should check out the derivatives page.  There you will find a list of lesson and full problems I have worked through to help you make sense of derivatives.  You can also see more product rule practice problems here. If you can’t find what you’re looking for there then let me know with an email to  Send me your questions and I’ll do my best to answer them and may even post a full lesson to address your question.

** Links on this page may be affiliate links meaning I would get a small commission from your purchase at no additional cost to you. **

Finding Derivatives with Limits

At this point we should have at least a basic understanding of limits and how to find some limits.  However, I have only really discussed limits by themselves and not how they relate to the rest of calculus.  They are very important in calculus because they are used to define the most important calculus topics.

For example, the main topic which will be discussed for quite some time is derivatives.  Derivatives will come up in a lot of different settings, like finding rate of change, instantaneous rate of change, velocity, slope, and a few others.  The main thing to realize is that a derivative is generally used to find out how quickly, or slowly, something is changing.

I will go further into all of these things later, but for now I want to focus on the definition of derivatives and how to find a derivative using the definition.

The definition of a derivative

If we have some function, f(x), we would write “the derivative of f” as f'(x).  And we would define the derivative of f by using this limit:

$$f'(x) = \lim_{h \to 0} \frac{f(x+h) – f(x)}{h}$$

This limit can be a bit confusing, so there’s something I would like to point out before we actually begin working with this limit.  The confusing thing here is that we have x and h in this limit and it looks as if they are both variables.  However, when we find this limit, we can only treat h as a variable.  We will need to treat x as a constant and h as the only variable.

The reason for this is that we are finding the limit as h goes to 0.  This tells us that h is moving in toward 0.  It does not tell us that x is changing at all.  Therefore, when we are working with the limit, we will act as if x is a number, or a constant.  This means that once we find the limit, our answer may have x in it still and this is completely fine since x isn’t the variable in this case.  Now let’s try an example.

Example 1

Consider the function f(x) = 4x^2 - 7x + 12.  We will use the limit definition to find the derivative of this function, but first let’s break it down and consider each part on its own.

Finding f(x+h)

The fist thing we need to find is f(x+h).  This notation basically just means that we need to look at our function f, and plug in (x+h) wherever we see the input.  In other words, we need to replace all of the x‘s in the function with (x+h)‘s.  So,

$$f(x+h) = 4(x+h)^2 – 7(x+h) + 12.$$

Then we will want to expand this out so it’s easier to work with.  Remember (x+h)^2 is the same as (x+h)(x+h), which means we need to foil it.

$$f(x+h) = 4(x+h)(x+h) – 7(x+h) + 12$$

$$=4(x^2 + xh + xh + h^2) – 7(x+h) + 12$$

$$=4(x^2 + 2xh+ h^2) – 7(x+h) + 12$$

$$=4x^2 + 8xh+ 4h^2 – 7x – 7h + 12$$

Since there aren’t any like terms we will leave it at that for now.

Putting it all together

Now we can put that into the rest of the equation.  Since we now know f(x+h) and f(x), we can plug those into the equation.  I would recommend surrounding each of them with a set of parenthesis so you don’t forget to distribute the negative sign in front of the f(x).  This is a very common mistake, so be careful not to forget that because it will give you the wrong answer.

$$f'(x) = \lim_{h \to 0} \frac{f(x+h) – f(x)}{h}$$

$$= \lim_{h \to 0} \frac{(4x^2 + 8xh+ 4h^2 – 7x – 7h + 12) – (4x^2 – 7x + 12)}{h}$$

Solving the limit

When I first see a limit, the first thing I usually consider is whether we can simply plug in 0 for h. Essentially, I try to treat this function as if it were continuous at h=0 (remember h is the variable here).

However, if we do this here we will get 0 on the denominator.  Since you cannot divide by 0, this will not work.  So our strategy will be to simplify this fraction to a point where we can plug in 0 for h.  The simplest way to do this is to rearrange the numerator so that we can cancel an h from the numerator and denominator and get rid of our fraction all together.

$$f'(x)= \lim_{h \to 0} \frac{4x^2 + 8xh+ 4h^2 – 7x – 7h + 12 – 4x^2 + 7x – 12}{h}$$

$$= \lim_{h \to 0} \frac{8xh+ 4h^2 – 7h}{h}$$

At this point I would like to point something out. Notice, after simplifying the numerator of the fraction, each term remaining contains an h in it.  This is important because it allows us to factor the h out and cancel it with the h in the denominator, getting rid of the fraction.  This will be an extremely common strategy to use for finding the derivative of a function using the limit definition.

$$f'(x)= \lim_{h \to 0} \frac{h(8x+ 4h – 7)}{h}$$

$$= \lim_{h \to 0} 8x+ 4h – 7$$

Now we have simplified to a point that we can solve this limit by plugging 0 in for h.

$$f'(x)= 8x+ 4(0) – 7$$

$$= 8x – 7$$

So we have just shown that if f(x)=4x^2-7x+12, then f'(x)=8x-7.  We will later learn shortcuts like the product rule, quotient rule, and chain rule that will make finding derivatives like this much simpler and faster, but you will need to know how to find these using the limit definition.  The pattern shown in this problem is a common one.  It won’t work for all derivatives, but it’s a good thing to try first.

  • It’s generally a good idea to see if you can reengage the top of the fraction in such a way that every term has h as a factor.
  • Then you can factor out the h, and cancel it with the h on the bottom of the fraction.
  • This usually leaves you with a function that you can directly plug 0 into h and simplify from there, leaving you with a function that doesn’t contain any h‘s, but usually contains x‘s.

Enter your email below and I’ll send you my calculus 1 study guide which is packed full of helpful tricks and shortcuts to help you boost your scores in calc!

I would recommend checking out the other material I have about derivatives.  As I mentioned before, there are several shortcuts and methods that make this whole process a lot easier.  Go check out what I’ve written about on the derivatives page.  If you have a question that isn’t answered there just let me know by emailing me at  I’ll do my best to answer any questions you send me and I may even post a lesson or full solution on it!