Mathematics for Chemistry/Integration
From Wikibooks, the open-content textbooks collection
[edit] Free Web Based Material from HEFCE
There is a DVD on integration at Math Tutor.
[edit] The basic polynomial
f(x) = xn

This works fine for all powers except -1, for instance the integral of

is just

-1 is clearly going to be a special case because it involves an infinity when x = 0 and goes to a steep spike as x gets small. As you have learned earlier this integral is the natural logarithm of x and the infinity exists because the log of zero is minus infinity and that of negative numbers is undefined.
[edit] The integration and differentiation of positive and negative powers
>>>>>>>>>>>>>>>>>>>>>>Differentiation 1/3 x*x*x x*x 2x 2 0 0 0 0 1/3 x*x*x x*x 2x 2 ? ? ? ? Integration<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< I(x) H(x) G(x) F(x) ln(x) 1/x -1/(x*x)
Here I, H, G and F are more complicated functions involving lnx.
You will be able to work them out easily when you have done more integration. The thing to notice is that the calculus of negative and positive powers is not symmetrical, essentially caused by the pole or singularity for
at x = 0.
[edit] Logarithms
Logarithms were invented by Napier, a Scottish Laird, in the 17th-century. He made many inventions but his most enduring came from the necessity of doing the many long divisions and trigonometric calculations used in astronomy. The Royal Navy in later years devoted great time and expense to developing logarithm technology for the purposes of navigation, leading to the commissioning of the first mechanical stored program computer, which was theoretically sound but could not be made by Charles Babbage between 1833 and 1871.
The heart of the system is the observation of the properties of powers:

This means that if we have the inverse function of ex we can change a long division into a subtraction by looking up the exponents in a set of tables. Before the advent of calculators this was the way many calculations were done.
y = ex
lny = x
Napier initially used logs to the base e for his calculations, but after a year or so he was visited by Briggs who suggested it would be more practical to use base 10. However base e is necessary for the purposes of calculus and thermodynamics.
[edit] Integrating 1/x

This is true because ey is our function which reduces or grows at the rate of its own quantity.
y = lnx
This is our definition of a logarithm.

therefore


therefore

[edit] Integrating 1/x like things
Just as

so

therefore by the chain rule

therefore

Examples of this are:

or

and

As the integral of 1 / x is ln so the differential of ln is 1 / x so

ln5 is just a constant so
so

This can also be done by the chain rule

