Under the hood - part 03: Equations
To begin to look under the hood of Weighted Residual Methods we will have to familiarize ourselves with equations and, in particular, with differential equations and their residues.
-
Step 1: Let's use everyday language
There are countless textbooks that develop differential equations and numerical methods in a complete and rigorous manner.
However, in these tutorials we aim to approach these topics using everyday, non-rigorous language that will be useful to those who are not comfortable with mathematical formality, but still want to grasp fundamental ideas.
Even a friendly, though light, introduction serves as motivation to reconcile oneself with the textbooks and accept their hard language as an essential tool to formalize ideas.
It is an attempt to understand "the message" without complicating it, at least in the first instance, with "a language" that is not natural to us.
A message can be transmitted in different languages, and we will use a friendly one accepting that its informality can bias the message, but trying not to distort it.
-
Step 2: The Stork Doesn't Bring Babies... or Equations!
Well, we need to talk a little about equations because we want to understand what the "residues of differential equations" are, which apparently support the Weighted Residual Methods that we set out to study.
Like many of us who are focused on the engineering aspects of problems (and use mathematical resources but without studying them for their intrinsic value) I like to think that "equations, like babies, are not brought by the stork" nor did someone simply set out to invent them. Rather, I believe that equations arise from practical attempts to solve different problems and, many times, end up being a problem themselves!
When someone studies a problem, of his own specialty and interest, it is very likely that he is able to apply his specific knowledge until reaching a formulation (based on equations) that, eventually, constitutes a problem derived from the original and that he is not able to solve. To this end, he seeks the help of someone with mathematical knowledge to solve this problem derived from the original problem that he intended to solve.
-
Step 3: Functional relationship
Let's suppose that I am in charge of a process for which I am provided with a speed data "X" in Km/hr but I must enter it into a machine that accepts that data as "Y" expressed in m/s.
I may think of this "problem" based on my specific knowledge in the matter: I know that each kilometer is equivalent to 1000 meters and that each hour contains 3600 seconds. With which I can pose an equality like the following:
I will have arrived at an expression that allows obtaining the dependent variable "Y" expressed in m/s from the independent variable "X" expressed in Km/hr.
This functional relationship between X and Y (we say that Y is a function of X) is valid for any X, but there are functions that are not defined for all values of X.
A classic example is when X is in the denominator and then it cannot take values that cancel it out, because division by zero is not defined.
-
Step 4: Graphical and tabular representations
We can visualize this functional relationship both graphically, as a curve on the X and Y axes (a straight line in this case, passing through the origin X=0, Y=0) and also as a table of values.
The above graph only covers values of X between -5 and 5, but this functional relationship admits them between -infinity and +infinity. Now, although "mathematically" the values of X can vary a lot, not all of them necessarily have "physical meaning."
In our case, the speeds that are provided to us as data could have negative or positive values if we "conventionally" associate them with certain directions. Example: positive to the right, negative to the left.
But if X represented, for example, time, its negative values (negative times) would not physically make sense even if mathematically the relationship admits them.
Again, there could be some convention that assigns "time = 0" to a certain reference instant from which all the others are positive, but the negative ones do make sense because they refer to instants prior to the reference instant.
Graphical language is the most natural way to understand the functional relationship, but it is not always possible to "draw a function" since some depend on many independent variables (X, Y, Z, T) and space only allows us three axes. For example, to represent dependent values "Z" as a function of variables "X, Y".
-
Step 5: Practical uses
The practical use given to this expression can include the obvious: knowing Y in m/s from X in Km/hr. For example, given X = 5 we have:
If, on the other hand, we have the value Y = 0.83 m/s and we want to know how many km/hr it corresponds to... it will be necessary to "clear the unknown X":
To do this, we will have to perform "allowed operations" on both sides of this equation, so that the equality is not altered, and at the same time it allows us to leave the "X" alone in one of the sides. In this case, if we multiply both sides by 3.6, the following occurs:
Although this case is very simple, it is clear that it will not always be so easy to "clear the X" from an equation. Suppose that the functional relationship we obtained after our analysis had been the following:
Again, as in the previous case, obtaining the value of "Y" for a given "X" is a simple task. For example: for X = 0 the value of "Y" arises immediately: Y = 0^2 + 2 * 0 - 5 = - 5 and corresponds to the point where the curve cuts the vertical axis (X = 0, Y = - 5).
But, if on the contrary, we want to know the value of "X" that corresponds to a certain value of "Y" the problem is no longer so simple. For example, if Y = 0, how much will X be worth?: 0 = x^2 + 2 * X - 5
Intuitively, we could think of making a scale drawing and measuring these values on the X axis. Or at least use them as an approximation to successively test values of X in the expression x^2 + 2 * X - 5 trying to get the result close to 0.
The result we want is x^2 + 2 * X - 5 = 0 and it will be obtained from certain (two different, in this case) "exact" values of X, which we will hardly find in a reasonable number of tests.
During these tests, when replacing in that expression some "approximate" values of X the result will not be exactly 0 but a certain SURPLUS OR RESIDUE that we will want to reduce as much as possible.
For a few cases, "exact analytical solutions" are known, such as the so-called "quadratic solver" that gives the exact values of X with the expression:
In our example, the value "a" accompanying the quadratic term (x^2) is a = 1; the value "b" accompanying the linear term (x) is b = 2; and the value "c" is an independent term equal to c = -5. Replacing these values in the formula for the solvent, we obtain the two exact values of "X" for which "Y = 0":
As attractive as these "exact solutions" may seem, they are not powerful tools for engineering problems since they involve equations for which, in general, there are no exact solutions and we can only settle for obtaining "approximate numerical solutions."
-
Step 6: Differential equations and their residuals
Due to the length of this article/tutorial, we will leave this specific section for the next one, where we will see an example of how a differential equation arises when studying a certain case and what its residual means.
But don't worry! These aren't the ones we'll start with. However, you can believe me that these intimidating differential equations are actually very easy to understand!
Let's go step by step...
I'll see you in the next article/tutorial.
-
Step 7: Links
This tutorial comes from:
Under the hood - part 02: Read me first
and continues in:
...