Integrals 215 problem 12.mws

1. Trignonometric substitutions.

When using Maple to aid you in performing integrals which require trigonometric substitutions, you may have work a bit harder to get the result in the form that you want. Let us suppose that we wish to compute the integral Int((x^2-2)/(x^2+1),x) . From the form of the denominator, it seems very natural to make the substitution x = tan(theta) . Maple can help us simplify the integrand as follows.

First, define the function you want to integrate in Maple.

> f:=x->(x^2-2)/(x^2+1);

f := proc (x) options operator, arrow; (x^2-2)/(x^2...

Next, defi ne x as a functio n of theta .

> x:=theta->tan(theta);

x := tan

Then calculate the derivative of x with respect to theta .

> dx:=D(x)(theta);

dx := 1+tan(theta)^2

Finally, calculate the integrand.

> f(x(theta))*dx;

tan(theta)^2-2

This integral is very easy to do, once you realize that tan(theta)^2 = sec(theta)^2-1 , so the integrand is simply sec(theta)^2-3 , and thus we have Int((x^2-2)/(x^2+1),x) = Int(sec(theta)^2-3,theta) = tan(theta)-3*theta+C = x-3*arctan(x)+C .

Let us verify this with Maple. Since we defined x as a function, we have to reset it to a variable first.

> x:='x';

x := 'x'

> int(f(x),x);

x-3*arctan(x)

Sometimes, Maple can only help us a little. For example, to do the integral Int(sqrt(1-x^2)/(x^4),x) , we could proceed as follows:

> f:=x->sqrt(1-x^2)/x^4;

f := proc (x) options operator, arrow; sqrt(1-x^2)/...

> x:=theta->sin(theta);

x := sin

> dx:=D(x)(theta);

dx := cos(theta)

> f(x(theta))*dx;

(1-sin(theta)^2)^(1/2)/sin(theta)^4*cos(theta)

Now, we know that in the range for which our substitution is valid, when x = -1 .. 1 , we have theta = -Pi/2 .. Pi/2 , so that we have 0 <= cos(theta) . Thus the integrand above can be simplified to cos(theta)^2/(sin(theta)^4) . But we want to convert this into something that even we recognize how to integrate immediately. If you stare at the expression long enough, you might recognize that we can simplify the integrand to cot(theta)^2*csc(theta)^2 , and this integral is easy enough to do by hand. We obtain that Int(cot(theta)^2*csc(theta)^2,theta) = -cot(theta)^... = -(1-x^2)^(3/2)/(3*x^3)+C .

Let us verify the result with Maple

> x:='x';int(f(x),x);

x := 'x'

-1/3/x^3*(1-x^2)^(3/2)

Submission:

For the integrals below, use the method above to find the integral. Verify your answer by calculating the indefinite integral directly in Maple.

1) Int(6/((9*t^2+1)^2),t) .

2) Int(sqrt(9-w^2)/(w^2),w)

Submission worksheet:

>

2. Converting integrals involving sines and cosines to rational integrals.

The substitution z = tan(x/2) can be used to convert rational expressions involving sines and cosines to rational expressions, which can then be integrated by using partial fraction decompositions. The basic formulas that are necessary to do this conversion are as follows.

1) sin(x) = 2*z/(1+z^2) 2) cos(x) = (1-z^2)/(1+z^2) 3) dx = 2*dz/(1+z^2) .

Let us consider the integral Int(cos(x)/(sin(x)*cos(x)+sin(x)),x) . The integrand is

> integrand:=cos(x)/(sin(x)*cos(x)+sin(x));

integrand := cos(x)/(sin(x)*cos(x)+sin(x))

We can perform all the substitutions given by the rules 1-3 above at once.

> subs(sin(x)=2*z/(1+z^2),cos(x)=(1-z^2)/(1+z^2),dx=2/(1+z^2),integrand*dx);

2*(1-z^2)/(1+z^2)^2/(2*z/(1+z^2)^2*(1-z^2)+2*z/(1+z...

The result doesn't look too simple, but let us simplify it.

> simplify(%);

-1/2*(-1+z^2)/z

This expression is just 1/2*(1/z-z) , which we can integrate by hand to obtain Int(-1/2*(-1+z^2)/z,z) = ln(z)/2-z^2/4+C . Then all we have to do to finish the problem is substitute z = tan(x/2) in the answer to obtain

Int(cos(x)/(sin(x)*cos(x)+sin(x)),x) = ln(tan(x/2))... .

Let us verify this answer in Maple.

> int(cos(x)/(sin(x)*cos(x)+sin(x)),x);

-1/4*tan(1/2*x)^2+1/2*ln(tan(1/2*x))

Submission:

Use the method above to calculate the following integrals.

1) Int(1/(1-cos(x)),x) .

2) Int(cos(x)/(1-cos(x)),x) .

Submission worksheet:

>

>

>