In this section, we'll learn about another technique for integration, called u-substitution. But before we start, let's look at a problem:
How should we evaluate
∫(x+1)7dx?
The first two choices are technically possible ways to solve this integral, but a substitution seems to be the simplest option. Recall that we have the power rule
∫xndx=n+11xn+1+C.
So, for instance, we know that
∫u7du=81u8+C.
So what happens if we set u=x+1? Well, that gives us
dxdu=1⟹du=dx.
Now, we can substitute these expressions into the initial integral to find:
∫(x+1)7dx=∫u7du=81u8+C.
Now, remember that u=x+1. So, our final answer becomes
∫(x+1)7dx=81u8+C=81(x+1)8+C.
Wow, that was a lot simpler than expected! This is the power of the technique called u-substitution, in which we substitute a section of the integrand with a new variable to simplify the integral. Let's look at another example together, and evaluate the integral
∫xx2+1dx.
First, try and think about what we should substitute for u.
In this problem, the most convenient choice for u would be u=x2+1. This gives us
dxdu=2x⟹21du=xdx.
Now, we can return to the initial integral:
∫xx2+1dx=∫x2+1⋅(xdx)=∫u⋅(21du)=21∫udu=21(32u23+c)=31(x2+1)23+C,
where C=21c is just a new constant.
Did you notice a pattern for how we choose our expressions for u? We try to set u=f(x) such that f′(x) is also a part of the integrand. This is because
dxdu=f′(x)⟹du=f′(x)dx,
and so we need the factor of f′(x) to replace with du. Hence, in the previous example we set u=x2+1 because du=2x was a part of the integral.
Now you try!
Evaluate
∫3x2cos(x3+2)dx.
As before, we notice that
dxd(x3+2)=3x2,
which is also a part of the integrand! So, we set u=x3+2. Then
dxdu=3x2⟹du=3x2dx,
and so the integral becomes
∫3x2cos(x3+2)dx=∫cos(x3+2)⋅(3x2dx)=∫cosudu=sinu+C=sin(x3+2)+C.
So far, we've only been dealing with substitutions of polynomials, but this isn't always the case! Let's now try to evaluate
∫tanxdx.
Wait a moment! There aren't even two parts to this function! Well, we can rewrite this as
∫cosxsinxdx.
Aha! Now we see two different parts. Moreover, we also recall that
dxd(cosx)=−sinx,
which is part of the integral! So, we can set u=cosx, which gives us
dxdu=−sinxdx⟹−du=sinxdx.
Therefore, our original integral becomes
∫cosxsinxdx=∫cosx1⋅(sinxdx)=∫u1⋅(−du)=−∫udu=−ln∣u∣+C=−ln∣cosu∣+C.
Try the next one on your own!
Evaluate
∫sinxcosxdx.
Let's approach this integral from three different ways:
Let's use u-substitution, and let u=sinx. Then
dxdu=cosx⟹du=cosxdx.
So, the integral becomes
∫sinxcosxdx=∫udu=2u2+C=2sin2x+C.
Let's again use u-substitution, but this time let u=cosx. Then
dxdu=−sinx⟹du=−sinxdx.
So, the integral becomes
∫sinxcosxdx=−∫cosx⋅(−sinxdx)=−∫udu=−2u2+C=−2cos2x+C.
Lastly, let's try and use a clever trick: remember the trigonometric identity
sin(2x)=2sinxcosx⟹2sin(2x)=sinxcosx.
So, the integral becomes
∫sinxcosxdx=∫21sin(2x)dx=−41cos(2x)+C.
Hm... All of our methods seem valid, but the expressions
2sin2x+C,−2cos2x+C,−4cos(2x)+C
all look different!
Well actually, the trick is that these functions are all the same in disguise! Try and figure it out!
First, remember the Pythagorean Identity:
sin2x+cos2x=1.
So, if we look at the first expression, we see that
2sin2x+C=21−cos2x+C=−2cos2x+(21+C),
which is exactly the second expression above, with just a shifted constant term.
Similarly, recall the cosine double angle formula:
cos(2x)=2cos2x−1⟹cos2x=2cos(2x)+1.
So, the second expression now becomes
−2cos2x+C=−22cos(2x)+1+C=−4cos(2x)+1+C=−2cos(2x)+(−41+C),
which is exactly the third expression above, with another shifted constant term. So, these three answers were actually the same! Phew!
Now, up to this point we've only been talking about u-substitution with indefinite integrals. But actually, this technique also works when we want to evaluate definite integrals. (This should sound reasonable, since when we solve definite integrals we simply find the indefinite integral and plug in the limits of integration.)
So, let's say we want to figure out the value of
∫02πsinxcosxdx
Using the substitution u=sinx, we found earlier that
∫sinxcosxdx=2sin2x+C.
So, it follows that
∫02πsinxcosxdx=2sin2x02π=212−202=21.
Alternatively, using u-substitution we had
∫sinxcosxx=2u2+C.
Since u(0)=sin0=0 and u(2π)=sin(2π)=1, we can instead solve the integral as
∫02πsinxcosxx=2u201=212−202=21.
Try another example!
Find the value of
∫01xx2+1.
Let's go through this together: previously, we discovered that
∫xx2+1=31(x2+1)23+C.
So, the definite integral becomes
∫01xx2+1=31(x2+1)2301=31(12+1)23−31(02+1)23=31(22−1).
Alternatively, recall that during the u-substitution we set u=x2+1, which then implied that
∫xx2+1=31u23+C.
So, since u(0)=02+1=1 and u(1)=12+1=2, we have
∫01xx2+1=31u2312=31(22−1).
As you saw in this section, u-substitution can be very useful in integrals. However, this isn't the only kind of u-substitution! Click on the next section to learn about another flavor of this technique!
We can take the derivative of a function by using the Chain Rule f(g(x))=f′(g(x))g′(x). The find the anti-derivative of a function with an "outside" and an "inside," we use U-substitution.
We set the inside function equal to u and then find du.
Next, we take the anti-derivative of the simplified function with respect to u.
Then, we put the inside function back into the new function and u disappears.
Finally, we have our answer.
Now, let's do an example:
Let's say we have ∫5cos(5x))dx.
The outside function is 5cos(x) and the inside function is 5x.
We set u=5x and therefore du=5dx.
Now, we have ∫cos(u)du. (The 5 out front disappeared because du=5dx)
Taking the integral now, we have sin(u) and then if we put back 5x for u, we have our final answer, f(g(x))=sin(5x)
If we want to check our answer, we can just take the derivative of this function using the chain rule.
U-substitution is a method used to turn harder to solve integrals into a more recognizable one. Let's look at and example to see.
∫2x(x2+4)100dx
Now you could simplify out the expression to the hundredth power and then take the integral of each individual part but I certainly don't want to do that. Instead, we can use u-substitution.
We do this by taking part of the expression inside the integral and setting it equal to a variable u. In this problem, we will have u equal the expression inside the parentheses.
u=x2+4
The trick for u-substitutions is to look for things that are derivatives of one another. Notice that if you took the derivative of x2+4 you'd get 2x which is what's outside the parentheses.
It derivative doesn't have to be exactly the other stuff, i.e. 2x, but it's usually a clue for you to apply the u-substitution method to an integral.
Now, once you label what u is, we want to take the derivative of u. Also, make sure you attach a dx onto the end of it.
u=x2+4du=2xdx
Once you have both u and du, we want to substitute these into the integral.
∫2x(x2+4)100dx∫2x(u)100dx∫2x(u)100dx∫u100du
We've successfully applied u-substitution and would you look at that, the integral is easier to solve.
∫u100du=1011u101+C
The final step is to substitute back in the expression that's equal to u.
1011(x2+4)101+C
Let's look at another example.
∫(cos4θ)sinθdθ
This can be rewritten as:
∫(cosθ)4sinθdθ
What should we let u equal?
Usually, if an expression is being raised to a power, we want that expression to equal u. So we have:
u=cosθ
Now, take the derivative of u. Don't forget to tack on the dθ.
u=cosθdu=−sinθdθ
Notice this derivative is not the same as the remaining part in the integral, i.e. −sinθ=sinθ. This is okay. We can multiply both sides of this derivative by negative one in order to get the same expression in the integral.
du=−sinθdθ⟹−du=sinθdθ
We can now substitute these into the integral.
∫(cosθ)4sinθdθ∫(u)4sinθdθ∫(u)4sinθdθ∫(u)4(−du)−∫u4du
Finally, we can solve the interval.
−∫u4du=−51u5+C
Now just substitute back in the expression equal to u and we have our answer.
−51(cosθ)5+C
In the final example, Patrick looks at the integral:
∫4x+2xdx
This can be rewritten as:
∫(x+2)1/4xdx
What should we let u equal?
Again, the expression being raised to the power will usually be the choice for u.
u=x+2
Let's take the derivative of this.
u=x+2du=1dx
Notice though that we still have the x in the numerator to deal with. We can actually use our equation with u to find this.
uu−2=x+2=x
Now, we can substitute these into the integral.
∫(x+2)1/4xdx∫(x+2)1/4u−2dx∫(x+2)1/4u−2dx∫(u)1/4u−2dx∫u1/4u−2dx∫u1/4u−2du
We can simplify this:
∫u1/4u−2du=∫(u3/4−2u−1/4)du
Then we can split this into two integrals.
∫(u3/4−2u−1/4)du⇒∫u3/4du−∫2u−1/4du
Solve each integral separately then combine.
∫u3/4du=74u7/4+C−∫2u−1/4du=−38u3/4+C
And then combine:
=74u7/4−38u3/4+C
Finally, we plug back in the x expression for u.
74(x+2)7/4−38(x+2)3/4+C
(Video) More Complicated Examples of U-Substitution
by PatrickJMT
In this video by patrickJMT he shows you how to solve some more complicated examples of integrals involving u-substitution.
The first integral he looks at is:
∫ex+exdx
Before we start, we can actually rewrite this expression.
∫exeexdx
What should we set u equal to?
Yes, we should set u equal to ex.
u=ex
We then also find the derivative.
u=exdu=exdx
Now we can plug these into the integral.
∫exeexdx∫eexdu∫eexdu∫eudu
Solve the integral.
∫eudu=eu+C
Finally, plug back in the expression u equals. This will be your answer!
eex+C
The next integral looked at is:
∫cotx(lnsinx)dx
This one might not be as obvious.
What should u be equal to?
Yes, we should set u to:
u=lnsinx
If it's not apparent it becomes so when you take the derivative.
u=lnsinxdu=sinx1⋅cosx=cotx
Next, plug these into the integral.
∫cotx(lnsinx)dx∫lnsinxdu∫lnsinxdu∫udu
Solve the integral.
∫udu=21u2+C
Finally, we substitute back in the expression equal to u.
21(lnsinx)2+C
Next up is the example:
∫1−x2+1−x2xdx
What should u be equal to?
Yes, 1−x2.
u=1−x2
Now take the derivative.
u=1−x2du=−2xdx
We can rewrite this derivative in order for it to match the numerator of the integral.
du=−2xdx⟹−21du=xdx
Plug these into the integral now.
∫1−x2+1−x2xdx∫−211−x2+1−x21du−21∫1−x2+1−x21du−21∫u+u1du
Hmm, what now? What if I told you we could use u-substitution all over again! Yeah, I'm groaning too. This time we label it v.
v=u
We can rewrite this as:
v2=u
Now, take the derivative.
2vdv=du
Plug these back into the derivative.
−21∫u+u1du−21∫v2+u1du−21∫v2+u1du−21∫v2+v1du−21∫v2+v1du−21∫v2+v1(2v)dv−∫v+11dv
This, we can integrate.
−∫v+11dv=−ln(v+1)+C
Now plug back in the u expression.
−ln(u+1)+C
Finally, plug back in the x expression.
−ln(1−x2+1)+C
Lastly, he looks at:
∫x3x+4dx
This one is tricky. What should u be equal to?
Yes, we want it to be the entire root not just what's inside.
u=3x+4
We can now rewrite this as:
uu3u3−4=3x+4=x+4=x
Take the derivative of this equation.
3u2du=dx
Let's plug all these parts into the integral.
∫x3x+4dx∫(u3−4)3x+4dx∫(u3−4)3x+4dx∫(u3−4)(u)dx∫(u3−4)(u)dx∫(u3−4)(u)(3u2)du∫(3u6−12u3)du
We can now split this integral into two parts.
∫(3u6−12u3)du⇒3∫u6du−12∫u3du
Solving each individually, we get:
=371u7−1241u4+C=371u7−3u4+C=3(71u7−u4)+C
Finally, we can plug back in the expression equal to u.
3[71(3x+4)7−(3x+4)4]+C