## Optimization Problems Part 2

In my last lesson, I introduced optimization problems and I discussed local extrema. You should check that out if you haven’t already. The next thing that I would like to discuss now is finding global maximums and minimums. The first step in finding a global maximum or minimum of a function is actually very similar to finding the local max and min values.

#### But once you know about the local maximums and minimums, how do you find the global extrema?

Finding the global extrema from the local extrema is really quite simple. And there really is only one way to find the global maximum and minimum values of a function. You just need to find a list of all possible x values where the global max or global min may occur. Then once you have created a list of all possibilities, you just plug them all into the original function.

Not the function’s derivative or the function’s second derivative. But the original function.

You will test for global extrema of f(x) using f(x), not f'(x) or f”(x). This is after you have your list of all possible locations where the global extrema could occur (which will require the use of f'(x)). But my point is that there wouldn’t be a first derivative test or a second derivative test with the global extrema like there was with finding local extrema.

## So what does this look like in practice?

Let’s use an example. For example, let’s say that we are asked to find the global maximum and the global minimum of $f(x)=2x^3-\frac{5}{2}x^2+x-1$ on the domain $-4 \leq x \leq 5$.

Notice we are being asked to find the global extrema on a specific domain. This is important because a lot of functions either go to infinity or to negative infinity as x either gets infinitely large, infinitely small, or approaches some specific value. So if we were asked to find the global maximum of a function that goes to infinity as x goes to infinity, we wouldn’t be able to do this. There would be no maximum since the function only continues to grow.

So we know we will be limited to a specific domain.

As I said before, finding global extrema starts out exactly like finding local extrema. The first thing we need to do is find the critical values of our function. To do this, we just need to find its derivative and set $f'(x)=0$ and solve for x.

$$f(x)=2x^3-\frac{5}{2}x^2+x-1$$ $$f'(x)=6x^2-5x+1$$ Then set $$6x^2-5x+1=0$$ and solve for x to find the critical values. To do this, we can factor the left side of the equation. $$(3x-1)(2x-1)=0$$ To solve this we can set each factor equal to zero individually. $$3x-1=0 \ \ \ \ and \ \ \ \ 2x-1=0$$ $$3x=1 \ \ \ \ and \ \ \ \ 2x=1$$ $$x=\frac{1}{3}, \ \frac{1}{2}$$

So now we know that this function has two critical values, $x= \frac{1}{3}$ and $x=\frac{1}{2}$. Now this is where things get different with a global max/min problem versus finding the local max/min. We also need to consider the endpoints of our given domain as critical values!

This will always be the case when we are looking for a global maximum or minimum. The problem asked us to find the global extrema on the domain $-4 \leq x \leq 5$. Therefore, we will also say that $x=-4$ and $x=5$ will be treated as critical values that we need to test.

### So how to we test our critical values?

The first thing that I would like to do is list out all of the x values we will be testing in one place. Remember, the list of values we need to test came from two places:

1. Setting $f'(x)=0$ and solving for x.
2. Each of the endpoints of the domain on which we need to find the global maximums and minimums.

So in this case we’ll have four total x values that we need to test: $$x=-4, \ \frac{1}{3}, \ \frac{1}{2}, \ and \ 5$$ To test these points, all we need to do is plug each of the four points into f(x). Whichever on outputs the largest number will tell us the global maximum. Whichever outputs the smallest number will tell us the global minimum.

$$f(-4)= \ 2(-4)^3-\frac{5}{2}(-4)^2+(-4)-1 \ = -173$$ $$f \bigg( \frac{1}{3} \bigg) = \ 2 \bigg( \frac{1}{3} \bigg) ^3-\frac{5}{2} \bigg( \frac{1}{3} \bigg) ^2+ \bigg( \frac{1}{3} \bigg) -1 \ = -\frac{47}{54}$$ $$f \bigg( \frac{1}{2} \bigg) = \ 2 \bigg( \frac{1}{2} \bigg) ^3-\frac{5}{2} \bigg( \frac{1}{2} \bigg) ^2+ \bigg( \frac{1}{2} \bigg) -1 \ = -\frac{7}{8}$$ $$f(5)= \ 2(5)^3-\frac{5}{2}(5)^2+(5)-1 \ = \frac{383}{2}$$

