Engineering Math - Calculus

 

 

 

Integration

 

Integration is expressed in mathematical form as shown below. If you have finished any cource for pre-calculus or calculus, you would almost automatically assosiate it with calculating the area of a closed shape. However, it is only one application of integration, not everything of integration even though original idea of integration might come from the motivation to calculate the area. (Watch this excellent Youtube  Mechanical Universe 07 - Integration.  If this link does not work, search in Youtube with "Mechanical Universe 07 - Integration" keyword). But I noticed that automatic association of Integration with the area often hinder me from understanding the practical meaning of many other form of integration. So I would like to show you a little generic form of integration rather than giving you too much impression of 'calculating the area'.

So this page starts from the generic form and treats the area as one example of it. Then it works through that example with numbers, including a spreadsheet version of the sum. Finally, it applies the same form to vectors along a path and over a surface, which gives the line integral, its closed form and the surface integral.

What does an integral do in general ?

Let's set the area aside for a moment and look at what every integral has in common. An area, a length, the work of a force and the flux of a field look like different problems. Yet all of them are computed by the same procedure, and only the parts inside it change.

Generic form of integration can be represented as shown below. As you see, "Integration" is a processing of "repeating a specific operation and summing up all the result".

 

Generic form of an integral with range, two quantities and an operator

Figure 1. The generic form of an integral. A range, two quantities and an operator between them define one small operation, and the integral repeats it over the range and adds the results.

  • The range says where to repeat the operation : a and b are the start and the end. For a path or a surface, the range is the path or the surface itself.
  • The two quantities are what the operation works on : one is a value of the function, and the other is a small piece of the range, such as dx.
  • The operator decides the meaning : a multiplication of two numbers, or an inner product of two vectors.
  • Steps i to iii are the whole procedure : do the operation, repeat it at every point of the range, and sum all the results.

The real meaning of the integration is determined by what are the quantity and operator in the formula. See following examples and you will get familiar with how you interpret various Integral forms.

 

Four examples of quantity and operator pairs: area, inner product, line length and surface normal

Figure 2. Four pairs of quantity and operator. The same repeat and sum procedure gives an area, a length, or a sum of inner products, depending on what is combined.

  • Upper left, multiplication gives an area : the height of the curve times a small width is the area of one thin rectangle.
  • Lower left, 1 times a line segment gives a length : when the first quantity is the constant 1, the sum is just the total length of the segments.
  • Upper right, an inner product along a curve : a field vector and a small step along the curve are combined by the inner product. This is the line integral.
  • Lower right, an inner product with a surface normal : the normal vector of a small patch has the patch area as its length. Its inner product with a field vector gives the surface integral.
  • An integral is a repeated operation plus a sum : the area is only one choice of operation.
  • Read the operator first : it tells you whether the result is an area, a length, a work or a flux.

How does the integral add up an area ?

Assuming you now have some intuitive understanding of "Integration", now let's get a little bit deeper into mathematical concept. One example is shown below. Associate this expression with the intuitive form you saw above. Actually this example is the one you would see in almost every Calculus/Pre-Calculus book.

 

Integral of f(x) dx from 1 to 2 with range, quantities and multiplication operator marked

Figure 3. The integral of f(x) from 1 to 2 in the generic form. The quantities are f(x) and dx, and the operator is a multiplication.

dx in this example represents 'width' of a rectangle and f(x) represents the height of a rectangle. The operator between dx and f(x) is 'multiplication'. So the meaning of f(x) dx is the area of a small rectangle. If you represents the meaning of the whole integral equation, it can be represented as shown below.

 

Rectangles of width dx = 0.1 under f(x) = x between 1 and 2

Figure 4. The area under f(x) = x from 1 to 2, cut into thin strips of width dx = 0.1. The blue lines mark the points x = 1.0, 1.1, ... 2.0 where f(x) is evaluated.

If we represent this process into a spreadsheet format which you may give you more intuitive form, it can be represented as shown below.

 

Spreadsheet of x, f(x), dx and f(x) dx summed to 1.65

Figure 5. The spreadsheet form of the same sum. Each row is one f(x) dx product, and the total of the last column is 1.65.

Let's check the number 1.65 against the exact result. The area under f(x) = x from 1 to 2 is a trapezoid with heights 1 and 2 and width 1. So the exact area is (1 + 2)/2 * 1 = 1.5. The spreadsheet gives 1.65, which is 0.15 too large.

