← Background
Background · Calculus I, Part 3 of 3

The Fundamental Theorem: Counting the Electron Exactly

How do slopes and areas undo each other, and how much of the hydrogen electron lies within a given distance of the proton?

This page uses the integral of part 1 and the derivative rules of part 2.

1. Two Operations

We have two machines. The integral takes a density and returns a total: N(r)=∫0rP(s)ds with P(s)=4s2e−2s, the fraction of the hydrogen electron within r bohr of the proton. The derivative takes a function and returns its rate of change. The fundamental theorem of calculus says that each undoes the other.

2. First Direction: The Slope of a Running Total

Let f be continuous and A(x)=∫axf(s)ds.

  1. Neighbouring intervals add, so for h>0: A(x+h)−A(x)=∫xx+hf(s)ds, the area of one thin slice.
  2. A continuous function on a slice has a smallest value m and a largest value M there (quoted). Every rectangle sum lies between mh and Mh, so the area does too.
  3. Divide by h: m≤A(x+h)−A(x)h≤M.
  4. As h→0 the slice shrinks to the point x. Because f has no jumps, both m and M close in on f(x). The quotient is trapped between them.
  5. For h<0 the slice runs from x+h to x and has width −h. Its area is A(x)−A(x+h). Dividing that by the width gives the same quotient, between the same kind of bounds.
Fundamental theorem, first directionddx∫axf(s)ds=f(x).

So N′(r)=P(r): the radial density is exactly the rate at which the enclosed fraction grows, as the table in part 2 suggested.

3. Second Direction: Adding Up All the Changes

Suppose we can find a function F whose derivative is f. Such an F is called an antiderivative of f.

  1. By the first direction, A also has derivative f. So (A−F)′=f−f=0 everywhere.
  2. A function whose slope is zero everywhere on an interval is constant. (Again by the mean value theorem: every secant has the slope of some tangent, hence slope zero.) So A(x)=F(x)+C.
  3. At x=a nothing has been added yet: A(a)=0, so C=−F(a).
Fundamental theorem, second direction∫abF′(x)dx=F(b)−F(a).

The right side is often written [F(x)]ab.

In words: add up all the little changes and you get the total change. You can see it in the sums. Cut the interval into slices and write the total change as the sum of the changes over the slices,

F(b)−F(a)=∑i=1nΔFi ≈∑i=1nF′(xi)Δx→∫abF′(x)dx.

An integral that would take thousands of rectangles now takes two evaluations of F, if we can find F.

4. Integration by Parts

Integrate the product rule (uv)′=u′v+uv′ from a to b. The left side is a total change, [uv]ab, by the second direction. Rearranged:

Integration by parts∫abuv′dx=[uv]ab−∫abvu′dx.

It trades one integral for another. The art is to choose u so that u′ is simpler than u.

The picture. Let u and v both grow as x runs from a to b, and plot the point (u,v) as it moves. Write u1,v1 for the starting values and u2,v2 for the final ones. Thin upright slices under the curve have area vdu, where du=u′dx. Thin level slices to the left of the curve have area udv, where dv=v′dx. Adding up each kind of slice gives two integrals, written for short without limits: ∫vdu means ∫abvu′dx, and ∫udv means ∫abuv′dx.

The big rectangle from the origin to the end point is made of the small rectangle at the start, the blue region under the curve, and the sand region to its left.
∫udv+∫vdu=u2v2−u1v1.

That is integration by parts, seen as two areas that fill the space between two rectangles.

How to Choose u and v

Integration by parts leaves the choice to you. Write it as ∫udv=uv−∫vdu, with du=u′dr and dv=v′dr. In this box an integral without limits means an antiderivative: a function whose derivative is the thing being integrated. Two antiderivatives of the same function differ by a constant (section 3), so we write one of them and add C, which stands for any constant.

Take the integral of the electron, ∫4r2e−2rdr, and try the two natural choices.

A Good Choice

u=4r2 and dv=e−2rdr. Then du=8rdr and v=−12e−2r.

∫4r2e−2rdr =−2r2e−2r+∫4re−2rdr.

The power has dropped from r2 to r. Apply the rule again, with u=4r and the same dv, so du=4dr:

∫4re−2rdr =−2re−2r+∫2e−2rdr =−2re−2r−e−2r+C.

