The antiderivative or indefinite integral
- We know that
- xn ® n xn-1,
- sin(x) ® cos(x),
- cos(x) ® -sin(x).
We want to know given
what is y? We want the inverse of differentiation or the
antiderivative.
- This is not uniquely defined since we can always
add a constant to y since [dy/dx] would remain
the same which is why it is called the indefinite integral.
- If we are given what [dy/dx] is and what y is
at some point then we have a unique answer. This is
known as an initial value problem.
- We can flip the table above and say
- xn ® [(xn+1)/(n+1)] + C,
- sin(x) ® -cos(x) + C,
- cos(x) ® sin(x) + C.
These are our elementary functions and are the only things
we know how to work with.
For example If [dy/dx] = 4x2 then we have 4xn where
n = 2 and so get y = 4x3/3+C.
- If we have a sum of a collection of elementary functions
we can deal with them term by term. So
means that
This is known as the general solution. If we also
know that y(0) = 0 then we can fix the constant
since using the general solution we know that
y(0) = |
3(0)2 2
|
-7(0)+ |
6(0)5 5
|
+ C = C, |
|
but we know that y(0) = 0 so we must have C = 0.
- Substitution:Here we use the fact that
to simplify our problem.
If we have [dy/dx] = (7x-3)-2 then what is y? We
cannot expand out the bracket and do it term by term. Instead
we say u = 7x-3. Then we have
which means that du = 7dx or dx = du/7.
So
or
.
We can integrate both sides to get
Substituting u = (7x-3) back into this we have
So there are 4 steps to this. First we pick u, then
we rewrite the integral in terms of u and du. We can
then integrate to get y in terms of u before
rewriting in terms of x to get our final answer.
A trickier example:
- Pick u = x2-3.
- So du = 2xdx or xdx = [du/2] . Then
- Integrate this to get
- Plug in u = x2-3 to get
Areas or the definite integral
- Integration can also be used to find the area under a curve.
If we want to the area under the curve y(x) from x = a to x = b
we just evaluate the antiderivative of y at b and subtract from this
the value at a.
If we have y(x) = 3 from 0 to 3 then this corresponds to a 3×3
square whose area is of course 9. The antiderivative of y(x) = 3
is 3x+C. Evaluating this at x = 0 and subtracting it from this at
x = 3 we get (9+C)-(0+C) = 9. So we get the same answer. We can also
check with a triangle. Here would have y(x) = x say. Then if we want
to find the area of a right-angled triangle with width and height one
we would integrate y = x from 0 to 1. The antiderivative is
x2/2 so we get 1/2, the expected answer.
The definite integrals involve computing indefinite ones so we have
the same problems and can again use substitution to help us out.
If we have y = f(x), we need to compute the antiderivative F(x). The
definite integral from a to b is simply F(b)-F(a).
Tricks
- Integration by parts:We know from the product rule that
|
d(uv) dx
|
= u |
dv dx
|
+v |
du dx
|
. |
|
This means that
u |
dv dx
|
= |
d(uv) dx
|
-v |
du dx
|
. |
|
If we integrate both sides we get
|
ó õ
|
b
a
|
u |
dv dx
|
= |
ó õ
|
b
a
|
|
d(uv) dx
|
- |
ó õ
|
b
a
|
v |
du dx
|
. |
|
The antiderivative of [d(uv)/dx] = uv by definition so we have
|
ó õ
|
b
a
|
u |
dv dx
|
= [uv]ab- |
ó õ
|
b
a
|
v |
du dx
|
. |
|
This can be very useful since if we pick u and v carefully we
can replace a tricky integral by something easier. Since the uv term
doesn't require any integration we have replaced the integral of
u[dv/dx] by v[du/dx]. If we want to integrate xsin(x)
we can pick u = x and v = -cos(x). Then u[dv/dx] = xsin(x) while
v[du/dx] = -cos(x) which is an elementary function.
- Trapezoid rule:We can integrate elementary functions, use
substitutions or integration by parts but what if we are still stuck.
For example if we have ò[x/((x3-7x)2)] dx then we can't substitute
u = x3-7x since this leads to du = (3x2-7)dx so we don't end up with
a simple integral.
Since we know that Integration is finding the area under the curve we can
determine this computationally. We evaluate the function at
n+1 evenly spaced points x0, ..., xn then the definite integral from
a to b is
|
(b-a) 2n
|
[y0+2y1+¼+2yn1+yn], |
|
where yi = y(xi).
The more points we take, the more accurate an
approximation we have. On a computer it is easy to just say n = 1000000
but of course by hand you only need to take n = 4 or something like that
to get a reasonable answer. You would like (b-a)/n to be less than 1
since the error is proportional to this squared.
If want to integrate x2 from 0 to 1:
- Decide how many intervals we want to break 0 to 1 into.
For this example say we chose 4 so [(1-0)/4] = 1/4.
Then we would take the points 0,0.25,0.5,0.75 and 1. These are out xi's.
- Next we need so work out what the yi's are where
yi = f(xi). In this case f(x) = x2 so we have that
y0 = 02 = 0, y1 = [1/4]2 = [1/16],
y2 = [2/4]2 = [4/16], y3 = [3/4]2 = [9/16]
and y4 = 12 = 1.
- Now we have everything we need to plug into the formula
|
(b-a) 2n
|
[y0+2y1+2y2+2y3+y4] |
|
to get
|
1 8
|
[0+2/16+8/16+18/16+16/16] = |
1 8
|
[10/16+34/16] = |
1 8
|
[44/16] = |
11 32
|
. |
|
Exact answer is [(13)/3] = 1/3 = 11/33. So pretty close!