Computer Lab #2: Integration

Computer Lab #2: Integration
Introduction: In this laboratory we will be investigating some aspects of the process of finding antiderivatives, using
W∣α as an aid to simplify otherwise tedious hand calculations.
Commands Reviewed:
but we can trick it by introducing variables:
Symbolic and Numerical Integration
We begin by looking at the integrate command in
partial fractions 1/(x^2-a^2)
greater detail. If there are multiple variables involved, it
The situation gets more complicated if there are differperforms integration with respect to the alphabetically first
variable, considering the others as constant:
integrate cos(a*b)
solve x^2+2*x-10
shows that x 2 + 2x − 10 = (x + 1 +
One can specify a variable for integration as a second
partial fractions
A good part of the integration techniques taught in this
course involved suitable substitutions. In fact there is often
no single “correct” substitution, but for a particular problem, there are many substitutions that will work. However
often many of these are very surprising, while the ones
taught in class are somewhat more systematical. In general, examining these nontraditional substitutions is rather
tedious, but with the computer’s help we can do this.
As illustration lets investigate the case of trigonometric substitutions. Often the resulting antiderivative has
no traces of the trigonometric functions left. Knowing
the antiderivative, we can often guess a suitable (nontrigonometric) u-substitution that does the job. (However,
as it requires already knowing an antiderivative, it is of limited practical use. This is the reason why we learn trigonometric substitution in class.)
Let us look as example at ∫ √ d 2x . In class we learned
x −4
that the appropriate substitution would be sec(θ) = x2 , and
this is indeed what
(You are welcome to use these functions to check your
homework solutions. However we ask that you still do the
homework itself by hand, as you won’t have access to the
computer during exams.)
Partial Fractions
Beyond its use in integration, partial fractions are a useful
tool in other areas of mathematics. (For example many of
you will encounter it again in MATH340 when doing the
Laplace transform.) W∣α can do partial fraction decompositions easily:
partial fractions 1/((x-2)*(x+5)^2)
integrate 1/(sqrt(x^2-4))
does if we ask it to show the
√ steps. However if we look at
the antiderivative ln (x + x 2 − 4), we might get the idea
to try the (non-obvious) substition u = x + x 2 − 4. Let’s
try this:
Note however that W∣α will not introduce irrational
roots on its own:
partial fractions 1/(x^2-3)
If the integral does not converge, W∣α tells us so (at
least in cases it can verify convergence):
just returns a single term, but if we explicitly give the factorization, it works as desired.
We can also use infinity as limit to get the values of
improper integrals:
11)(x + 1 − 11), but
partial fractions 1/(x^2+2*x-10)
or use this second argument to specify limits for definite
tells us that x =
u 2 +4
4. Find a value for the constant a such that
solve u=x+sqrt(x^2-4),x
5. Find a non-trigonometric substitution that would
solve the integral ∫ (1−x12 )3/2 dx. (Hint: first integrate
this problem and then try substitution by hand for
parts of the result.)
tells us that dx = 21 − u22 du.
Let’s look at the substituted integrand and simplify:
simplify 1/sqrt(((u^2+4)/(2*u))^2-4)
6. Consider the integral
∫ ((x
we get (under the assumption that u > 2, so u 2 − 4 > 0)
the integrand 1/u. For this we can clearly find an antiderivative by hand. Substituting u back, we get the desired result.
Remember that your lab write up should contain not just a
session transcript but text and (if applicable) explanations.
Note that some problems require a work that cannot be
done alone with W∣α, but a mixture of computer and hand
work. In that case you are welcome to write the manual
part by hand.
− 1)(x + 1))−2/3 dx
(a) u = 1/(x + 1)
(b) u = atan(x)
(c) u = acos(x)
(d) u = atan((x − 1)/2)
1. Determine a partial fraction decomposition of
7. Let f (x)
(−105 − 48x + 80x 2 + 22x 3 − 18x 4 − 2x 5 + x 6 )
and g(x)
dx ln(ln(x))
a) Without further calculations, explain which integrals of
Note that the denominator has 6 roots, so you
should get 6 summands!
Can you explain why a function Si is introduced?
Now perform, using W∣α as a tool for differentiation and simplification, the following substitutions.
In each case write down what the result of the substitution is, and with which method one could solve
the resulting integral. (You may use W∣α also as a
tool to find a suitable integration approach.) You do
not need to execute these actual integrations.
3. Does the following W∣α calculation return a correct
result? Think about whether this solution holds for
all values of a. Explain!
integrate x^a
a ⋅ e −x dx = 2.
differentiate (u^2+4)/(2*u)
2. What is the result of the integrating
f (x)dx,
converge. (The choice of 100 is just as ln(ln(100)) >
b) Plot f and g on a suitable range. What does this
tell you about convergence of the improper integrals
in a)?
c) Now consider h(x) = g(x)/ f (x). Plot h(x).
What is limx→∞ h(x)? Does the limit comparison
test say anything about comparing the integrals?