L’HOSPITAL’S RULE – HOW TO – With Examples

L’Hospital’s Rule really just tells us one thing that makes evaluating certain limits a lot easier. Limits that meet 3 specific requirements can be made much simpler using L’Hospital’s Rule. First let me introduce L’Hospital’s Rule, then we can go over the 3 conditions that you need to check before you can apply it to any given limit.

What does L’Hospital’s Rule tell us?

To find a limit of a function that is a fraction, we can take the derivative of the top of the fraction and the derivative of the bottom of the fraction and make a new fraction out of the derivatives.

$$\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}$$

Notice that we don’t use the quotient rule here. The reason for this is that we are taking the limit of this fraction and not taking the derivative of this fraction. The limit is the key piece that allows us to avoid the quotient rule and take the derivative of each piece of the fraction separately to create another limit that is equal to the original.

The hope is that the fraction resulting from the derivatives will be easier to evaluate than the original limit was.

How do we know when to use L’Hospital’s Rule?

Before we can apply L’Hospital’s rule to any given limit, we need to confirm that these three conditions are met:

  1. f(x) and g(x) are differentiable on some open interval that includes \(\mathbf{x=a}\). This will basically just mean that both the numerator and denominator are differentiable at \(x=a\).
  2. \(\mathbf{g'(x) \neq 0}\) near \(\mathbf{x=a}\). Note that it doesn’t matter if \(g'(x)=0\) AT \(x=a\) as long as you can pick some interval (as small as is necessary) around \(x=a\) where \(g'(x) \neq 0\) for all x‘s in that interval besides \(x=a\). You likely won’t need to worry about running into a function that you can’t pick a small enough interval around \(x=a\) to make this work.
  3. As x \(\rightarrow\) a, f(x) AND g(x) \(\mathbf{\rightarrow 0}\) — OR — f(x) AND g(x) \(\mathbf{\rightarrow \pm \infty}\)

That’s really all there is to it. Let’s jump into some practice problems and I will show you how to apply L’Hospitals Rule.

Example 1

Evaluate the following limit using L’Hospital’s Rule or explain why L’Hospital’s Rule cannot be used to evaluate this limit.

$$\lim_{x \to \infty} \frac{e^x}{-x^2+1000x}$$

If we tried to use limit properties to evaluate this limit, we would see that both the top and the bottom of this fraction go to either positive or negative infinity as x goes to infinity.

$$\lim_{x \to \infty} \frac{e^x}{-x^2+1000x} \rightarrow \frac{\infty}{- \infty}$$

So L’Hospital’s Rule might help…

Now we just need to confirm that the other two conditions are met.

\(f(x)=e^x\) is an exponential function and is differentiable everywhere, for any value of x. And \(g(x)=-x^2 + 1000x\) is also differentiable everywhere since it’s a polynomial. Since it’s differentiable everywhere, it is also differentiable for any infinitely large x value.

\(g'(x) = -2x+1000\) will go to \(-\infty\) as x approaches \(\infty\). \(g'(x) \neq 0\) for any infinitely large x value since it just continues to go to \(– \infty\).

So we know that this limit meets all 3 requirements needed to apply L’Hospital’s Rule.

Now we know we can apply L’Hospital’s Rule

Taking the derivative of the top and bottom of the fraction individually tells us that:

$$\lim_{x \to \infty} \frac{e^x}{-x^2+1000x} = \lim_{x \to \infty} \frac{e^x}{-2x+1000}$$

Now we can evaluate this new limit instead. But if we do this, we will notice that we will still end up in the same situation that we had before.

$$\lim_{x \to \infty} \frac{e^x}{-2x+1000} \rightarrow \frac{\infty}{- \infty}$$

But what if it didn’t really help make the limit easier?

Which puts us in a perfect situation to consider using L’Hospital’s Rule to evaluate this new limit as well. By the same logic as before, we can confirm that the first two conditions are met as well as x gets infinitely large. Since all 3 required conditions are met we can go ahead and apply L’Hospital’s Rule a second time.

$$\lim_{x \to \infty} \frac{e^x}{-2x+1000} = \lim_{x \to \infty} \frac{e^x}{-2}$$

Now we can simply use the basic limit properties to evaluate this last limit.

Now we have a much easier limit

$$\lim_{x \to \infty} \frac{e^x}{-2} = \ – \frac{1}{2} \lim_{x \to \infty} e^x = \ – \infty$$

So therefore,

$$\lim_{x \to \infty} \frac{e^x}{-x^2+1000x} = \ – \infty$$

A quick note on applying L’Hospital’s Rule twice

This is an interesting problem because it shows that you can apply L’Hospital’s Rule multiple times on the same problem. You just need to make sure that each time you apply it, the resulting limit still meets all 3 required conditions before applying it to the new limit. There is no limit to the number of times you can continue applying L’Hospital’s Rule over and over in the same problem as long as you are making sure that the limit you are applying it to meets all 3 conditions every time you apply it.

Example 2

Evaluate the following limit using L’Hospital’s Rule or explain why L’Hospital’s Rule cannot be used to evaluate this limit.

$$\lim_{x \to 3} \frac{x-3}{27-x^3}$$

Again, if we think about what value the top and bottom of this fraction will go towards as x approaches 3, we would see that

$$\lim_{x \to 3} \frac{x-3}{27-x^3} \rightarrow \frac{0}{0}$$

Since we get another indeterminate form, which is $\frac{0}{0}$, we should consider using L’Hospital’s Rule to make this limit easier to evaluate.

So L’Hospital’s Rule might help…

First, we need to make sure that the other two conditions are met as well.

We can check that \(g'(x) = -3x^2\) doesn’t equal zero anywhere near \(x=3\). This is because \(g'(x) = -3x^2\) is continuous everywhere and the only place where \(g'(x)=-3x^2=0\) is when \(x=0\). As a result of these two things, we can pick some interval around \(x=3\) that doesn’t include \(x=0\) to satisfy condition #2.

Also, both f(x) and g(x) are polynomials and are therefore differentiable everywhere. So we know they will both be differentiable on any interval around \(x=3\).

Now we know we can apply L’Hospital’s Rule

Doing so by taking the derivative of the top and bottom of our fraction separately tells us that

$$\lim_{x \to 3} \frac{x-3}{27-x^3} = \lim_{x \to 3} \frac{1}{-3x^2}$$

And doing this gives us an easier limit to deal with. Now we can simply apply the limit properties to evaluate. Applying the limit properties tells us that:

$$\lim_{x \to 3} \frac{1}{-3x^2} = \frac{1}{-3 \Big( \lim_{x \to 3}x \Big) ^2}= \frac{1}{-3(3)^2} = \ – \frac{1}{27}$$

So therefore we know that:

$$\lim_{x \to 3} \frac{x-3}{27-x^3} = \ – \frac{1}{27}$$

Example 3

Evaluate the following limit using L’Hospital’s Rule or explain why L’Hospital’s Rule cannot be used to evaluate this limit.

$$\lim_{x \to 0} \frac{|x|}{x^5+2x}$$

If we think about what value the numerator and denominator of this fraction will approach as x approaches 0 from both sides, we would see:

$$\lim_{x \to 0} \frac{|x|}{x^5+2x} \rightarrow \frac{0}{0}$$

Since we get an indeterminate form, which is $\frac{0}{0}$, we should consider using L’Hospital’s Rule to make this limit easier to evaluate.

So L’Hospital’s Rule might help…

First, we need to make sure that the other two conditions are met as well.

Upon checking condition #1 however, we run into a problem. Condition #1 requires that f(x) and g(x) are both differentiable on some interval containing \(x=0\), including \(x=0\).

But \(f(x) = |x|\) is not differentiable at \(x=0\). Therefore, we actually can’t apply L’Hospital’s Rule to evaluate this limit. I won’t go into the details here since we won’t be using L’Hospital’s Rule. But if you want to try evaluating this limit, I’d recommend considering both one-sided limits on their own and compare them to start. You can see a similar application here.

Example 4

\(\mathbf{\lim\limits_{x \to \infty} \frac{ln(x)}{\sqrt{x}}}\) | Solution

Examples of product, quotient, and chain rules

I have already discuss the product rule, quotient rule, and chain rule in previous lessons. But I wanted to show you some more complex examples that involve these rules. The reason for this is that there are times when you’ll need to use more than one of these rules in one problem. So let’s dive right into it!

Example 1

Find the derivative of \(y \ = \ sin(x^2 \cdot ln \ x)\).

At first glance of this problem, the first thing we should notice is that we can think of this function as one function plugged into another. There is a clear inner function and a clear outer function.

It can be broken down as \(x^2 \cdot ln \ x\) being plugged into sin(x) for x. Since our function can be thought of as one function plugged into another, we will want to start out with the chain rule.

Chain rule

The first thing we need to do to apply the chain rule is to figure out our inside function and outside function. It’s usually easier to think about the insider function first.

Finding f and g

To find the inside function we just need to answer the question: what function is being plugged into another?

Looking at our function you can see that we are taking \(x^2 \cdot ln \ x\) and plugging that into another function. So we will say $$g_1(x) = x^2 \cdot ln \ x$$

Now that we have decided on the inside function, we need to find the outside function. All we need to do here is look at the original function, and replace our inside function with a single x. So we will replace \(x^2 \cdot ln \ x\) with just x. This gives us $$f_1(x) = sin(x).$$

Finding f’ and g’

Now that we have found f and g, we just need to take each of their derivatives to find f’ and g’.

Finding f’ should be simple here. $$f’_1(x) = cos(x)$$

Finding g’ will be a little more tricky.

Looking at our function \(g_1(x)\) you can see that it is actually the product of two simpler functions, \(x^2\) and \(ln \ x\). Therefore, we are going to have to use the product rule to find this derivative. You can kind of think of this as a smaller sub-problem within our problem, so we will come back to the chain rule after applying the product rule.

Product rule

We need to use the product rule to find the derivative of $$g_1(x) = x^2 \cdot ln \ x.$$ The product rule starts out similarly to the chain rule, finding f and g. However, this time I will use \(f_2(x)\) and \(g_2(x)\).

Finding f and g

With the product rule it doesn’t really matter which function is f and which is g. As long as we correctly identify that our function is a product of two simpler functions, it’ll work out correctly. So we will say $$f_2(x) = x^2$$ $$g_2(x) = ln \ x.$$

Finding f’ and g’

Now we just need to find the derivatives of f and g. Since they are fairly simple functions, this shouldn’t be too difficult.

To find the derivative of f we just need to use the power rule. $$f’_2(x) = 2x.$$

And finding the derivative of g should be a derivative that you have memorized. Using Wolfram Alpha we can see that $$g’_2(x) = \frac{1}{x}.$$

Plugging into the formula

Now that we have found all the pieces we need, we can simply plug them all into the product rule formula. $$g’_1(x) = f_2(x) \cdot g’_2(x) \ + \ f’_2(x) \cdot g_2(x)$$ $$\frac{d}{dx} \Big[ x^2 \cdot ln \ x \Big] \ = \ x^2 \cdot \frac{1}{x} \ + \ 2x \cdot ln \ x$$ $$\frac{d}{dx} \Big[ x^2 \cdot ln \ x \Big] \ = \ x \ + \ 2x \cdot ln \ x$$

Back to chain rule

Now that we know the derivative of \(x^2 \cdot ln \ x\) we can go back up to the chain rule. We knew that $$g_1(x) = \ x^2 \cdot ln \ x$$ and by using the product we just found that $$g’_1(x) = \ x \ + \ 2x \cdot ln \ x.$$ Just as a quick reminder, we already found that $$f_1(x) = sin(x)$$ $$f’_1(x) = cos(x).$$ Now we just need to plug these four pieces into the formula for chain rule. $$h’_1(x) = \ f’_1 \big( g_1(x) \big) \cdot g’_1(x)$$ $$\frac{d}{dx} \Big[ sin \big(x^2 \cdot ln \ x \big) \Big] \ = \ cos \big( x^2 \cdot ln \ x \big) \cdot \big( x \ + \ 2x \cdot ln \ x \big)$$

And that’s it! We could factor out a like term out of one of these factors, but it wouldn’t really make the function any simpler so I won’t do that. We can also use Wolfram Alpha to check our answer. A quick note on that, Wolfram Alpha uses “log” instead of “ln” to describe a natural log.

Example 2

Find the derivative of \(y = \frac{x \ sin(x)}{ln \ x}\).

Looking at this function we can clearly see that we have a fraction. Therefore, we can break this function down into two simpler functions that are part of a quotient. So we can see that we will need to use quotient rule to find this derivative.

Quotient rule

As discussed in my quotient rule lesson, when we apply the quotient rule to find a function’s derivative we need to first determine which parts of our function will be called f and g.

Finding f and g

With the quotient rule, it’s fairly straight forward to determine which part of our function will be f and which part will be g. We will always say f is the numerator (top of our fraction) and g is the denominator (bottom of our fraction). So we can say $$f_1(x) \ = \ x \ sin(x)$$ $$g_1(x) \ = ln \ x.$$

Finding f’ and g’

Once we have determined which part of our function we are going to call f and which part will be g, we need to take each of their derivatives so we can use the quotient rule formula.

First we’ll start with finding f’. To find this we need to find the derivative of \(f_1(x)= x \ sin(x)\). Notice this function is actually a product of two simpler functions. So in order to find \(\mathbf{f’_1(x)}\) we will actually need to use the product rule. This will create a smaller sub-problem for us so we will need to come back to the quotient rule in a moment.

Product rule

As we did in the previous example, or in my product rule lesson, we need to start by determining which piece of the function \(f_1(x) = x \ sin(x)\) will be \(f_2\) and which will be \(g_2\).

Finding f and g

When using the product rule it doesn’t really matter which piece of the product is called f and g. So we will say $$f_2(x) = x$$ $$g_2(x) = sin(x).$$

Finding f’ and g’

In order to use the product rule formula, we need to find the derivative of each of these pieces now. Fortunately, both of these pieces are simple functions to differentiate. $$f’_2(x) = 1$$ $$g’_2(x) = cos(x)$$

Plugging into the formula

Now we just need to plug the four pieces we’ve found into the product rule formula. $$f’_1(x) = \ f_2(x) \cdot g’_2(x) \ + \ f’_2(x) \cdot g_2(x)$$ $$\frac{d}{dx} \Big[ x \ sin(x) \Big] \ = \ x \cdot cos(x) \ + \ 1 \cdot sin(x)$$ $$\frac{d}{dx} \Big[ x \ sin(x) \Big] \ = \ x \ cos(x) \ + \ sin(x)$$

Back to the quotient rule

Now that we have used the product rule to find $$f’_1(x) = \ x \ cos(x) \ + \ sin(x)$$ we need to find \(g’_1(x)\) so we can use the quotient rule formula. Remember \(g_1(x) = ln \ x\), which is a function whose derivative you should memorize. $$g’_1(x) = \frac{1}{x}.$$ So now we know all of the pieces we need to apply the quotient rule formula.

$$h'(x) \ = \ \frac{f’_1(x) \cdot g_1(x) \ – \ f_1(x) \cdot g’_1(x)}{g^2_1(x)}$$ $$\frac{d}{dx} \Bigg[ \frac{x \ sin(x)}{ln \ x} \Bigg] \ = \ \frac{ \Big[ \big( x \ cos(x) + sin(x) \big) \cdot ln \ x \Big] \ – \ \Big[ x \ sin(x) \cdot \frac{1}{x} \Big]}{\big( ln \ x \big)^2}$$

And now we can just simplify by distributing through all of our parenthesis.

$$\frac{d}{dx} \Bigg[ \frac{x \ sin(x)}{ln \ x} \Bigg] \ = \ \frac{ x \ ln(x) \ cos(x) \ + \ ln(x) \ sin(x) \ – \ sin(x)}{ln^2(x)}$$

And that’s the answer! Again, we can check this using Wolfram Alpha.

If you have any questions on any of this just let me know! You can email me at jakesmathlessons@gmail.com. You can also use the contact form below and I’ll add you to my email list and send you my calculus 1 study guide to help you boost your calculus scores! I’d also love to hear any suggestions for future posts so please don’t hesitate to reach out to me. If you want some more practice with derivatives go check out my other lessons and problems related to derivatives.

RELATED RATES – Sphere Surface Area Problem

If a snowball melts so that its surface area decreases at a rate of 1 \(\frac{cm^2}{min}\), find the rate at which the diameter decreases when the diameter is 10 cm.

By looking at the given statement, we can gather a few important fact quickly.

  • The object in question is a snowball. This means that we will be dealing with a sphere here, so we will likely be needing some formula relating different dimensions and measurements of a sphere.
  • The problem gives information about the rate of change of a specific measurement of the snowball. When a problem gives information like this, it’s a strong hint that we have a related rates problem.

So we know that we’re dealing with a related rates problem. Therefore, we are going to follow the four steps that these will all follow. If you want to look back at these steps, I discussed them in my related rates lesson.

1. Draw a sketch

Looking back at the problem, you can see that there isn’t a lot of information that has been described to us. This will end up being a very simple sketch, but that’s all it takes sometimes.

sphere related rates problem

So we have a sphere whose surface area is decreasing at a rate of 1 \(\frac{cm^2}{min}\) and we are looking at the instant when its diameter is 10 cm.

2. Come up with your equation

Now that we have our situation drawn out, we need our equation. To create this equation, we need to incorporate any relevant information that we were given and we need to consider what the question asks us to find.

What are we looking for?

The question is asking us to find “the rate at which the diameter decreases” at the instant when the diameter is 10 cm. This is the instant that we captured in our drawing. So the important thing here is that we are looking for the rate the diameter is decreasing. Another way to put this is the rate of change of the diameter.

Since we will eventually need to take the derivative, which will provide the rate of change part, we just need to make sure that our equation contains the diameter.

What do we know about?

This question didn’t provide a lot of information to us. We really only know two things:

  • The rate of change of the sphere’s surface area.
  • The diameter of the sphere at this instant.

Putting it into an equation

Up to this point we have figured out that we need to include the sphere’s diameter in our equation. We also know that we have some information relating to the snowball’s surface area. So we need to come up with an equation that relates a sphere’s surface area and diameter.

A good place to start may be the equation for the surface area of a sphere.

$$A=4 \pi r^2$$

In this equation A represents the surface area of the sphere and r is the radius.

But we don’t know about the radius

Since we need an equation relating the surface area and the diameter, we will need to make an adjustment. The only thing we need to consider here is that a sphere’s diameter is always double the radius. Or in other words

$$d=2r.$$

But our equation contains the radius. So we’ll want to solve for r so we can plug that into our equation. Dividing both sides by 2 will accomplish this.

$$r=\frac{d}{2}$$

Now we can plug this in for r in our equation for the surface area of a sphere.

$$A=4 \pi \bigg( \frac{d}{2} \bigg)^2$$

So we know have an equation that contains only the surface area and the diameter of our sphere, exactly what we needed. To make things a little easier later, we will simplify this equation a bit.

$$A=4 \pi \bigg( \frac{d^2}{4} \bigg)$$

$$A=\pi d^2$$

3. Implicit differentiation

Now that we have created our equation we need to take its derivative. This will bring in the rates of change we discussed earlier. The most important one being the rate of change of the snowball’s diameter which is what we need to find.

Keep in mind that we will be taking the derivative with respect to time. This means we will need to treat A and d as functions of time, not variables. Therefore, we will need to apply the chain rule here.

$$\frac{d}{dt} \big[ A \big]= \frac{d}{dt} \big[ \pi d^2 \big]$$

$$\frac{dA}{dt} = 2 \pi d \cdot \frac{dd}{dt}$$

4. Solve for the desired rate of change

The fourth and final step of a problem like this is to isolate the rate of change we need and find its value. The question wants us to find the rate at which the diameter is decreasing when the diameter is 10 cm. This tells us we need to solve for the rate of change of the diameter, which is represented by \(\frac{dd}{dt}\).

$$\frac{dA}{dt} = 2 \pi d \cdot \frac{dd}{dt}$$

$$\frac{1}{2 \pi d} \frac{dA}{dt} = \frac{dd}{dt}$$

So now that we have isolated the variable that we need to find we can simply plug in all of the values we have for the other variables.

What values do we know?

There are only two variables we need to plug in a value for: d and \(\frac{dA}{dt}\). The question specifically asked us to find \(\frac{dd}{dt}\) when the diameter of the snowball is 10 cm. Therefore, we know that we will have

$$d=10.$$

The question also told us that the surface area of the snowball is decreasing at a rate of 1 \(\mathbf{\frac{cm^2}{min}}\). Since the surface area is decreasing, this tells us that

$$\frac{dA}{dt}=-1.$$

Plugging it all in

Now we just need to go back to our equation and plug in all of these other values.

$$\frac{dd}{dt} = \frac{1}{2 \pi d} \frac{dA}{dt}$$

$$\frac{dd}{dt} = \frac{1}{2 \pi (10)} \cdot (-1)$$

$$\frac{dd}{dt} = \frac{-1}{20 \pi}$$

So this tells us that the diameter of the snowball is changing at a rate of \(\frac{-1}{20 \pi} \ \frac{cm}{min}\). Therefore, we can say that the diameter of the snowball is decreasing at a rate of \(\mathbf{\frac{1}{20 \pi} \ \frac{cm}{min}}\) or about 0.0159 \(\mathbf{\frac{cm}{min}}\).

Note that the question asked for the rate at which the diameter is decreasing. As a result of this, our answer will actually be a positive number despite the fact that \(\mathbf{\frac{dd}{dt}}\) was negative.

If you’re still having some trouble with related rates problems or just want some more practice you should check out my related rates lesson. At the bottom of this lesson there is a list of these types of problems that I have posted a solution of. I also have several other lessons and problems on the derivatives page you can check out. If you can’t find the topic or question you’re looking for just let me know by emailing me at jakesmathlessons@gmail.com!

Enter your name and email below and I’ll send you a FREE copy of my calculus 1 study guide as well! It’s packed full of helpful formulas and shortcuts to help you get through calculus easier!

RELATED RATES – 4 Simple Steps

Related rates problems are one of the most common types of problems that are built around implicit differentiation and derivatives.  Typically when you’re dealing with a related rates problem, it will be a word problem describing some real world situation.

Typically related rates problems will follow a similar pattern.  They can usually be broken down into the following four related rates steps:

  • The first thing you will usually want to do after reading the problem is to draw a sketch of the situation being described.
  • Then you will need to come up with some equation that relates the different quantities described to you, which may be volumes, areas, or distances.
  • Once you have this equation, you’ll perform implicit differentiation on both sides of the equation, usually with respect to time.
  • Then you just need to solve for the desired rate of change that the question is asking about.

I always think the best way to learn a new concept is practice, practice, practice.  So let’s jump into an example.  If you want to skip ahead, there is a list of other examples at the bottom of this page with a link to their solutions.

Example 1

At noon, ship A is 150 km west of ship B.  Ship A is sailing east at 35 km/h and ship B is sailing north at 25 km/h.  How fast is the distance between the ships changing at 4:00 PM?

1. Draw a sketch

Like I said before, the best thing to do first is draw a picture of what is being described.  The problem tells us where these ships are, and the direction and speed at which they’re moving at noon, so I think we should start by drawing our scene at noon, seen in Figure 2.1.

Related rates ships' position at Noon.
Figure 2.1

Now let’s think about what will be happening between noon and 4:00 PM.  We know the speed and direction both of these ships are traveling.  We also know that they will be moving for 4 hours before we consider their position again.

Ship A:  This ship is moving 35 km/h for 4 hours.  Therefore, between noon and 4:00 PM we know it will move east

$$35\frac{km}{h}*4h=140km.$$

Ship B:  This ship is moving 25 km/h for 4 hours.  Therefore, between noon and 4:00 PM we know it will move north

$$25\frac{km}{h}*4h=100km.$$

Considering both of these facts, at 4:00 PM, our scene would look something like this:

Related rates ships' position at 4:00 PM.
Figure 2.2

2. Come up with your equation

Now, the next thing we need to do is come up with an equation that relates the different distances given based on where the boats are at 4:00 PM.  We also want to consider what the question is asking before we come up with this equation.  The question is asking us to find how fast the distance between the boats is changing.  We won’t be able to find an equation for this right away, but this tells us that we need an equation that involves the distance between the two boats.  From there, we can figure out how fast that distance is changing.

To do this, we will want to think of the drawing in Figure 2.2 as a triangle.  The three vertices of the triangle would be ship A, ship B, and the point in the water where boat B was at noon, which is shown in the drawing above.  Doing this gives us something like this:

Ships' position drawn as a triangle to come up with the relates rates equation.
Figure 2.3

It is important to remember that both ships are still moving, they don’t stop at 4:00.  As a result of this, the sides of our triangle are not constants.  Instead, they would be variables, so the triangle we may want to consider is this one:

Related rates triangle labeled for transition to Pythagorean Theorem.
Figure 2.4

From this, we can create our equation.  What we want to think about is what variable has to do with the value the question is asking us to find and what variables do we know something about.

What are we looking for?

The question asks us to find how fast the distance between the ships is changing.  By comparing Figure 2.4 to the prior drawings, we can see that side \(z\) is the one that represents the distance between the two ships.  Therefore, we will need to include \(z\) in our equation which we will eventually differentiate.

What do we know about?

This is where we want to consider the actual numerical values we have figured out and how they relate to the different variables in our drawing.  At 4:00 PM we know the values of \(x\) and \(y\).  We also know the speed at which the ships are moving in relation to a fixed point, which is the vertex of the triangle that makes up the right angle.  Therefore, we not only know the values of \(x\) and \(y\), but we also know their rates of change.  These will simply be the speeds of the ships.

Putting it into an equation.

We need an equation that relates the thing we are looking for with the things we already know.  Since we’re looking for some information about \(z\) (the rate of change of \(z\)), and we know everything about \(x\), \(y\), and both of their rates of change at 4:00, we need an equation relating \(x\), \(y\), and \(z\).

Since we know the relationship between these variables is that they are the side lengths of a right triangle, the simplest equation we can use is Pythagorean Theorem.  Based on this we know that

$$z^2=x^2+y^2.$$

3. Implicit differentiation

Now that we have our equation, we need to take its derivative.  This is where the implicit differentiation comes in.  Before we do this, let’s think about what we want to differentiate with respect to.

I mentioned in the beginning of this article that we will usually differentiate with respect to time.  The reason for this is that \(x\), \(y\), and \(z\) are all changing as time passes.  If fact, since we know the ships’ initial positions and their velocities, we could actually write \(x\), \(y\), and \(z\) as functions of time.  Therefore, when we differentiate both sides of our equation, we will treat \(x\), \(y\), and \(z\) as functions, and time (represented by \(t\)) will be the variable.  If you want a bit more explanation on the next few step, I explained this a bit more here.

$$z^2=x^2+y^2$$

$$\frac{d}{dt}\big[ z^2\big]=\frac{d}{dt}\big[ x^2+y^2\big] $$

$$2z\frac{dz}{dt}=2x\frac{dx}{dt}+2y\frac{dy}{dt}$$

Now we can divide both sides by \(2\) to simplify.

$$z\frac{dz}{dt}=x\frac{dx}{dt}+y\frac{dy}{dt}$$

4. Solve for desired rate of change

Now remember, the thing we are trying to find in this problem is the rate of change of \(z\).  This is exactly what \(\frac{dz}{dt}\) represents, so we will solve for this by dividing both sides by \(z\).

$$\frac{dz}{dt}=\frac{x\frac{dx}{dt}+y\frac{dy}{dt}}{z}$$

All we have left to do now is plug in all the pieces on the right side of the equation and that would give us our answer.  We are looking for the value of \(\frac{dz}{dt}\) at 4:00 PM, so we need to use the values of all the other variables based on what they are at 4:00 PM also.  We can gather most of the information we need from Figure 2.2, shown above.  Here it is again:

Ships' movement compared to related rates triangle problem.
Figure 2.2

Clearly, we can see that \(x=10km\) and \(y=100km\) at 4:00.  We also know the value of \(\frac{dx}{dt}\) and \(\frac{dy}{dt}\). The reason for this is that these two things represent the rate of change of \(x\) and \(y\).  Since \(x\) and \(y\) represent the distance between each of the ships and a fixed point, \(\frac{dx}{dt}\) and \(\frac{dy}{dt}\) would be given by the speed of each ship.  It is also important to point out that is works because the ships are moving directly toward the fixed point or directly away from the fixed point.  The length of \(x\) is shrinking by \(35\frac{km}{h}\) because ship A is moving at that speed.  Therefore, we know

$$\frac{dx}{dt}=-35\frac{km}{h}.$$

Notice this value is negative.  This is simply because \(x\) is getting smaller at 4:00.  Similarly, we know that \(y\) is getting larger by \(25\frac{km}{h}\) at 4:00 and therefore we can say that

$$\frac{dy}{dt}=25\frac{km}{h}.$$

Now the only thing we still need to figure out is the value of \(z\) at 4:00 PM.  To do this, let’s go back to our Pythagorean Theorem equation we looked at earlier.  We know

$$z^2=x^2+y^2.$$

Since we already know the values of \(x\) and \(y\) at 4:00, we can just plug them into the Pythagorean Theorem equation to get the value of \(z\) at 4:00.

$$z^2=10^2+100^2$$

$$z^2=100+10,000$$

$$z^2=10,100$$

$$z=\sqrt{10,100}$$

Now that we have all the pieces figured out, we can go back and plug them into our equation for \(\frac{dz}{dt}\).

$$\frac{dz}{dt}=\frac{10*(-35)+100*25}{\sqrt{10,100}}$$

$$\frac{dz}{dt}=\frac{2,150}{\sqrt{10,100}}\approx 21.393\frac{km}{h}$$

So we can say that the distance between the two ships is changing at about \(21.393\frac{km}{h}\) at 4:00 PM.

Other Examples

Like I said before, the best way to gain an understanding of related rates problems is practice.  Here are some more complete solutions of other fun related rates problems.  Just click on the problem to see the full solution.

Triangles

A kite 100 ft above the ground moves horizontally at a speed of 8 ft/s. At what rate is the angle between the string and the horizontal decreasing when 200 ft of string has been let out?

A plane flies horizontally at an altitude of 5 km and passes directly over a tracking telescope on the ground. When the angle of elevation is pi/3, this angle is decreasing at a rate of pi/6 rad/min. How fast is the plane traveling at this time?

The top of a ladder slides down a vertical wall at a rate of 0.15 m/s. At the moment when the bottom of the ladder is 3 m from the wall, it slides away from the wall at a rate of 0.2 m/s. How long is the ladder?

Squares

Each side of a square is increasing at a rate of 6 cm/s. At what rate is the area of the square increasing when the area of the square is 16 cm^2?

Cones

Water is leaking out of an inverted conical tank at a rate of 10,000 cm^3/min at the same time water is being pumped into the tank at a constant rate. The tank has a height 6 m and the diameter at the top is 4 m. If the water level is rising at a rate of 20 cm/min when the height of the water is 2 m, find the rate at which water is being pumped into the tank.

Spheres

If a snowball melts so that its surface area decreases at a rate of 1 cm^2/min, find the rate at which the diameter decreases when the diameter is 10 cm.

The radius of a sphere is increasing at a rate of 4 mm/s. How fast is the volume increasing when the diameter is 80 mm?

Cylinders

A cylindrical tank with radius 5 m is being filled with water at a rate of 3 m^3/min. How fast is the height of the water increasing?

As always, I’d love to see your questions!  You can leave a comment below or email your questions to me at jakesmathlessons@gmail.com.  Whether you have questions about this lesson or want me to post a solution for another problem you’re stuck on, just send me a message.

Implicit Differentiation

Before getting into implicit differentiation, I would like to take some time to discuss variables, functions, and constants.  The reason for this is that when you do an implicit differentiation problem, you will likely be dealing with equations containing multiple letters.

Up to this point, most of the functions you have taken the derivative of usually contain one variable, usually \(x\), and any other letters in the function would be constants.  But with implicit differentiation, you will also need to deal with having another letter that represents another unknown function.

Before you start implicitly differentiating a problem I recommend determining whether each letter represents a function, or if it’s a variable or a constant.  This is because each one will be treated differently when you take its derivative.  Since implicit differentiation is essentially just taking the derivative of an equation that contains functions, variables, and sometimes constants, it is important to know which letters are functions, variables, and constants, so you can take their derivative properly.

In many cases, the problem will tell you if a letter represents a constant.  If a letter is a constant, that means you would treat it like it’s a number.  If this is a little confusing, just imagine what would happen if you were to actually put some number in for the constant and think about what would happen to that number when you take the function’s derivative.  Then revert back to having the letter in the equation and treat the constant the same way you treated the number.

Let’s jump into an example and I will explain the process along the way.

Example 1

Find the derivative of \(f(x)=cx^2+d\) where \(c\) and \(d\) are constants.

What to do with constants?

Like I said before, since \(c\) and \(d\) are constants, we can treat them as if they are just some number and take the derivative of the remaining function with \(x\) being the variable.

Let’s imagine \(c\) and \(d\) have been replaced with \(2\) and \(4\) respectively, and see what happens.

$$f(x)=2x^2+4$$

This is a case where we can just use the power rule to find:

$$f'(x)=2(2x)=4x$$

Now, we can revert back to having \(c\) and \(d\) in our function and we would see that:

$$f(x)=cx^2+d$$

$$f'(x)=c(2x)$$

$$f'(x)=2cx$$

Notice, the \(d\) disappeared because the derivative of a constant is just \(0\).

What about functions and variables?

Now that we have discussed some methods for identifying constants and how to deal with them when taking a derivative, I will discuss indicators for classifying letters that represent functions and those that are variables.

Frequently, when doing an implicit differentiation problem, you will simply be asked to find \(\frac{dy}{dx}\).  Then you will be shown some equation that contains at least one \(y\) and at least one \(x\).  Although this seems like you haven’t been given much direction, the \(\frac{dy}{dx}\) is actually an indicator that gives us all the information we need.  This notation is one way to write:

The derivative of \(y\) with respect to \(x\).

Or in other words, it’s telling you that you are trying to find the derivative of your function, \(y\), with respect to the variable, \(x\).  Which tells you that \(y\) is a function of \(x\).

In fact, this notation will always give you those two pieces of information.  For example, \(\frac{dh}{dt}\) is a symbol that represents “the derivative of \(h\) with respect to \(t\).”  Therefore, \(h\) must be a function and \(t\) must be its variable.

Example 2

Find \(\frac{dy}{dx}\) if \(y^2=4x^5-e^x\).

In a problem like this, since we know we need to find \(\frac{dy}{dx}\) and we are given an equation which relates \(y\) and \(x\), we need to find the derivative of both sides of the equation.

$$y^2=4x^5-e^x$$

Now we can take the derivative of both sides.  Remember, as long as we do the same thing to both sides of an equation, the results will be equal to each other also.

$$\frac{d}{dx}\big[y^2\big]=\frac{d}{dx}\big[4x^5-e^x\big]$$

The Left Side of the Equation:

The \(\frac{d}{dx}\) just means that you need to take the derivative of whatever follows, treating \(x\) as the variable.  The left side of this equation is the tricky part.  Since the question told us to find \(\frac{dy}{dx}\), we know that \(y\) is a function of \(x\).  The fact that \(y\) is a function tells us that we can’t just use the power rule to find the derivative of the left side of the equation.  We will actually need to use the chain rule.

We need to do the chain rule because \(y\) is not a variable here.  Since \(y\) is a function of \(x\) and we are taking the derivative with respect to \(x\), we cannot say that the derivative of \(y^2\) is \(2y\)!  Now that we have determined that we need to use the chain rule, we need to determine our inside and outside functions.  Remember, we need to figure out some \(f(x)\) and a \(g(x)\) so that \(f\big(g(x)\big)=y^2\) (if you need a refresher on the chain rule, click here).

Typically, when we have a letter that represents a function and we take its derivative with respect to a different variable, we can call our inside function just the single letter which represents a function.  Therefore, we can say our inside function is \(g(x)=y\).

Now, to find our outside function, we can look at the entire function and replace the inside function with a single \(x\).  We are replacing it with an \(x\) because that is the variable we are differentiating with respect to.  So if we take our function (\(y^2\)) and replace the inside function (\(y\)) with a single \(x\), we are left with our outside function \(f(x)=x^2\).  At this point we have figured out:

$$f(x)=x^2,$$

$$g(x)=y.$$

The next thing we need to do is find the derivative of both our inside and outside functions.  Finding \(f'(x)\) can be found simply using the power rule:

$$f'(x)=2x.$$

Now we need to find \(g'(x)\).  This is a little more tricky.  The key thing, which I will continue to remind you of, is that we are taking the derivative of \(y\) with respect to \(x\).  Therefore, we cannot say that the derivative of \(y\) is \(1\).

In fact, we do not know the derivative of \(y\).  Since \(y\) is some function of \(x\) that we actually don’t know, we can’t explicitly write its derivative either.  But luckily, we don’t need to be able to do this.  All we need to say is that the derivative of \(y\) is the symbol I mentioned earlier which represents “the derivative of \(y\) with respect to \(x\).”  We can simply use \(\frac{dy}{dx}\) to represent this.  Therefore, we know that:

$$g'(x)=\frac{dy}{dx}.$$

Now we can just use these pieces and plug them into the chain rule formula.

$$\frac{d}{dx}\big[y^2\big]=f’\big(g(x)\big)\cdot g'(x)$$

$$\frac{d}{dx}\big[y^2\big]=2(y)\cdot \frac{dy}{dx}$$

$$\frac{d}{dx}\big[y^2\big]=2y\frac{dy}{dx}$$

The Right Side of the Equation:

Finding \(\frac{d}{dx}\big[4x^5-e^x\big]\) is quite a bit easier than the left side of the equation.  Since this side contains no other letters besides \(x\), which is the variable we are differentiating with respect to, this will be like any other derivative we have taken up to this point.

$$\frac{d}{dx}\big[4x^5-e^x\big]=4(5x^4)-e^x$$

$$\frac{d}{dx}\big[4x^5-e^x\big]=20x^4-e^x$$

Putting It All Together:

Back to our original equation, we had:

$$\frac{d}{dx}\big[y^2\big]=\frac{d}{dx}\big[4x^5-e^x\big].$$

And as we just showed above, this means:

$$2y\frac{dy}{dx}=20x^4-e^x.$$

Now, once we have taken the derivative of both sides, you can see that our equation contains a \(\frac{dy}{dx}\).  Since our goal here is to find \(\frac{dy}{dx}\), now that we have an equation that contains it, all we have to do is solve for \(\frac{dy}{dx}\).

All we have to do is divide both sides by \(2y\).

$$\frac{2y\frac{dy}{dx}}{2y}=\frac{20x^4-e^x}{2y}$$

Once we simplify the left side we are left with

$$\frac{dy}{dx}=\frac{20x^4-e^x}{2y}.$$

Although this looks a little strange, since our equation for \(\frac{dy}{dx}\) contains both \(x\) and \(y\), this is sometimes the best we can do.  Implicit differentiation is most useful in the cases where we can’t get an explicit equation for \(y\), making it difficult or impossible to get an explicit equation for \(\frac{dy}{dx}\) that only contains \(x\).  Therefore, we have our answer!

I would like to point out that this example is actually a case where we could have solved for \(y\) in terms of \(x\) before taking the derivative.  Doing this would have meant that we could have used other derivative tricks and avoided implicit differentiation, but the way I solved it shows the process of implicit differentiation which is applicable in cases where it is absolutely necessary.

In those cases the general idea and process is the same: we have some function that relates \(y\) and \(x\) and we need to take the derivative of both sides, then use algebra to solve for \(\frac{dy}{dx}\).  This may not always be as simple as the above example, but the process will be extremely similar.

Example 3

Find \(\frac{dy}{dx}\) if \(y=x^x\).

This problem is going to be a bit more tricky than the first two examples.  Click here to see the full solution.

More Examples

\(\mathbf{1. \ \ ycos(x) = x^2 + y^2} \) | Solution

\(\mathbf{2. \ \ xy=x-y} \) | Solution

\(\mathbf{3. \ \ x^2-4xy+y^2=4} \) | Solution

\(\mathbf{4. \ \ \sqrt{x+y}=x^4+y^4} \) | Solution

\(\mathbf{5. \ \ e^{x^2y}=x+y} \) | Solution

As always, don’t forget to let me know if you have any questions on this lesson or if you have any suggestions for other lessons you want to see in the future.  Go check out my derivatives page to see what other material I’ve covered.  I want to know what you want to see on this site, so any and all suggestions and questions are welcome if you can’t find an answer to your question in another lesson.  Just go ahead and leave a comment on this post or email me at jakesmathlessons@gmail.com!

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:

$$f(x)=\sqrt{x}$$

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:

$$f'(x)=56x^{55}$$

$$g'(x)=3x^2$$

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)\).

$$h'(x)=\Big(56\big(x^3+18\big)^{55}\Big)\Big(3x^2\Big)$$

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

$$h'(x)=168x^2\big(x^3+18\big)^{55}$$

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 jakesmathlessons@gmail.com!

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)\):

$$\frac{d}{dx}\Bigg[\frac{f(x)}{g(x)}\Bigg]=\frac{\frac{d}{dx}\big[f(x)\big]g(x)-f(x)\frac{d}{dx}\big[g(x)\big]}{\big(g(x)\big)^{2}}$$

$$\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:

$$f(x)=e^x$$

$$g(x)=\sqrt{x}=x^\frac{1}{2}$$

$$f'(x)=e^x$$

$$g'(x)=\frac{1}{2}x^{-\frac{1}{2}}$$

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:

$$h'(x)=\Bigg(\frac{e^x}{\sqrt{x}}\Bigg)’=\frac{\Big(x^\frac{1}{2}\Big)(e^x)-(e^x)\Big(\frac{1}{2}x^{-\frac{1}{2}}\Big)}{\big(\sqrt{x}\big)^2}=\frac{e^x\Big(x^\frac{1}{2}-\frac{1}{2}x^{-\frac{1}{2}}\Big)}{x}$$

$$=e^x\Big(x^{-\frac{1}{2}}-\frac{1}{2}x^{-\frac{3}{2}}\Big)$$

Please don’t forget to leave a comment or email me at jakesmathlessons@gmail.com 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

$$g'(x)=\frac{1}{2}x^{-\frac{1}{2}}.$$

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:

$$f(x)=e^{x}$$

$$g(x)=\sqrt{x}=x^{\frac{1}{2}}$$

$$f'(x)=e^{x}$$

$$g'(x)=\frac{1}{2}x^{-\frac{1}{2}}$$

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.

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

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 jakesmathlessons@gmail.com.  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. **