So we can see that the smallest of these four numbers is -173 and the largest of them is $\frac{383}{2}$. Therefore, the global maximum of f(x) on $-4 \leq x \leq 5$ is $\frac{383}{2}$ which occurs when $x=5$. And the global minimum of f(x) on $-4 \leq x \leq 5$ is -173 which occurs when $x=-4$.

We can even graph our function using Desmos along with the critical points to make sure our answer makes sense. You can click on the link in the last sentence to see a larger version of the graph.

## Extra practice

If you’d like some extra practice finding global maximums and minimums, here are a few examples you can work through on your own. A couple of these examples will require the use of the product rule and quotient rule.

For each of the following, find the global maximum and minimum of the given function on the given domain or explain why one doesn’t exist.

$$f(x)= 2x^4 + 5x^2 – 12x \ \ \textrm{on the domain} -1 \leq x \leq 2$$ $$g(x)= xe^x +6x^3-12 \ \ \textrm{on the domain} -3 \leq x \leq 0$$ $$h(x)= \frac{x^4-3x^2+1}{x+1} \ \ \textrm{on the domain} -2 \leq x \leq \frac{3}{2}$$ $$j(x)= \frac{x^4-3x^2+1}{x+1} \ \ \textrm{on the domain} -\frac{9}{10} \leq x \leq \frac{3}{2}$$

Hopefully all of this helps with global maximums and minimums, but as always I’d love to hear your questions if you have any. If you find that you get stuck as you’re working through some of these extra practice problems just let me know. Just email me at jakesmathlessons@gmail.com and I’ll see if I can help provide a bit more clarification. You can also use the form below to subscribe to my email list and I will send you my bonus FREE calculus 1 study guide to help you survive calculus! Just put in your name and email address and I’ll be sure to let you know when I post new content! Feel free to go check out my other lessons and solutions about derivatives as well.

## Optimization Problems

Optimization problems are another common application of the derivative. Usually in these problems you are given some function or described some situation and are then asked to find different maximums and minimums. There are a few different things that are commonly asked that you optimize, so I’d like to go over the different categories with you.

## Local maximums and minimums

The most common thing that comes up in optimization problems is finding the local maximums and minimums. The best way to do this is using the derivative of the function you are trying to optimize. Taking the function’s derivative will tell you everything you need to know.

In order to find the list of all x values where the local extrema may occur, you just need to take the function’s derivative, set it equal to zero, and solve for x. In other words, you can find the x values that will give you local max and min values by setting up the equation $$f'(x)=0$$ and solving it for x. Keep in mind, this equation often has multiple solutions, so make sure you include all possible solutions.

Doing this will give you a list of x values where all possible local maximums and minimums occur. These are called critical numbers.

Once you have your list of critical points, you will often need to figure out which ones are maximums and minimums. There are two tests you can conduct to figure which one they are.

### First derivative test

This is usually the method I like to use. As you might guess, the first derivative test only requires the use of the first derivative. I usually use this test because we already had to find the first derivative to get our list of critical values.

The first thing I would suggest doing before beginning your test is drawing out a number line and putting your critical values on it. Let’s just say for example that we had some function f(x), took its derivative, and found that the critical values are $x=-1, \ 2, \ 6$. Our number line might look something like this.

That’s all you need on your number line at this point. Don’t label any extra x values besides your critical values. It will only make things more confusing later.

Now all we need to do is plug x values into f’ that are around these critical values to figure out where f is increasing and decreasing. So we will need to plug in some number that is in each of the following 4 intervals. $$x<-1,$$ $$-1 < x < 2,$$ $$2 < x < 6,$$ $$x>6.$$ So all we need to do is just plug in some number in each segment of our labeled number line.

It doesn’t matter which number you plug in from each of those intervals, so you can pick whichever numbers seem easiest to plug into f’. Let’s say we will plug $x=-2, \ 0, \ 4, \ 7$ into f’. We want to plug them into f’ because we are trying to figure out information about the slope of f. This will tell us where it’s increasing and decreasing. Let’s imagine we plug these four x values into f’ and find that $$f'(-2)=-4, \ \ \ f'(0)=6, \ \ \ f'(4)=2, \ \ \ f'(7)=-7.$$

