General > General Technical Chat
SOLVED: “Integrals” & “integrator”: clear … AS MUD
RJSV:
Newton used the term 'Analytical Geometry', in his work on mechanics of motion, position, velocity, acceleration.
To show what a backwards process would be, say you have 'T 2' or T squared, and partially just by guessing, figure the derivative is '2T'. If you just view that backwards, could say the integral is:
Integral of '2T' is 'T squared'... and so start learning a set of strategies, to 'solve' integration equations, partially by that backwards deduction.
Newtons was distance = 'A x Tsquared', using the well known free-fall equation.
Nominal Animal:
Others have answered the question with good references one can follow, to make differential calculus their bitch tool.
I'd like to post a wall of text with the intent of giving an useful intuitive grasp, so that when one goes off to learn the details, they just "slot in" into ones understanding nicely.
This is intended to be read through as a story, rather than the way one might read a textbook or a manual. The idea is to get the gist, the grasp, on the thing described, not to memorize any particular details.
If you care, do let me know (either here or in a PM) whether this worked for you. If you don't want me to post these long-ass posts, just say so here.
What if you were a doorman or security official, whose purpose was to ensure there were at most N people inside say a ballroom. How would you go about it?
Obviously, you'd keep a tally of the number of persons entering, and the number of persons exiting, and only let people enter when (entered - exited < N).
This can actually be considered the discrete variant of integration. With discrete values, integration turns into sums.
Let's change the problem a bit: instead of people, you need to measure the amount of water. You could do this using a bucket for the incoming water, and a bucket for the outgoing water, and use a known volume cup to move the water from one bucket to the other, and counting the cups. This would be the same thing as the doorman above, except that you just count the outgoing cups only. Yet, this would be horribly inefficient and a lot of work!
Instead, you connect the incoming and outgoing pipes with a flow meter. It is just a propeller, which rotates based on the velocity of the flow inside the pipe of the flow meter. Because the diameter of the flow meter pipe is known, and water is basically incompressible (unlike say air), the flow meter actually tells us the volume of water flowing through it per time unit, at every instant. While people or cups of water are discrete, the flow is now continuous.
To tell the amount of water that has flown through the flow meter during some time interval, we integrate the flow rate with respect to time, over that time interval. (This is also called a definite integral.)
If we add a device to the flow meter, like a stop watch, but measures volume, so that using the flow rate, it integrates over time to show the total volume flown through the meter, it is an integrator.
If we call the total amount of water the "change" –– because we don't know how much water was in the output initially, we only know how much the total changes ––, then the thing we integrated is the "rate of change". This also applies in the inverse: if we know how the "change" as a function of time (and it is continuous), then "rate of change" is the derivative of the "total" with respect to time.
Distance, velocity, acceleration, and jerk are the most commonly used examples of integrals and derivatives, though. "Change" is distance, "rate of change" is velocity (speed), and "rate of rate of change" is acceleration. Jerk is the "rate of rate of rate of change"; for example, when a car speeds up, it is the change in acceleration.
Integrating velocity with respect to time gives us the change in distance. Integrating acceleration with respect to time gives us the change in velocity; and done twice, the change in distance. Integrating jerk with respect to time gives us the change in acceleration; done twice, change in velocity; done three times, the change in distance.
A bit of math at this point. Let's use \$d\$ for distance, \$v\$ for velocity, \$a\$ for acceleration, and \$j\$ for jerk.
If we ignore drag and Earth's rotation, an object in free fall accelerates at \$1 g_n \approx 9.8 m/s^2\$ downwards (towards the gravitational center of Earth). (Because Earth is an oblate spheroid that rotates, the acceleration is greatest at the poles and smallest at the equator; and because Earth is not structurally uniform, the acceleration varies a little bit depending on the inner structure, like whether you're over deep sea or mountains or so.)
So, we have constant \$a = 9.8 m/s^2\$, and no jerk (\$j = 0\$) because \$a\$ is constant.
The integral of \$a\$ is \$v\$,
$$v(t) = \int a ~ d t = a t + v_0$$
and the integral of \$v\$ is \$d\$,
$$d(t) = \int v(t) ~ d t = \int a t + v_0 ~ d t = \frac{1}{2} a t^2 + v_0 t + d_0$$
where \$v(t)\$ denotes velocity as a function of time, and \$d(t)\$ denotes distance as a function of time. The \$(t)\$ part is just notation to remind us that it may have different values at different times \$t\$.
Remember how I said that the integral tells us the change in the total, and not the total itself? Above, I use \$v(t)\$ to denote the final velocity, when we have a duration \$t\$ of constant acceleration \$a\$ starting at initial velocity \$v_0\$. Similarly, \$d(t)\$ denotes the final distance, when we have a duration \$t\$ of constant acceleration \$a\$ starting at initial velocity \$v\$ and distance \$d\$.
Some mathematicians are bastards, and leave out that constant, the initial value (\$v_0\$ and \$d_0\$). Yet, it has to be there for those of us who use integration as a tool. Fortunately, in lists like Wikipedia's Lists of integrals, the constant (usually C) is explicitly shown. Unfortunately, some computer algebra software like wxMaxima omit the constant: if you ask integrate(a*t, t); it tells you a*t^2/2, and leaves out the constant (initial value), "because it is obvious".
If we specify a time interval, say from \$t = t_1\$ to \$t = t_2\$, then we get definite integrals. This means we can use
$$v_\Delta(t_1, t_2) = \int_{t_1}^{t_2} a ~ d t = (a t_2) - (a t_1) = a ( t_2 - t_1 )$$
to calculate the change in velocity due to constant acceleration from time \$t_1\$ to time \$t_2\$. As you may notice, the constant (\$v_0\$) is omitted, because we're integrating over an interval, i.e. the integral is definite. The constant is only added for indefinite integrals.
The change of distance due to constant acceleration from time \$t_1\$ to time \$t_2\$ is
$$d_\Delta(t_1, t_2) = \int_{t_1}^{t_2} v(t) ~ d t = \int_{t_1}^{t_2} a t + v_0 ~ d t = \left( \frac{1}{2} a t_2 + v_0 t_2 \right) + \left( \frac{1}{2} a t_1 + v_0 t_1 \right) = \frac{a}{2} \left( t_2^2 - t_1^2 \right) + v_0 \left( t_2 - t_1 \right )$$
Note that we integrate over the velocity as a function of time (\$v(t)\$), and not over the change in velocity from \$t_1\$ to \$t_2\$ (\$v_\Delta(t_1, t_2)\$), just as before. When we have nested integrals over the same variable(s), only the outermost integral is definite. This is why this has the constant \$v_0\$, but not the constant \$d_0\$.
Problems like "If you are shot upwards from a cannon at \$20 m/s\$ on a flat plain, considering only acceleration due to gravity \$g = 9.8 m/s^2\$ and ignoring air drag and such, how long will you fly before you splat on the ground, to the same level you were shot from?" are solved by working out the equation for \$d(t)\$, then substituting \$d_0 = 0 m\$, \$v_0 = -20 m/s\$, and solving \$d(t) = 0\$ for \$t \gt 0\$. The solution is \$t = \frac{200}{49} s \approx 4.08 s\$. If you want to find out how high the apex is, you solve for \$v(t) = 0\$ (because at the apex, your velocity is zero), and the answer is obviously \$t = \frac{100}{49} \approx 2.04 s\$ – halfway the parabolic arc –, and then substitute \$t\$ into \$d(t)\$, getting \$-\frac{1000}{49} m \approx -20.4 m\$. It is negative because acceleration down is positive, therefore up is negative.
In electronics, we have both integrator and differentiator circuits. These integrate and differentiate voltage or current, within practical limitations (especially frequency or rate of change and the voltage rails available).
Current integrators measure change in charge. (Current is charge over time, and the integral of current over time has the same units as charge.)
As far as I know, voltage integrators don't have an intuitive analog; they just integrate the voltage over time, as if it could be accumulated somehow.
Voltage differentiator describes the instantaneous rate of change in voltage, and current differentiator the instantaneous rate of change in current.
("Instantaneous rate of change" just means that the rate of change described is at that instant in time, not over any interval.)
Between discrete and continous integrals and differentials, there are a number of methods with their own benefits and limitations. "Riemann integral", for example, just means dividing the measured value or function into discrete segments (in time, or whatever variable you are integrating with respect to), and using a single sample as the average over that interval: Multiply the sample by the segment width, and sum them together, and you approximate the integral.
If you instead use the sample at both ends of each interval (assuming the value changes linearly from one to the other), you get "trapezoidal rule". More complicated sampling and fitting get you Newton–Cotes formulas, Simpson's rules, and so on.
At the extreme end (in my opinion), you get things like Monte Carlo integration, which approximates the integral by sampling the value or function randomly. It sounds ridiculous, but when you have an integral over multiple variables, like you often have in certain Physics problems, and the function overall is "wavy but not spiky", it can be the computationally cheapest way to obtain a good approximation!
Wait, integral over multiple variables? What?
Time is not the only variable you can integrate over. You can integrate over length to calculate area, and area over length to calculate volume, for example. If you have a cube with sides \$a\$, \$b\$, \$c\$, you can calculate its volume \$V\$ via a triple integral,
$$V = \int_0^a \int_0^b \int_0^c ~ 1 ~ dx ~ dy ~ dz = a b c$$
where the constant \$1\$ just means that the measurement space is flat (each infinitesimal point in space is exactly \$1\$ infinitesimal volume unit in volume). If you had a container full of dust, packed so that at \$z=0\$ it has density \$\rho_0\$, and at \$z = a\$ it has density \$\rho_a\$, linearily varying in between –– density being amount (usually mass) of dust per unit volume, so \$\rho(z) = \rho_0 + (\rho_a - \rho_0) \frac{z}{a}\$ ––, you can calculate the amount of dust \$M\$ via
$$M = \int_0^a \int_0^b \int_0^c ~ \rho_0 + (\rho_a - \rho_0) \frac{z}{a} ~ dx ~ dy ~ dz = \frac{\rho_a + \rho_0}{2} a b c$$
which is the same amount if we estimated the average density to be the average of \$\rho_a\$ and \$\rho_0\$, as it should.
It is a powerful tool, but since we typically use the names of their discoverers (or re-discoverers) for all kinds of stuff, it is quite a memory load to grasp it all at once. This is why I want to describe things using analogs and examples to give an intuitive understanding before one goes into the details, because it seems to make the learning part easier. (One could say that it is akin to constructing a memory palace, for method of loci, before populating it –– except designed for new tools and application instead of just memorizing details.)
JDubU:
Watch this documentary!
PBS Nova -- Zero to Infinity
It is the simplest, most intuitive presentation I've seen on what Calculus (limits, integrals, differentials) is about and why it needed to be created.
TimFox:
"Current integrators measure change in charge. (Current is charge over time, and the integral of current over time has the same units as charge.)
As far as I know, voltage integrators don't have an intuitive analog; they just integrate the voltage over time, as if it could be accumulated somehow."
An example of current integration to get charge is current flowing into a capacitor, where the resulting charge is the time integral of the current.
Similarly, the time integral of voltage in an inductor is the flux linking the inductance, where 1 V-s = 1 Wb = 1 T m2.
The latter is usually considered when calculating the emf from a change in flux: V = d(BA)/dt
rstofer:
Great post!
--- Quote from: Nominal Animal on November 19, 2022, 02:24:25 pm ---
Distance, velocity, acceleration, and jerk are the most commonly used examples of integrals and derivatives, though. "Change" is distance, "rate of change" is velocity (speed), and "rate of rate of change" is acceleration. Jerk is the "rate of rate of rate of change"; for example, when a car speeds up, it is the change in acceleration.
--- End quote ---
Let's not forget 'jounce' or 'snap' as it is sometimes called. The rate of change of 'jerk'. Apparently, this is used in automotive engineering but I don't know that.
--- Quote ---
At the extreme end (in my opinion), you get things like Monte Carlo integration, which approximates the integral by sampling the value or function randomly. It sounds ridiculous, but when you have an integral over multiple variables, like you often have in certain Physics problems, and the function overall is "wavy but not spiky", it can be the computationally cheapest way to obtain a good approximation!
--- End quote ---
One of the most intuitive ways to think about integration. Percent of bounded area.
Voltage integrators are useful for modeling physical properties. The problem with differential equations is that they are hard or impossible to solve. Take the equation and keep integrating until all of the derivatives disappear. Then use some op amp integrators to model the resulting system of equations. Like the rocket nozzle controls on the Atlas missile. We had a HUGE analog computer working on that problem. In undergrad, our Controls instructor really was a rocket scientist. Smart guy...
The PDF attached to reply 5 shows how to integrate out of a 2d order ordinary differential equation. On careful reflection, it shows the power of the '=' sign to create the highest derivative term on the left hand side from the remainder of the equations on the right hand side. Magic!
I like the exposition, keep on writing!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version