Integration by u-substitution

U-substitution is one of the more common methods of integration. It allows us to find the anti-derivative of fairly complex functions that simpler tricks wouldn’t help us with. The best way to think of u-substitution is that its job is to undo the chain rule.

That’s all we’re really doing.

It’s not too complicated when you think of it that way. Although, the execution isn’t always that simple. But I’ll show you 6 simple steps that will help you solve any u-substitution problem!

1. Picking our u

A u-substitution problem will start out similarly to an integration by parts problem. With any u-substitution problem the first thing you will need to do is decide what piece of the function you will call u. This is the most important piece of the process, and really the only part where there are options to choose from. However, there’s a simple trick to make sure you’re selecting the u correctly.

When deciding which part of your function to call u, you will want to look for a piece of your function that you can see that piece’s derivative somewhere else in the function. That sounds a little strange, but let me give you an example.

Say we have some function like f(x)=x(x^2+5)^3. We want to look for a small piece of this function that also has its own derivative somewhere else in the function.

So we might say u=x^2+5 because the derivative of x^2+5 is just 2x. Notice, our function contains an x, not a 2x, but it’s fine if the derivative differs by a constant like this. It’s easy to deal with the constant here, but it’s important that it’s an x term.

A quick note on substitution

Choosing the correct u in these problems is the most challenging part. It’s not always simple to see what the u should be, so it’s important to be willing to try different things and see what happens.

You may end up needing to pick a u to go a few steps into the problem and realize it won’t work, then go back and pick another u. I know this process can be frustrating at times, we’ve all been there, but sometimes trial and error is required in learning new math concepts. So I urge you to stay persistent and keep picking different parts of the function for u.

If you try calling every possible piece of the function u, and work through the next few steps only to find that none of them will work, you likely need to either use some uncommon trick or find the derivative using another method besides u-substitution. I will get into some of the uncommon tricks in a later post.

2. Finding du

Once you have decided which piece of your function will be u, you then need to calculate du. This should be fairly simple.

All you have to do to find du is take the derivative of u then multiply it all by dx. This will sometimes require the use of the chain rule, product rule, or quotient rule, but usually you will just need the power rule.

Let’s think back to our previous example, finding the antiderivative of y=x(x^2+5)^3. Remember, we decided that we would use u=x^2+5. Therefore, to find du we should take it’s derivative and multiply by dx. This means if

$$u=x^2+5, \ then$$

$$du=2x \ dx.$$

3. Solve for dx

Now we have determined which part of our function we will call u and we found du. However, what we really want is to find dx. This will be easier to work with when we do our substitution into the original function.

All we need to do to find dx is take our equation for du and isolate the dx. In this example, this will be very easy.

$$du=2x \ dx$$

$$\frac{du}{2x}=dx$$

4. Substitute back into the original function

Going back to the function we are trying to find the antiderivative of, we will first write this in integral form.

$$\int x(x^2+5)^3 dx$$

Now we just need to substitute our u and dx back into this integral. This requires replacing the x^2+5 with u, and replacing dx with \frac{du}{2x}. This gives us

$$\int x(u)^3 \frac{du}{2x}$$

After making these two substitutions we should be able to do some simplifying that will cancel out any remaining x‘s. Simplifying this integral should leave us with

$$\int \frac{1}{2}u^3 du.$$

And since we can pull constants out of an integral, this can also be written as

$$\frac{1}{2} \int u^3 du.$$

5. Integrate with respect to u

Looking at the above integral, we can see that we no longer have an x in the problem. We have rewritten everything in terms of u. Since our integral contains only u and du, instead of x and dx, we can integrate with respect to u. This simply means that we are taking the antiderivative of the function g(u)=u^3 where u is our variable.

Notice, this integral is much simpler than the one we started with. All we need to find this one is the power rule for antiderivatives.

$$\frac{1}{2} \int u^3 du$$

$$\frac{1}{2} \cdot \frac{1}{4}u^4$$

$$\frac{1}{8} u^4$$

Now the hard part is over, we found the antiderivative. But unfortunately we aren’t quite done yet. We can’t say that \frac{1}{8}u^4 is the antiderivative of f(x)=x(x^2+5)^3. This doesn’t really have any meaning because they are using two different variables. Instead we need to write the answer in terms of x, since that’s what we started with.

6. Substitute x back in

We are almost done now that we found the antiderivative. We just need to write it in terms of x so that our answer actually is the antiderivative of the function we started with. Since we already found the antiderivative in terms of u, and we know u in terms of x, we can simply substitute in for u.

We decided back in step 1 that

$$u=x^2+5$$

and we also found out that our antiderivative in terms of u is

$$\frac{1}{8}u^4.$$

Therefore, we can plug x^2+5 in for u to find that the antiderivative of f(x)=x(x^2+5)^3 is

$$F(x)= \frac{1}{8}(x^2+5)^4 + c.$$

And that’s it! You can apply these 6 steps to solve any u-substitution problem.

I hope this lesson helps, but if there’s still a topic you’d like to learn about take a look at some of my other lessons and problem solutions. If you can’t find the topic or question you’re looking for just let me know by emailing me at jakesmathlessons@gmail.com!

I also encourage you to join my email list! Just enter your name and email below and I’ll let send you my calc 1 study guide as a bonus to help you survive calculus!

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!