We only really care if these values are positive or negative. If f’ is positive at a certain x value, we know f must have a positive slope. And if f’ is negative at a certain x value, we know f must have a negative slope.

Since f'(-2) is negative, f must have a negative slope at $x=-2$. And f must also have a negative slope for all $x<-1$ since that is the interval from our number line that $x=-2$ falls within. So we should label this interval with a negative slope, like this:

Then we want to do the same thing for the interval of $-1 \leq x \leq 2$. We found out that $f'(0)=6$, which is a positive number. Therefore, f must have a positive slope for all $-1 \leq x \leq 2$. So we can label our number line accordingly.

Then we want to do the same thing with the other two intervals. This would give us something like this for our number line:

Now we just need to use this number line to determine which critical values are maximums and which are minimums. There are really only 3 main cases you need to think about for each critical value.

1. If f is increasing to the left and decreasing to the right, that critical point will be a local maximum. This will cause this little section of the graph to look like a frowny face. Therefore, the critical point will higher than the graph right around it.
2. If f is decreasing to the left and increasing to the right, that critical point will be a local minimum. This will cause this little section of the graph to look like a smiley face. Therefore, the critical point will lower than the graph right around it.
3. If f is decreasing to the left and the right or if it’s increasing to the left and the right, that critical point will NOT be a local maximum or a local minimum.

So let’s look at each of our three critical values on the number line above and see which category they all fall into.

• For $x=-1$, you can see that f is decreasing on the left side and increasing on the right side. Therefore, the section of the f(x) right around $x=-1$ looks like a smiley face and would be a local minimum.
• For $x=2$, you can see that f is increasing on the left side and increasing on the right side. Therefore, the critical value $x=2$ would not be a local maximum or a local minimum. We would need f(x) to change direction at $x=2$ for it to be a maximum or minimum, but that doesn’t happen here.
• For $x=6$, you can see that f is increasing on the left side and decreasing on the right side. Therefore, the section of the f(x) right around $x=6$ looks like a frowny face and would be a local maximum.

### Second derivative test

The other way you can test to see if each critical value is a local maximum or a local minimum is with the second derivative test. You do not need to use both methods if you are only trying to find local extrema because they will give you the same conclusions. Just pick which test you like more. This method will require us to find the second derivative of our function, or f”(x). We can find this simply by finding the derivative of f'(x), which we already found.

Just like with the first derivative test, it helps to draw everything out on a number line. Start with just drawing a number line that only contains the critical values which we found a while ago.

Now we need to plug each of our critical values into our second derivative, or f”(x). One important difference is that we had to plug numbers around our critical values with the first derivative test. But with the second derivative test, we will actually plug in the critical values instead of numbers around them.

Since we need to plug each critical value into our second derivative, this means we will plug $x=-1, \ \ 2, \ \ 6$ into f”(x). When we do that, let’s imagine we find that $$f”(-1) = 2, \ \ f”(2) = 0, \ \ f”(6) = -9.$$

Just like before, it doesn’t really matter what the exact values are that we just found. All that matters is whether they are positive, negative, or zero. If f” is positive at a certain point, then f would be concave up at that point. And if f” is negative at a point, then f is concave down at that point. If f” is zero, then f isn’t concave up or concave down at that point.

Since f”(-1) is positive (we just found that it’s 2), we know that f is concave up when $x=-1$. That just means that it’s curved upward, like a smiley face. So we can indicate this on our number line to keep track of what we have so far.

Since f”(2) is zero, we know that f is not concave up or down when $x=2$. This tells us that $x=2$ is the point where f switches from being concave up to concave down, or vise versa. Since f doesn’t have concavity (curvature) here, we will show this as a flat line on our number line.

And lastly, since f”(6) is negative (we just found that it’s -9), we know that f is concave down when $x=6$. That just means that it’s curved downward, like a frowny face. Therefore, we might get something like this.

