*It is worth noting that the definition of the integral contained herein is the Reimann integral. There are other types of
integrals, and I may even get to noding them someday.*

integral (Mathematics): The anti-derivative of a mathetical function f(x), often represented by F(x). The symbol for the
integral is ∫. For those whose browsers cannot display that character, it resembles an elongated S, with a number at
the top and bottom. For example:

_{a}
F(x)= ∫((x^{2}+2)^{2}) dx
^{b}

would be the integral of ((x^{2}+2)^{2}) across the interval (a,b) with respect to x.

The integral of f(x) is defined as an infinite sum of values of f(x) and the difference between each discrete x, Δx:

_{ n}
∫f(x) dx = lim Σ f(x_{i})*Δx
^{ Δx→0 i=0}

The anti-derivative can be used to find many things, including, but not limited to:

Given the acceleration function - A function for velocity of an object.

Given a curve - The area underneath said curve, which is actually what the velocity function is to the acceleration
function, displacement of the object is likewise to the velocity.

The volume of a solid formed when a 2 dimensional region is rotated about a line.

And many other things.

Despite the fact that some people may find this horrifically useless, Calculus plays a big role in advanced physics, and
if it weren't for advanced physics, a lot of the devices we have today might not exist. So before you torment your next
geek, remember that he may be the guy than ends up inventing the machine that saves your life some day, all because
he was a geek. Be nice to us, we really are better than you! Okay, we're not really better, but that's beside the point.

Techniques for solving the integral:

The simple expression is a monomial, such as x+3, or x^{4}, or a basic polynomial, for instance,
x^{3}+3x^{2} or 5x^{10}-2x^{2}.

These simple expressions are fairly easy to solve. Consider the following:

_{a}
∫x dx
^{b}

This expression is read: "The anti-derivative (or integral) of x from a to b, with respect to x." The last part is
important for a later solution technique.

If we assign ∫x dx (note the lack of interval, therefore making the answer a variable expression, rather than a
numerical or a constant) to F(x), then

_{a}
∫x dx
^{b}

represents F(b)-F(a).

Therefore, the first thing to do is solve for ∫x dx. For a monomial expression such as this:

∫x^{n} dx = __x^(n+1)__
(n+1)

Where n is the exponent. Any constant coefficents that figure into the expression (ie. the 2 in 2x^{n}) are left
as they are:

∫2x^{n} dx = __2x^(n+1)__
(n+1)