The reason is the number of rows. The rows run from x = 1.0 to x = 2.0, which is 11 values of x. But the range from 1 to 2 holds only 10 rectangles of width 0.1. So the last row, at x = 2.0, adds a rectangle that lies between 2.0 and 2.1, outside the range. Its area is 0.20. If you drop that row, you get the left rectangle sum, 1.45. If you drop the first row instead, you get the right rectangle sum, 1.55. The table below compares these sums, computed for two step sizes.

 

Sum

dx = 0.1

dx = 0.01

All rows including both ends, as in Figure 5

1.65

1.515

Left rectangles, last row dropped

1.45

1.495

Right rectangles, first row dropped

1.55

1.505

Trapezoid rule

1.5

1.5

 

Every rectangle sum gets closer to 1.5 as dx gets smaller. This is exactly what the integral means: the limit of the sum as dx goes to 0. The trapezoid rule is exact here, because f(x) = x is a straight line. For a curved f(x), it also has an error, but that error shrinks much faster than the error of a rectangle sum.

  • f(x) dx is the area of one thin rectangle : the integral is the sum of these areas as dx goes to 0.
  • Count the rectangles, not the points : a range of length 1 with dx = 0.1 holds 10 rectangles but 11 points.
  • A smaller dx gives a better sum : with dx = 0.01, every rectangle sum is within 0.015 of the exact 1.5.

How does the same idea work along a path or over a surface ?

The generic form does not require numbers. The quantities can be vectors, and the operator can be the inner product. The range can be a curve or a surface instead of an interval on the x axis. The three examples below keep the same repeat and sum procedure and change only these parts.

Line Integral

Let's look at another example as shown below. In this example, you see a lot of vectors in blue arrow and vectors in red arrow. You see the red vector is sitting on top of a curve (path) shown in red curve. Each of the red vector is the tangential to each point on the path. Now I want to take the inner product of each red vector and blue vector and sum them all. This operation can be represented in a mathematical form as shown below. This kind of integration is called "Line Integral".

 

Line integral of F(r) dot dr along an open curve C

Figure 6. A line integral along an open curve C. At each point, the field vector F(r) and the small step dr are combined by an inner product, and the results are summed along C.

The inner product keeps only the part of F that points along the path. So a blue vector that crosses the path at a right angle contributes nothing. If F is a force, the line integral is the work done along the path.

Circular Integral

Let's look at another example as shown below. In this example, you see a lot of vectors in blue arrow and vectors in red arrow. You see the red vector is sitting on top of a curve (path) shown in red curve.  Each of the red vector is the tangential to each point on the path. Now I want to take the inner product of each red vector and blue vector and sum them all. This operation can be represented in a mathematical form as shown below. The mathematical operation is exactly same as the one shown in previous example. The only difference is the path the red vectors are going along. The path in this example is a closed curve. This kind of integration is called "Circular Integral" (The closed path need not to be exact circle as below. It can be any arbitrary shape of closed curve).

 

Closed line integral of F(r) dot dr around a circle

Figure 7. The same line integral around a closed curve. The small circle on the integral sign marks a closed path.

Most textbooks call this a closed line integral or a contour integral, and its value for a field F is called the circulation of F. Let's compute one. Take F = (-y, x) and the unit circle, walked once counterclockwise. At every point of the circle, F is tangent to the circle and has length 1, so the inner product of F and dr equals the length of dr. The sum is therefore the length of the circle, 2π. A field with a nonzero circulation like this one is said to rotate, and the Curl page measures that rotation point by point.

Surface Integral

Let's look at another example as shown below. In this example, you see two vectors in each segments of the surface. one of the vector is normal to each surface segment(This vector is called 'normal vector').  The other vector is an arbitrary angle to the normal vector . Now I want to take the inner product of each red vector and blue vector and sum them all. This operation can be represented in a mathematical form as shown below. The mathematical operation is exactly same as the one shown in previous example. The only differences is that this operation goes along the surface. This kind of integration is called "Surface Integral".

 

Surface integral of F dot ds over a curved surface with normal vectors

Figure 8. A surface integral. At each small patch, the field vector F and the patch normal ds are combined by an inner product, and the results are summed over the surface.

In the enlarged patch, the red vector is ds. It is normal to the patch, and its length is the patch area. The blue vector is the field F. Their inner product is the part of F that passes straight through the patch, times the patch area. So the surface integral measures how much of the field flows through the surface, and it is called the flux. The Divergence page connects the flux through a closed surface to what happens inside it.

  • A line integral sums F along a path : only the part of F that is tangent to the path counts.
  • A closed path gives the circulation : for F = (-y, x) around the unit circle, it is 2π.
  • A surface integral sums F through a surface : only the part of F that is normal to the surface counts, and the result is the flux.