So now we just need to figure out what all this means when it comes to the second derivative test. Again, there are three cases we want to look for.

1. If f(x) is concave up, or f”(x) is positive, for some critical value x, then this critical value represents a local minimum.
2. If f(x) is concave down, or f”(x) is negative, for some critical value x, then this critical value represents a local maximum.
3. If f(x) isn’t concave up or down, or f”(x) is zero, for some critical value x, then this critical value could be a local minimum or local maximum or neither.

So let’s compare these to our critical values to see if they are each local maximums or minimums.

• For $x=-1$, you can see that f is concave up. Therefore, the section of the f(x) right around $x=-1$ looks like a smiley face and would be a local minimum.
• For $x=2$, you can see that f is not concave up or concave down. In this case we don’t know from the second derivative test if this critical value would be a local maximum or a local minimum.
• For $x=6$, you can see that f is concave down. Therefore, the section of the f(x) right around $x=6$ looks like a frowny face and would be a local maximum.

Notice that these are the exact same results we found from the first derivative test, aside from the undetermined critical value. I know we didn’t actually have a function for f(x) to work through, but you would find the same thing if you did actually go through these processes with some function. To find which critical values are local maximums, local minimums, or neither, you only need to do one of these two tests.

### Extra practice

Find the critical values for the following functions and determine whether each one is a local minimum, local maximum, or neither. A couple of these examples will require the use of the product rule and the quotient rule, so check those out if you need a refresher.

$$f(x)= 2x^4 + 5x^2 – 12x$$ $$g(x)= xe^x +6x^3-12$$ $$h(x)= \frac{x^4-3x^2+1}{x+1}$$

Hopefully all of this helps you gain a bit of a better understanding of local extrema, but as always I’d love to hear your questions if you have any. Go check out part 2 of my coverage on optimization problems where I go over global maximums and minimums.

## 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.

## Implicit Differentiation Practice Problem

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

## Solution

This is kind of a tricky problem. Obviously, if we need to find $\frac{dy}{dx}$, we need to take the derivative. And since we are already given an explicit formula for y only in terms of x, it seems like we can just go ahead and take the derivative. But unfortunately, having an x both in the base and the exponent makes it a bit more complicated.

### So what can we do then?

Finding the derivative of this function is going to require a little trick that seems a little counter intuitive. What we need to do is actually take the natural log of both sides of this equation. The reason for this is that it will help us get rid of the exponent and put this in a form we can work with more easily.

$$y=x^x$$

$$ln (y) =ln \big( x^x \big)$$

Now that we have done this we can use one of the basic log rules that you will want to remember.

#### 3 log rules to remember

Really quickly I want to list the three main log rules that you will want to remember. These come up frequently, so you will want to remember these.

$$log(ab) = log(a) + log(b)$$ $$log \bigg( \frac{a}{b} \bigg) = lob(a) – log(b)$$ $$log \Big( a^b \Big) = b \cdot log(a)$$

#### How do we apply this to our problem?

Let’s look back to our equation to see where we were.

$$ln (y) =ln \big( x^x \big)$$

Notice the right side of our equation looks a lot like the third log rule from above. Based on that third log rule, we can move the x in the exponent down in front of the log and multiply rather than having to deal with an exponent.

$$ln(y) = x \cdot ln(x)$$

The reason I think this seems a little counter intuitive is that we no longer have an explicit formula for y. But now the right side of our equation will be easier to take its derivative. So now let’s see what happens if we take the derivative of both sides of the equation with respect to x.

### Taking the derivative

The reason we need to take the derivative with respect to x is that the question asked us to find $\frac{dy}{dx}$. The dx in the denominator is the indicator that tells us that we need to differentiate with respect to x. So let’s do that now.

$$\frac{d}{dx} ln(y) = \frac{d}{dx} \big[x \cdot ln(x) \big]$$

#### First the left side

Taking the derivative of the left side of the equation will require the use of the chain rule since y is a function of x. This was explained in a bit more detail in my implicit differentiation lesson. You will also use the fact that the derivative of ln(x) is $\frac{1}{x}$.

