Rough Calculus - Integration
User Rating: / 0
PoorBest 
Written by Bryce Ringwood   

 

IntegraIntegrals as the reverse of IIIn   llllmmmnnn

This is planned to be the last article in this series (designed to let me off the hook when I breathe an equation in my articles.) I'm planning to give a list of software and calculators or something after this, but it won't be wall-to-wall equations (I hope).

Integration as the Reverse of Differentiation

In a previous article, we outlined the process of differentiation. Presumably, if we can differentiate a function, then we can equally well undifferentate it. Well, yes, but does it mean anything if we do?

Let's take our formula from the apple saga:-

\displaystyle{{ds\over dt}=at}

which we derived from

\displaystyle{s={{at^2}\over 2}}

by multiplying by the power of the expression and reducing the power by one, which we sort of proved to be true.

Well, we could start with apple velocity, which at any point during the falling process is acceleration multiplied by time. Rearranging things a bit  ${ds\over dt}=at$ (remember):

\displaystyle{ds=at\times dt}

or we could say

 

\displaystyle{s=undifferential-of(at\times dt)}

Instead of "undifferential of" we call an integral, written like this $\int $. It looks like an elongated "S" - because that reminds us it is a sum - as we shall see. To put our last equation more elegantly:

 

\displaystyle{s=\int at dt}

To evaluate our integral, we must clearly "raise the power by one and divide by the power so formed". Unfortunately - that's not the whole story, because if you differentiate:

\displaystyle{at^2 + C}

You will also see that this gives the same result. We happen to have inside knowledge that when s=0, then t=0 so that C=0.

The foregoing illustrates (but does not prove) "the fundamental theorem of calculus", which I am going to paraphrase as "if you can differentiate something to get something else, then you can integrate that something else to get something again."

As we will see, we can avoid the constant by using a definite integral. Our example was of an indefinite integral and illustrated that it is possible to take an expression in terms of a variable and produce a new expression for its integral.

If you were at school or college, many unhappy hours would be spent integrating algebraic expressions using all sorts of rules I won't mention here. Many books, such as the "Reference Fada for Radio Engineers", the "SHARP E500 calculator manual" (and the calculator itself) have many pages devoted to tables of integrals. You will almost certainly never use them. Why? - read on.


Integrals as a Means of Calculating Areas Under a Curve

Let's examine the following expression (I have chosen $sin(t)$ - it could be any well-behaved function:

\displaystyle{a={\int_0^{\pi}}sin(t)\,dt}

The symbol $a$ stands for area. It means that we are going to take vertical strips of height $sin(t)$ and width $dt$ and $\int$um them together to find the area beneath the curve $sin(t)$ shaded blue in the figure. The domain of integration being from $0$ to $\pi$. Here's a plot to help you visualise the process:

 

Integral of PI/2

Notice how the expression for the integral begins at zero and eventually climbs to a value of 2.

In our previous dicussion on differentiation, we arrived at the fact that $\displaystyle{{dcos(t)\over dt}=-sin(t)}$. Reversing the process:

\displaystyle{a={{\int_0^{\pi}}sin(t)\,dt }= -cos(\pi ) - (-cos(0)) = 2}

As this is a definite integral, we have substituted the values for the domain of the integration. The $sin$ function is well-behaved because it doesn't double back on itself, suddenly shoot off to infinity, have gaps ... and so on.

Let's look at the problem in GW-BASIC

10 PRINT"Enter lower bound l: ",
20 INPUT L
30 PRINT"enter upper bound u: ",
40 INPUT U
50 A=0
60 S=(U-L)/100
70 FOR I =1 TO 100
80 T=L+I*S
90 GOSUB 1000
100 A=A+F*S
110 NEXT I
120 PRINT "Area under curve is",A
140 STOP
150 END
990 REM - PUT YOUR FUNCTION HERE!
1000 F=SIN(T)
1050 RETURN

run
Enter lower bound l:        ? 0
enter upper bound u:        ? 3.14159
Area under curve is          1.999835
Break in 140 
Ok 

This is a not particularly accurate program to integrate a function. Increasing the steps to 1000 improves it, but it took 5 minutes to write and yields a good enough result for most purposes. Quite a few pocket calculators have an integration function built-in. More accurate formulae, such as "Simpson's rule" and the "Trapezium formula" exist and may be used with coarser steps.

This explains why I'm not a fan of integration formulae in real-life. Unfortunately, if you are learning maths at school, you will probably have to sweat through them.


Differential Equations

We can only lightly scratch the surface of this topic. Indeed, mankind's inability to solve some of these leaves us guessing about many phenomena.  From artillery problems, to weather prediction - we have been attempting all sorts of ways to solve these problems. In experimenters corner, you will see how analog computers can be used.

You might remember for a battery charging a capacitor through a resistor R :

\textstyle V{_i}-V  = {\displaystyle {C R} {dV \over dt}}

How do we solve it?

Well, one way is to guess the answer - this often works, but lets adopt a strategy of putting like things together - $t$s with $dt$s and $v$s with $dv$s thusly:-

\displaystyle{{dt\over CR}={dV\over{V{_i}-V}}}

Now, we have all the $t$ stuff on the left and the $V$ stuff on the right, so we can integrate:

\displaystyle{{t\over CR}=-log{_e}(V{_i}-V) + log{_e} of\, a\, constant\, we'll\, call\, A }

( you did do that excercise at the end of the differentiation article showing that $\displaystyle{{dlog(x)\over dx }={1\over x}}$ didn't you?)

\displaystyle{{t\over CR}={-log{_e}\left ({{V{_i}-V}\over A}\right )}}

Turning the equation round

\displaystyle{{V{_i}-V}=Ae^{-{t\over CR}}}

We know, however that when $t=0$, then $V=0$, therefore $A=1$, so we can see that: 

\displaystyle{V=V{_i}(1 - e^{-t\over CR})}

Its probably better to remember how to do it, rather than the final result - rather like " to travel hopefully is a better thing than to arrive".


Summary
  • Integration is the inverse of differentiation.
  • The integration of a well behaved expression will yield the area enclosed between the curve representing the expression and the x-axis.
  • This fact can be used to evaluate an integral numerically, and was demonstrated using BASIC.
  • Differential equations are used to describe the world we live in. Many are insoluble, but here we presented a simple equation with separable variables.
 
Joomla template by a4joomla