The power is gone. Put the two lines together:

∫4r2e−2rdr =−e−2r(2r2+2r+1)+C.

A Poor Choice

u=e−2r and dv=4r2dr. Then du=−2e−2rdr and v=43r3.

∫4r2e−2rdr =43r3e−2r+∫83r3e−2rdr.

This equation is perfectly true. But the power has risen from r2 to r3: the new integral is harder than the one we started with. Going on in the same way raises it to r4, and so on.

The good result agrees with section 5: asking that nothing be enclosed at r=0 fixes C=1.

A rule of thumb. Choose as u a factor that gets simpler when differentiated, and as dv a factor that you can integrate and that does not get worse when you do. Above, 4r2 loses a power each time it is differentiated, while e−2r integrates to a multiple of itself.

It is a guide, not a theorem. It does not promise that any choice will finish the job, and a good choice may break half of it. Here is an example with the natural logarithm ln⁡r, defined for r>0 as the power to which e must be raised to give r: eln⁡r=r. Taking as given that it has a derivative, differentiate both sides by the chain rule: eln⁡r(ln⁡r)′=1, so (ln⁡r)′=1/r. To integrate ln⁡r, take u=ln⁡r and dv=dr, so du=dr/r and v=r:

∫ln⁡rdr=rln⁡r−∫r⋅1rdr =rln⁡r−r+C.

Integrating dv raised the power of r from none to one, yet the choice works, because that new r cancels the 1/r in du.

Try it. Find ∫r2ln⁡rdr for r>0.

Answer

Take u=ln⁡r, which gets simpler when differentiated, and dv=r2dr. Then du=dr/r and v=r3/3:

∫r2ln⁡rdr=r33ln⁡r−∫r23dr =r33ln⁡r−r39+C.

Differentiating the result gives back r2ln⁡r.

5. The Electron, Exactly

We want N(R)=4∫0Rr2e−2rdr. Work up from the easiest piece.

Step A: No Power of r

Since the derivative of −12e−2r is e−2r,

I0=∫0Re−2rdr=[−12e−2r]0R=12−12e−2R.

Step B: One Power of r

Take u=r and v′=e−2r, so u′=1 and v=−12e−2r:

I1=∫0Rre−2rdr =[−12re−2r]0R+12∫0Re−2rdr =−12Re−2R+12I0.

Step C: Two Powers of r

Take u=r2 and the same v, so u′=2r:

I2=∫0Rr2e−2rdr =[−12r2e−2r]0R+∫0Rre−2rdr =−12R2e−2R+I1.

Step D: Put It Together

  1. I1=−12Re−2R+14−14e−2R.
  2. I2=14−e−2R(12R2+12R+14).
  3. Multiply by 4.
Fraction of the electron within R bohrN(R)=1−e−2R(1+2R+2R2).

Check by differentiating. By the product rule,

N′(R)=2e−2R(1+2R+2R2)−e−2R(2+4R) =4R2e−2R=P(R).

And N(0)=1−1=0. Both are as they must be.

Above, the area up to 2 bohr under P(r), the function being integrated, which is called the integrand. Below, that area recorded as a function of its right end. The slope below equals the height above.

6. Try It: Area and Slope Together

Move the right end r of the shaded area. The upper plot shows the area; the lower plot shows the same area as a height, with its tangent. The violet bar above and the violet tangent below carry the same number.

The slider needs JavaScript. The figure above and the table below show the same values.

7. All of It Is One Electron

As R grows, does e−2R(1+2R+2R2) really die away? A power grows while the exponential fades, so we must see who wins.

  1. For x≥0, ex≥1: it equals 1 at 0, and its slope ex=(ex/2)2 is never negative.
  2. A larger function has a larger integral, rectangle by rectangle. Integrating es≥1 from 0 to x gives ex−1≥x, so ex≥1+x.
  3. Integrating again: ex≥1+x+12x2.
  4. And once more: ex≥1+x+12x2+16x3≥16x3.
  5. With x=2R: e−2R≤68R3. So R2e−2R≤34R, which tends to 0. The terms with R and 1 are smaller still once R≥1.
∫0∞4r2e−2rdr=limR→∞N(R)=1.

Exactly one electron. The sums of part 1 were telling the truth.