$$\frac{1}{y} \cdot \frac{dy}{dx} = \frac{d}{dx} \big[x \cdot ln(x) \big]$$

#### Then the right side

In order to take the derivative of the right side of this equation, we will need to use the product rule. As I did in the product rule lesson, we’ll first want to call one part of our function f and the other will be g.

$$f=x$$ $$g=ln(x)$$

Now we need to find f’ and g’ to use the product rule formula.

$$f’=1$$ $$g’=\frac{1}{x}$$

And lastly, we just need to plug these four pieces into the product rule formula.

$$\frac{1}{y} \cdot \frac{dy}{dx} = (x) \bigg( \frac{1}{x} \bigg) + (1) \big( ln(x) \big)$$

Now that we have taken the derivative of both sides of the equation, we just need to simplify the equation and solve for $\frac{dy}{dx}$.

### Solving for dy/dx

$$\frac{1}{y} \cdot \frac{dy}{dx} = (x) \bigg( \frac{1}{x} \bigg) + (1) \big( ln(x) \big)$$

$$\frac{1}{y} \cdot \frac{dy}{dx} = 1 + ln(x)$$

And all we need to do from here is multiply both sides by y to isolate $\frac{dy}{dx}$.

$$\frac{dy}{dx} = y \big( 1+ln(x) \big)$$

With most implicit differentiation problems this would be a perfectly fine place to stop and say we’ve reached our answer. Finding $\frac{dy}{dx}$ in terms of x and y is frequently the best we can do. But in this case, we can actually get our answer only in terms of x so that we have an explicit derivative of the original function.

The reason we’re able to do this is that our original function was an explicit formula for y. Since we know $y=x^x$ we can actually go to our formula for $\frac{dy}{dx}$ and replace the y with $x^x$. So,

$$\frac{dy}{dx} = x^x \big( 1+ln(x) \big)$$

And now we can say we have reached our answer!

I just want to circle back to those 3 log rules I discussed above. They can be very useful when taking derivatives of exponential functions, or in some strange cases products and quotients. They can be used to rewrite complex functions in a way that would make their derivative easier to find, so always be sure to be aware of those and know how to use them to manipulate a function when needed.

As I always say, the best way to learn this stuff is practice, practice, practice! So check out some of my other lessons and problem solutions on derivatives. The more you work with these concepts, the better you’ll start to understand them.

If you can’t find the answer to your question or the topic you want to read about on my site, send me an email at jakesmathlessons@gmail.com and I’ll get back to you as soon as I can. You can also use the form below to join my email list and I’ll send you my calculus 1 study guide!

## RELATED RATES – Cylinder Problem

A cylindrical tank with radius 5 m is being ﬁlled with water at a rate of 3 $\frac{m^3}{min}$. How fast is the height of the water increasing?

This is an interesting example because at first glance it doesn’t seem like we have been given enough information to solve this problem. If you compare this to the related rates cone problem we did, you can notice a few things that were given in that example but not this one.

• We don’t know the height of the cylindrical tank.
• We don’t know the height of the water at the instant we need to find its rate of change.

These things were both given in the cone problem we did.

You may want to check out this video of this problem. I solved it in a slightly different way in the video than I did in this post. Check out both so you can see it a couple different ways and decide which one makes more sense to you!

#### How do we deal with this missing information?

We actually don’t need it! Because the surface of the water in this tank will always be a circle with radius 5 m as this tank fills up, the height of the water or the tank won’t impact our answer. So there’s two possible ways to deal with this:

• Create an equation that doesn’t include the height of the tank or the water,
• or plug in some random value for the height and see what we get. If this one works we should be able to plug in any height and get the same answer for all of them.

One of these options actually won’t work, but we will explore them further later in this example. Let’s not get ahead of ourselves. Since we have a related rates problem here, we will want to follow the same four steps as all other related rates problems.

## 1. Draw a sketch

As with any related rates problem, the first thing we need to do is draw the situation being described to us. This is a relatively simple situation being described, so we can go ahead and draw it.

Looking at the above drawing, you can see that water is being poured into a cylindrical tank at a rate of 3 $\frac{m^3}{min}$. The height of the tank is unknown, but we know the radius is 5 m. We can also see that the water level is rising, but we don’t know the height of the water at this instant.