What is interesting here is that the 5 has disappeared completely. The gradient of the log function is unaffected by a multiplier! This is a fundamental property of logs.
[edit] Some observations on infinity
Obviously
is
.
nd
are undefined but sometimes a large number over a large number can have defined values. An example is the sin of 90 degrees, which you will remember has a large opposite over a large hypotenuse but in the limit of an inifinitesmally thin triangle they become equal. Therefore the sin is 1.
[edit] Definite integrals (limits)
Remember how we do a definite integral
![\int_0^3 { ( f (x) )} = {\left[ F (x) \right] }_0^3 = F (3) - F (0)](http://upload.wikimedia.org/math/6/2/a/62a6a98f8ccad10fec3adc78cab418ff.png)
where F is the indefinite integral of f.
Here is an example where limits are used to calculate the 3 areas cut out by a quartic equation:
x4 − 2x3 − x2 + 2x.
We see that x = 1 is a solution so we can do a polynomial division:
x3 -x2 -2x
-------------------
x-1 ) x4 -2x3 -x2 +2x
x4 -x3
--------
-x3 -x2
-x3 +x2
-------
-2x2 +2x
-2x2 +2x
--------
0
So the equation is x(x2 − x − 2)(x − 1) which factorises to
x(x − 2)(x + 1)(x − 1).
![\int_a^b { x^4 -2x^3-x^2+2x} = {\left[ x^5/5 -x^4/2-x^3/3+ x^2\right] }_a^b](http://upload.wikimedia.org/math/0/5/d/05d527dea211ea5e5ef7020ed4c65bcb.png)
[edit] Integration by substitution

where u = sinθ.


[edit] Simple integration of trigonometric and exponential Functions





[edit] Answers
2e2x + c
3e − 3x + c

θ + c
i.e. the integral of 1dθ.
sinφ + c
[edit] Integration by parts
This is done in many textbooks and wikipedia. Their notation might be different to the one used here, which hopefully is the most clear. You derive the expression by taking the product rule and integrating it. You then make one of the UV' into a product itself to produce the expression.

(all integration with respect to x. Remember by
![\int {UV} = U [ {\rm int} ] - \int { [ {\rm diff} ] [ {\rm int} ] }](http://upload.wikimedia.org/math/e/2/4/e2455a09fe2a45c3e2b91142abd21acc.png)
(U gets differentiated.)
The important thing is that you have to integrate one expression of the product and differentiate the other. In the basic scheme you integrate the most complicated expression and differentiate the simplest. Each time you do this you generate a new term but the function being differentiated goes to zero and the integral is solved. The expression which goes to zero is U.
The other common scheme is where the parts formula generates the expression you want on the right of the equals and there are no other integral signs. Then you can rearrange the equation and the integral is solved. This is obviously very useful for trig functions where sin > > cos > > − sin > > − cos > > sin ad infinitum.
ex also generates itself and is susceptible to the same treatment.



We now have our required integral on both sides of the equation so

[edit] Integration Problems
Integrate the following by parts with respect tox.
xex
x2sinx
xcosx
x2ex
x2lnx
exsinx
e2xcosx
x(1 + x)7
Actually this one can be done quite elegantly by parts, to give a two term expression. Work this one out. Expanding the original integrand by Pascal's Triangle gives:
2 3 4 5 6 7 8
x + 7 x + 21 x + 35 x + 35 x + 21 x + 7 x + x
The two term integral expands to
2 3 4 5 6 7 8 9
1/2 x + 7/3 x + 21/4 x + 7 x + 35/6 x + 3 x + 7/8 x + 1/9 x - 1/72
So one can see it is correct on a term by term basis.
3xsinx
2x2cos2x
If you integrate x7sinx you will have to apply parts 7 times to get x to become 1 thereby generating 8 terms:
7 6 5 4 3
-x cos(x) + 7 x sin(x) + 42 x cos(x) - 210 x sin(x) - 840 x cos(x) +
2
2520 x sin(x) + 5040 x cos(x) - 5040 sin(x) + c
(Output from Maple.)
Though it looks nasty there is quite a pattern to this, 7, 7x6,7x6x5 ------7! and sin, cos, -sin, -cos, sin, cos etc so it can easily be done by hand.
[edit] Differential equations
First order differential equations are covered in many textbooks. They are solved by integration. (First order equations have
, second order equations have
and
.)
The arbitary constant means another piece of information is needed for complete solution, as with the Newton's Law of Cooling and Half Life examples.
Provided all the xs can be got to one side and the ys to another the equation is separable.


y2 = 2x3 + c
This is the general solution.
Typical examples are:


by definition of logs.
(1)

(2)
(3)
This corresponds to:

The Schrödinger equation is a 2nd order differential equation e.g. for the particle in a box

It has taken many decades of work to produce computationally efficient solutions of this equation for polyatomic molecules. Essentially one expands in coefficients of the atomic orbitals. Then integrates to make a differential equation a set of numbers, integrals, in a matrix. Matrix algebra then finishes the job and finds a solution by solving the resultant simultaneous equations.
[edit] The calculus of trigonometric functions
There are many different ways of expressing the same thing in trig functions and very often successful integration depends on recognising a trig identity.

but could also be

(each with an integration constant!).
When applying calculus to these functions it is neccessary to spot which is the simplest form for the current manipulation. For integration it often contains a product of a function with its derivative like 2sinxcosx where integration by substitution is possible.
Where a derivative can be spotted on the numerator and its integral below we will get a ln function. This is how we integrate tan.

We can see this function goes to infinity at π / 2 as it should do.
[edit] Integration by rearrangement
Take for example:

Here there is no sin function producted in with the cos powers so we cannot use substitution. However there are the two trig identities
cos2θ + sin2θ = 1
and
cos2θ − sin2θ = cos2θ
Using these we have

so we have two simple terms which we can integrate.
[edit] The Maclaurin series
We begin by making the assumption that a function can be approximated by an infinite power series in x:

By differentiating and setting x = 0 one gets

Sin, cos and ex can be expressed by this series approximation



Notice ex also works for negative x.
When differentiated or integrated ex generates itself!
When differentiated sinx generates cosx.
By using series we can convert a complex function into a polynomial, and can use sinx = x − x3 / 6 for small x.
In actual fact the kind of approximation used inside computer programs is more like: 
These have greater range but are much harder to develop and a bit fiddly on the calculator or to estimate by raw brain power.
We cannot expand lnx this way because ln0 is
. However ln(1 + x) can be expanded.
Work out the series for ln(1 + x).
[edit] Factorials
The factorials you have seen in series come from repeated differentiation. n! also has a statistical meaning as it is the number of unique ways you can arrange n objects.
0! is 1 by definition, i.e. the number of different ways you can arrange 0 objects is 1.
In statistical thermodynamics you will come across many factorials in expressions such as: 
Factorials rapidly get unreasonably large: 6! = 720, 8! = 40320 but 12! = 479001600 so we need to divide them out into reasonable numbers if possible, so for example 8! / 6! = 7x8.
[edit] Stirling's approximation
Also in statistical thermodynamics you will find Stirling's approximation:

This is proved and discussed in Atkins' Physical Chemistry.
How can you use series to estimate ln2. Notice that the series for
ln(1 + x) converges extremely slowly. ex is much faster because the
n! denominator becomes large quickly.
[edit] Trigonometric power series
Remember that when you use sinx = x and cosx = 1 − x2 / 2
that x must be in radians.....
[edit] Calculus revision
[edit] Problems
- Differentiate e − tcos2t, with respect to t. (Hint - use the chain rule.)
- Differentiate x2(3x + 1)4. (Chain rule and product rule here.)
- Differentiate
. (Hint - split it into a sum of logs first.) - Integrate
. (Hint - use integration by parts and take the expression to be differentiated as 1.)
[edit] Answers
- It is just e − t. − 2sin2t − e − tcos2t. Bring a − e − t out of each term to simplify to − a(b + c).
- 2x(9x + 1)(3x + 1)3.
- therefore it is 4 times the derivative of
.- You should get
by 1 application of parts.