# Computing Integrals

## Contents

#### Problems

Problem : Compute x sin(x)dx .

Letting f (x) = x and g(x) = sin(x) in the formula for integration by parts, we have

 x sin(x)dx = - x cos(x) - (- cos(x))dx = - x cos(x) + sin(x) + C

Problem : Find x 2 e x dx .

Letting f (x) = x 2 and g(x) = e x , we have

 x 2 e x dx = x 2 e x|0 1 = 2xe x dx = e - 2xe x dx

Applying integration by parts again, we get

 2xe x dx = 2xe x|0 1 - 2e x dx = 2e - (2e x|0 1) = 2

Substituting the value of this integral back in the first computation yields

 x 2 e x dx = e - 2

Problem : Express sinn+2(x)dx in terms of sinn(x)dx by integrating by parts twice.

Let I = sinn+2(x)dx , the integral we are trying to compute. Integrating by parts gives

 sinn+2(x)dx = sinn+1(x)sin(x)dx = sinn+1(x)(- cos(x)) - (n + 1)sinn(x)cos(x)(- cos(x))dx = -sinn+1(x)cos(x) + (n + 1)sinn(x)cos2(x)dx

Integrating this new integral by parts, we have

 sinn(x)cos2(x)dx = sinn(x)(1 - sin2(x))dx = sinn(x)dx - sinn+2(x)dx = sinn(x)dx - I

Thus

 I = - sinn+1(x)cos(x) + (n + 1) sinn(x)dx - I ,

so

 I = sinn+1(x)cos(x) + sinn(x)dx