## 2. Come up with your equation

Now that we have a drawing of the situation being described, we need to come up with our equation. To do this, we need to sort out what information we know and what we are looking for.

#### What are we looking for?

The question is asking us to find how fast the height of the water is increasing. Once we take the derivative of our equation, that will introduce the variable representing “how fast things are changing.” Therefore, we know that we will need the height of the water to be in our equation.

Remember in the last section I said we may want to create an equation that didn’t contain the height of either cylinder because we have no information about them? Well now we know that’s not really an option. The question is asking us to find the rate of change of the height of one of the cylinders. To find this, we need the height of the cylinder to be in the equation.

#### What do we know about?

This question didn’t give us a lot of information but we can figure out a little extra. First let’s think about what was directly given. In order to do this, we should consider that this example essentially has two cylinders in it. The large cylinder is the tank, and the small cylinder is the water in the tank.

• We know that water is flowing into the tank at a rate of 3 $\frac{m^3}{min}$. This means that the volume of the small cone is increasing at a rate of 3 $\mathbf{\frac{m^3}{min}}$.
• The problem also says that the tank has a radius of 5 m.

And this is all the information that is explicitly given in the problem. However, there is one other fact we can infer. As the tank is filled with water, the liquid takes on a cylindrical shape as well. The cylinder made up of the water would be shorter than the tank, but it would have the same width. This leads to our last fact.

• We can conclude that the water also has a radius of 5 m.

#### Putting it into an equation

So far in this section, we have figured out that we will need to include the height of the water. We also determined that the information we know is about the radius of both cylinders and the rate of change of the volume of the small cylinder.

So we need our equation to relate the height, radius, and volume of the liquid. Because of this, I think a good place to start would be with the equation for the volume of a cylinder:

$$V=\pi r^2 h$$

In this equation V is the volume, r is the radius, and h is the height of the liquid in the tank.

One thing worth pointing out is that once we take the derivative of this equation, we will still have an h. But we don’t know anything about the height of the liquid in the tank at this instant. It seems like we wouldn’t have enough information to successfully use this equation, but it’s possible that the height at a given moment won’t actually impact the rate of change of the height. If this is true, we should be able to use this equation anyway. So let’s proceed and see what happens.

## 3. Implicit differentiation

As with any related rates problem, once we create our equation we need to take its derivative. Since we are taking the derivative with respect to time, we need to treat V, r, and h as functions of time rather than variables. Therefore, we need to use the chain rule. In this case, since we have r and h being multiplied, we will also have to use the product rule.

$$\frac{d}{dt}[V]=\frac{d}{dt} \big[\pi r^2 h \big]$$

### Using the product rule

To find the derivative of the right side of this equation we need to start by using the product rule. So we are trying to find

$$\frac{d}{dt} \big[\pi r^2 h \big].$$

Since $\pi$ is a constant being multiplied by the rest of the function we are taking the derivative of, we can pull it out of the derivative and deal with it later. Therefore, we can think of the right side of our equation as

$$\pi \frac{d}{dt} \big[r^2 h \big].$$

So we need to find the derivative of $r^2h$. Just as I did in the product rule lesson, we will start by deciding which part of this equation we will call f and g.

#### Choosing f and g

It doesn’t really make a difference which piece of this function we call f and which we call g. As long as we make a decision now and stick with it throughout our solution, it will work out in the end. We will say

$$f=r^2,$$

$$g=h.$$

#### Finding f’ and g’

Now that we have figured out f and g, the next step of the product rule is to find each of their derivatives. Keep in mind that we are taking the derivative with respect to time in this example.

To find f’, we will need to use the chain rule as well since r is a function of time. doing this tells us that

$$f’=2r \frac{dr}{dt}$$

Lastly, we need to find g’ by taking the derivative of g with respect to time.

$$g’=\frac{dh}{dt}$$

#### Putting the pieces of the product rule together

Now we have figured out all four of the pieces of the product rule, so we can just plug them into the product rule formula to find the derivative we’re looking for.