Going back to the original problem, ∫x dx, we can now provide a solution. In this case, the exponent, n, is 1, (if
you weren't aware: x^{1}=x)

Therefore:

∫x^{1} dx = __x^(1+1)__
(1+1)

This gives us:

__x^2+C__
2

where C is an arbitrary constant. That would be a fine solution if the original problem was ∫x dx, but it isn't, so we
have to go a little farther.

We now know that:

F(x) = ∫x dx

and

∫x dx = __x^2+C __
2

Therefore:

F(x) = __x^2+C __
2

and:

_{a}
∫x dx = F(b) - F(a)
^{b}

Therefore:

_{a}
∫x dx = __b^2+C__ - __a^2+C__
^{b} 2 2
_{a}
∫x dx = __b^2+C - a^2+C__
^{b} 2

C = C, therefore C - C = 0, which leaves us with:

_{a}
∫x dx = __b^2 - a^2__
^{b} 2

It is worth noting at this point that:

_{a}
∫A*x dx
^{b}

For any constant A is equivalent to:

_{a}
A * ∫x dx
^{b}

The same is true for indefinite integrals (those without the boundaries a and b.) Additionally:

∫A_{1}x^{n} + A_{2}x^{(n-1)} + A_{3}x^{(n-2)} + ... + A_{n} dx

Is equivalent to

∫A_{1}x^{n} dx + ∫A_{2}x^{(n-1)} dx + ∫A_{3}x^{(n-2)} dx + ... + ∫A_{n} dx

For constants A_{1} through A_{n}.

The next simple analysis is for the integrals of the two basic trigonometric functions, sin(x) and cos(x). If you do not
understand these function abbreviations, go read up on trigonometry first.

Discussion of derivatives for tan(x) and all reciprocal functions will be handled later.

The derivative of:
sin(x) is cos(x)
cos(x) is -sin(x) = -1*sin(x)

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

Logic: The derivative of sin(x) is cos(x). Therefore the anti-derivative of cos(x) is sin(x). Because the integral is
indefinite, we are left with some arbitrary C (a constant of integration,) because when the derivative of sin(x) + C is
taken, C is insignificant to the result.

∫sin(x) dx = ∫-1*-1*sin(x) dx = -1 * ∫-1*sin(x) dx
∫-1*sin(x) = cos(x) + C
-1 * ∫-1*sin(x) = -cos(x) + C

Note that because C is an arbitrary constant, it does not matter whether it is -cos(x) + C or -cos(x) - C as long as you
maintain consistency (see example below.)

Example problem:

Given d/dx f(x) = 3*sin(x), f(0) = 0, solve for f(x)

Solution:

Step 1: f(x) = ∫3*sin(x) dx = 3 * ∫sin(x) dx = 3 * ( -cos(x) + C ) = -3*cos(x) + 3*C
Step 2: f(0) = 0, -3*cos(0) + 3*C = 0, cos(0) = 1, -3 + 3*C = 0, 3*C=3, C = 1.
Step 3: f(x) = -3*cos(x) + 3*C, C = 1, f(x) = -3*cos(x) + 3

Note that we can simplify this a bit by writing f(x) = -3*cos(x) + C in Step 1, and using that throughout. This is because
C's actual value isn't significant, only the value it produces in the final equation.

Step 1: f(x) = ∫3*sin(x) dx = 3 * ∫sin(x) dx = 3 * ( -cos(x) + C ) = -3*cos(x) + C
Step 2: f(0) = 0, -3*cos(0) + C = 0, cos(0) = 1, -3 + C = 0, C=3.
Step 3: f(x) = -3*cos(x) + C, C = 3, f(x) = -3*cos(x) + 3

The answer yielded is identical, as it should be.

We have examined integration on a polynomial expression, and on simple trigonometric expressions. However, more complicated
functions sometimes require that we look at them in terms of these simple expressions.

For example:

∫x * cos(x^{2}) dx

The technique used to simplify these integrals is called a "u" substitution, because it consists of replacing an expression
in the integral with a variable u, and integrating with respect to u instead of x.

∫x * cos(x^{2}) dx
u = x^{2}
du/dx = 2*x
du = 2*x dx

The trick is to identify a u such that du exists in the larger expression, in this case, x^{2} yields a du of 2*x dx.
We have x*dx, but this is correctable.

x = 1/2 * 2 * x
∫x * cos(x^{2}) dx = ∫1/2 * 2 * x * cos(x^{2}) dx
1/2 ∫2 * x * cos(x^2) dx

We now have the 2*x dx that we need for the substitution.

1/2 ∫2 * x * cos(x^{2}) dx = 1/2 ∫cos(x^{2}) * 2 * x dx = 1/2 ∫cos(u) du

We know how to solve for ∫cos(x) dx, and solving for ∫cos(u) du is no different, what letter is used for the variable
is inconsequential.

1/2 ∫cos(u) du = 1/2 sin(u) + C = 1/2 sin(x^{2}) + C

It is important to recognize that u is *not* x. Many a calculus student has been tripped up by forgetting this:

_{a} _{a}
∫x * cos(x^{2}) dx ≠ 1/2 ∫cos(u) du
^{b} ^{b}

If you are going to perform a definite integral using u substitution, then you must either replace x in the function before
evaluating F(b) - F(a), or you must use F(u(b)) - F(u(a)).

It seems a little convoluted, but it's really rather simple.
1/2 * ( sin(b^{2}) - sin(a^{2}) ) is obviously not the same as 1/2 * ( sin(b) - sin(a) ).

"u" substitution is a fairly simple concept on its own, however it can often be difficult to identify an appropriate u, and
in some cases it is not possible to simplify something to a solvable form by means of u substitution.

That is when we bring in...

I actually had to crack open my old Calculus textbook for this, because I had forgotten the justification for it.

Integration by parts is based upon the formula for differentiation of a product:

^{d(u*v)}/_{dx} = u * ^{dv}/_{dx} + v * ^{du}/_{dx}
= u*v' + v*u'

For differentiable functions of x, u and v.

If u' and v' are continuous, then by integrating both sides, we obtain the following:

u*v = ∫u*v' dx + ∫v*u' dx
= ∫u dv + ∫v du

We can re-arrange like so:

u*v - ∫v du = ∫u dv

And then flip the equation so the lone integral is on the left:

∫u dv = u*v - ∫v du

Integration by parts can be scary--it looks much more complicated than u substitution or raw integration, but sometimes it is
difficult or even impossible to find an expression for the integral otherwise.

Example #1:

∫ln(x) dx

Attempting u substitution gets us nowhere:

u = ln(x)
du/dx = 1/x
du = dx/x

We have no 1/x, so we're sunk here.

When using integration by parts, the first step is to select what part of the integral is u and what part is dv.
The dv term will always contain dx, so keep that in mind.

For ∫ln(x) dx, consider the following:

∫u dv = u*v - ∫v du
u = ln(x) → du = 1/x dx
dv = dx → v = x

Substituting, we get:

∫ln(x) dx = ln(x)*x - ∫x*1/x dx
_{ } = x*ln(x) - ∫1 dx
_{ } = x*ln(x) - (x + C)
_{ } = x*ln(x) - x + C

If you're curious about the distribution of - (x + C) into - x + C, remember that we don't know the sign of C--and it doesn't
matter. If we need to solve for C, whether we have + C or - C, the final statement will come out the same as long as you're
consistent throughout. As long as, in actually solving for C, you start with x*ln(x) - x + C and perform all your
manipulations from there, you'll come out with the right answer.

Example #2:

∫x*e^{x} dx
u = x → du = dx
dv = e^{x} dx → v = e^{x}
∫x*e^{x} dx = x*e^{x} - ∫e^{x} dx
∫x*e^{x} dx = x*e^{x} - e^{x} + C
∫x*e^{x} dx = (x-1)*e^{x} + C

That's integration by parts. But wait! There's more! Yes, I know. There's a lot here already. But we're not done with
integration by parts yet. You see, sometimes you have to do it more than once. See the following:

∫x^{2}sin(x) dx
u = x^{2} → du = 2*x dx
dv = sin(x) dx → v = -cos(x) dx
∫x^{2}sin(x) dx = -x^{2}*cos(x) + 2∫x*cos(x) dx

Well, that's great, but what's ∫x*cos(x) dx? Once again, u substitution won't cut the mustard, so we're stuck with
integration by parts. *Again.*

∫x*cos(x) dx
u = x → du = dx
dv = cos(x) dx → v = sin(x)
∫x*cos(x) dx = x*sin(x) - ∫sin(x) dx
∫x*cos(x) dx = x*sin(x) + cos(x)

Now we go back and substitute into the first integral to obtain:

∫x^{2}sin(x) dx = -x^{2}*cos(x) + 2*(x*sin(x) + cos(x))
∫x^{2}sin(x) dx = (2-x^{2})*cos(x) + 2*x*sin(x) + C

It's not terribly more complicated, but it is time-consuming. There are other techniques used in the solution of integrals,
and I will probably cover things like partial fractions in my next revision.

To be continued...

*Updated Jun. 21, 2004*

I'm keeping a revision history now. It was suggested that I use <pre>-formatting to make this node more readable, and
I think that's a great idea. I wish I had thought of it myself, or checked my messages sooner. This edition will include
integration by parts techniques as well.

*Updated Dec. 15, 2002*

Noder's Note: Most of the time spent working on this node specifically was, indeed, formatting. Clear mathematical notation
is *very* hard to format. :)

Oh, also, the formatting in this is made only with consideration for those whose browsers support subscripts, superscripts,
the capital sigma Σ, the Integral symbol ∫, the right arrow →, and the capital delta, Δ. Sorry to
everybody else. ~~Looks best in IE, some of the spacing may be off in other browsers...~~