R (bohr)within R: N(R)beyond R: 1−N(R)
0.50.08030140.9196986
10.32332360.6766764
20.76189670.2381033
30.93803120.0619688
40.98624600.0137540
50.99723060.0027694
60.99947770.0005223
100.99999950.0000005

At 1 bohr, the most likely distance, only 1−5e−2=0.323324 of the electron is inside. Since N only rises, we can find where it reaches a given fraction by repeatedly halving an interval that contains the answer:

fraction insideradius (bohr)
one half1.3370
nine tenths2.6612
ninety-nine hundredths4.2030

The tail beyond 10 bohr is 221e−20=4.56×10−7. In part 1 we proved, without this formula, that it is at most 9.86×10−7.

8. From Slices to Boxes

Space has three directions. Cut it into small boxes with sides Δx,Δy,Δz and volume ΔV=ΔxΔyΔz. Let ρ (the Greek letter “rho”) be the density in electrons per cubic bohr. For hydrogen, ρ=e−2r/π with r=x2+y2+z2. A small box holds about ρΔV electrons, with ρ taken at its centre. To count the electrons in a region of space, called Ω (“omega”), add over the boxes whose centres lie in it, then shrink the boxes:

Electrons in a regionN(Ω)=∫ΩρdV=lim⁡∑boxes in ΩρΔV.
A schematic slice through the boxes. The same idea as rectangles under a curve, with one more direction going into the page.

Here Ω is a cube of side 12 bohr centred on the proton, filled with midpoint boxes. Its limit, computed separately by a more accurate method, is 0.9998714.

per edgeboxesside (bohr)sum of ρΔVerror
85121.50.8800221−0.1198493
164 0960.750.9889492−0.0109222
3232 7680.3750.9991167−0.0007547
64262 1440.18750.9998235−0.0000479
1282 097 1520.093750.9998685−0.0000029

Some checks need no box sums. A ball of radius R around the proton can be cut into shells instead of boxes, and that is just N(R). The cube contains the ball of radius 6 and fits inside the ball of radius 63, so its value lies between 0.9994777 and 0.9999998. And the half of all space on one side of a flat plane through the proton holds, by symmetry, exactly half an electron.

Where this leads.

In the quantum theory of atoms in molecules (QTAIM), the number of electrons belonging to an atom in a molecule, its atomic population, is exactly such an integral, N(Ω)=∫ΩρdV, over a particular region Ω around the atom’s nucleus. The theory draws the boundary of that region from the shape of ρ itself. Finding those regions needs derivatives in three directions, which is the next stretch of the road. Counting inside them is what you have just learned.

9. Exercises

Exercise 1. What fraction of the electron lies farther than 2 bohr from the proton?

Answer to exercise 1

1−N(2)=e−4(1+4+8)=13e−4=0.238103.

Exercise 2. Find the fraction between 1 and 2 bohr.

Answer to exercise 2

N(2)−N(1)=5e−2−13e−4=0.438573.

Exercise 3. Use integration by parts to find ∫01xexdx.

Answer to exercise 3

Take u=x and v′=ex. Then ∫01xexdx=[xex]01−∫01exdx=e−(e−1)=1.

Exercise 4. The average distance of the electron is ∫0∞rP(r)dr: each distance weighted by how much electron sits there. Compute it.

Answer to exercise 4

We need 4∫0∞r3e−2rdr. As in section 5, parts with u=r3 gives ∫0∞r3e−2rdr=32∫0∞r2e−2rdr, because the boundary term vanishes at both ends (at the far end because integrating the inequality of section 7 once more gives ex≥x4/24, so that r3e−2r≤3/(2r)). By section 5, letting R grow in I2, the last integral is 14. So the average is 4⋅32⋅14=32 bohr, larger than the most likely distance of 1 bohr because of the long tail.

Exercise 5. What is the derivative of G(x)=∫0x2P(s)ds?

Answer to exercise 5

G(x)=N(x2). By the chain rule and the first direction, G′(x)=P(x2)⋅2x.

10. Where to Go from Here

This series is the first step of a longer route. These pages go further; they ask for more mathematics than the three parts give, notably derivatives and integrals in several variables.

Further Reading

Comments, questions or contributions? Please open an issue or a pull request on GitHub.