$$\frac{d}{dt} \big[r^2 h \big] = 2r \frac{dr}{dt} \cdot h + \frac{dh}{dt} \cdot r^2$$

And lastly, we just need to bring the $\pi$ back into the equation.

$$\frac{d}{dt} \big[\pi r^2 h \big] = \pi \bigg[ 2r \frac{dr}{dt} \cdot h + \frac{dh}{dt} \cdot r^2 \bigg]$$

### Putting it all together

Now that we have the derivative of the right side of our equation, we can go back and figure out the left side.

$$\frac{dV}{dt}= \pi \bigg[ 2r \frac{dr}{dt}h + \frac{dh}{dt}r^2 \bigg]$$

## 4. Solve for desired rate of change

The last step of any related rates problem is to solve for the rate of change we need to find. The question asks us to find how fast the height of the water is increasing. This is exactly what $\frac{dh}{dt}$ represents, so we need to isolate that variable.

$$\frac{dV}{dt}= \pi \bigg[ 2r \frac{dr}{dt}h + \frac{dh}{dt}r^2 \bigg]$$

$$\frac{1}{\pi}\frac{dV}{dt}= 2r \frac{dr}{dt}h + \frac{dh}{dt}r^2$$

$$\frac{1}{\pi}\frac{dV}{dt} – 2r \frac{dr}{dt}h = \frac{dh}{dt}r^2$$

$$\frac{1}{r^2} \bigg[ \frac{1}{\pi}\frac{dV}{dt} – 2r \frac{dr}{dt}h \bigg] = \frac{dh}{dt}$$

Now that we have isolated the term we need to solve for, we just need to plug in the values for all of the other variables. Before we just into this, I want to focus on just one of these variables.

#### What do we do with h?

Remember back in the beginning of this solution I said we may need to make up some value for h and just go with it? Let’s consider this for a moment.

Notice that h only appears in our equation in one place and it is being multiplied by two other variables, r and $\frac{dr}{dt}$. Think about what $\frac{dr}{dt}$ represents. It is the rate of change of the radius of the water. But our water has a constant radius, it’s always 5 m.

Since the radius of the cylinder is never changing, its rate of change must always be zero! Therefore, we know that

$$\frac{dr}{dt} = 0.$$

Since h is being multiplied by another term that is always zero, it’s not going to matter what h is. We can essentially use any number for h and it won’t matter because we are going to multiply it by zero anyways. We can also just leave it as h and not plug anything in for it.

#### Back to plugging in our values

We have already figured out that $\frac{dr}{dt}=0$ and luckily the other variables’ values were given.

Looking back at the original sketch, you can see that the radius of our cylinder is 5 m. So

$$r=5.$$

Also, you can see that water is flowing into the tank at a rate of 3 $\frac{m^3}{min}$. Since this is the only factor that will be impacting the volume of water in the tank, this must be the exact rate that the volume of the water is increasing.

$$\frac{dV}{dt}=3$$

Now we can plug all of these into the equation then simplifying to get our answer!

$$\frac{1}{r^2} \bigg[ \frac{1}{\pi}\frac{dV}{dt} – 2r \frac{dr}{dt}h \bigg] = \frac{dh}{dt}$$

$$\frac{1}{(5)^2} \bigg[ \frac{1}{\pi}(3) – 2(5)(0)h \bigg] = \frac{dh}{dt}$$

$$\frac{1}{25} \bigg[ \frac{3}{\pi} – 0 \bigg] = \frac{dh}{dt}$$

$$\frac{1}{25} \cdot \frac{3}{\pi} = \frac{dh}{dt}$$

$$\frac{3}{25 \pi} = \frac{dh}{dt}$$

So we now know that the rate of change of the height of the water is $\frac{3}{25 \pi}$ no matter what the height of the cylinder is at that moment. In other words, we can say that the height of the water is increasing at a rate of

$$\mathbf{\frac{3}{25 \pi} \ \frac{m}{min}}.$$

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 related rates 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!

Also, if you want a copy of my calculus 1 study guide, just enter your name and email below and I’ll send you a copy and add you to my email list so you can see as soon as I have more knowledge to share!

## 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.

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.