L10-intTechParts.mws

__Calculus II__

**Lesson 10: Integration by Parts**

**Anti-differentiation by Parts**

`> `
**restart;**

The second main method of anti-differentiation we will study is
*anti-differentiation by parts*
. As discussed in class, this is summarised by the formula

.

*Maple*
has a command which will integrate by parts. It is called
__intparts__
, and it resides in the
__student__
package, which we will have to reload because the
__restart__
above cleared it from memory.

`> `
**with(student);**

(Note that we suppressed the list of commands this time.) The
__intparts__
command has two arguments: the first is the expression to be anti-differentiated, and the second is the choice for
, the piece which is to be differentiated. We don't need to specify
, because it must be everything else in the integrand.

As an example, let's find
. Hopefully, you can look at this example and see that we should choose
.

`> `
**p1 := Int(x*exp(-2*x),x);**

`> `
**p2 := intparts(p1,x);**

`> `
**p3 := simplify(p2);**

We still have an integral to do, but it is sufficiently simple that we can see how to evaluate it, and so we will allow
*Maple*
to do so:

`> `
**p4 := value(p3);**

`> `
**p1 = p4 + C;**

Finally, check by differentiation:

`> `
**diff(p4,x);**

Differentiating
__p4__
gives the function we started with, so
__p4__
is an anti-derivative for this function.

There are some nice tricks you can do with the
__intparts__
command. For example, a standard use of the method of parts is to compute
by writing it as
and choosing
.

`> `
**p1 := Int(ln(x),x);**

`> `
**p2 := intparts(p1,ln(x));**

`> `
**p3 := value(p2);**

`> `
**p1 = p3 + C;**

Of course, we should check by differentiation:

`> `
**diff(p3,x);**

`> `

**Question 2**

Use the method described above to find the following anti-derivatives. (All of them are taken from Exercises 7.1 of Stewart, and you should do them all---and others---with pencil and paper for homework.)

(a)

**Solution.**

`> `
**p1 := Int(x*cos(x),x);**

`> `
**p2 := intparts(p1,x);**

`> `
**p3 := value(p2);**

`> `
**p1 = p3 + C;**

Check: (You
*did*
check each of your answers, didn't you?)

`> `
**diff(p3,x);**

`> `

(b)

**Solution.**

`> `
**p1 := Int(x*ln(x), x);**

`> `
**p2 := intparts(p1, ln(x));**

`> `
**p3 := simplify(p2);**

`> `
**p4 := value(p3);**

`> `
**p1 = p4 + C;**

Check:

`> `
**diff(p4,x);**

`> `

(c)

**Solution.**
It seems clear that we should differentiate the power of
. This will lower the power by 1, which will give us a simpler integral, but not yet one that we are allowed to evaluate. We will have to integrate by parts a second time.

`> `
**p1 := Int(x^2 * sin(2*x), x);**

`> `
**p2 := intparts(p1, x^2);**

`> `
**p3 := simplify(p2);**

`> `
**p4 := intparts(p3, x);**

`> `
**p5 := simplify(p4);**

`> `
**p6 := value(p5);**

`> `
**p1 = p6 + C;**

Check:

`> `
**diff(p6,x);**

`> `

(d)

**Solution.**
This is the same as part (c): we have to integrate by parts twice.

`> `
**p1 := Int(x^2 * exp(-x), x);**

`> `
**p2 := intparts(p1, x^2);**

`> `
**p3 := simplify(p2);**

`> `
**p4 := intparts(p3, x);**

`> `
**p5 := simplify(p4);**

`> `
**p6 := value(p5);**

`> `
**p1 = p6 + C;**

Check:

`> `
**diff(p6, x);**

`> `

`> `

**Question 3**

Find the following anti-derivatives. You will probably have to use a combination of both methods: substitution and parts.

(a)

**Solution.**
Whenever you have an exponential function in an integral, it is a good idea to try substituting
for whatever function is in the exponent.

`> `
**p1 := Int(x^3 * exp(x^2), x);**

`> `
**p2 := changevar(u=x^2, p1, u);**

`> `
**p3 := simplify(p2);**

`> `
**p4 := intparts(p3, u);**

`> `
**p5 := value(p4);**

`> `
**p6 := subs(u=x^2, p5);**

`> `
**p1 = p6 + C;**

Check:

`> `
**diff(p6, x);**

`> `

(b)

**Solution.**

`> `
**p1 := Int(cos(x)*ln(sin(x)), x);**

`> `
**p2 := changevar(u=sin(x), p1, u);**

We found this anti-derivative earlier on in the worksheet, so we might allow ourselves to evaluate it as it stands, but for practice (and because it is not in the list on p. 416), let's do it again.

`> `
**p3 := intparts(p2, ln(u));**

`> `
**p4 := value(p3);**

`> `
**p5 := subs(u=sin(x), p4);**

`> `
**p1 = p5 + C;**

Check:

`> `
**diff(p5, x);**