Nonlinear equations systems

One of my other hobbies, besides Music and Film, are maths, so last night I was a little bored and decided to take a look into some and get back to my good-old-school days. I especially like nonlinear equations.

Here are some close connections between finding a local minimum and solving a set of nonlinear equations. Given a set of n equations in n unknowns, seeking a solution is equivalent to minimizing the sum of squares when the residual is zero at the minimum, so there is a particularly close connection to the Gauss-Newton methods. In fact, the Gauss-Newton step for local minimization and the Newton step for nonlinear equations are exactly the same. Also, for a smooth function, Newton’s method for local minimization is the same as Newton’s method for the nonlinear equations . Not surprisingly many aspects of the algorithms are similar. Nonetheless there are also important differences.

Another thing in common with minimization algorithms is the need for some kind of step control. Typically, step control is based on the same methods as minimization except that they are applied to a merit function, usually the smooth 2-norm squared, r(x).r(x)

  • Newton: Newton’s method is an efficient algorithm for finding approximations to the zeros (or roots) of a real-valued function. As such, it is an example of a root-finding algorithm. It produces iteratively a sequence of approximations to the root, their rate of convergence to the root is quadratic. The method generalizes to complex and multidimensional versions.
  • Secant: Works without derivates by constructing a secant approximation to the Jacobian using n past steps. It requires two starting conditions in each dimension.
  • Brent: Method in one dimension that maintains bracketing of roots. It requires two starting conditions which bracket a root.

Newton’s method

Newton iteration The idea of the method is as follows: one starts with an initial guess which is reasonably close to the true root, then the function is approximated by its tangent line, and one computes the x-intercept of this tangent line (which is easily done with elementary algebra). This x-intercept will typically be a better approximation to the function’s root than the original guess, and the method can be iterated.

Suppose f : [a, b] → R is a differentiable function defined on the interval [a, b] with values in the real numbers R. The formula for converging on the root can be easily derived. Suppose we have some current approximation xn. Then we can derive the formula for a better approximation, xn+1. We know from the definition of the derivative at a given point that it is the slope of a tangent at that point.

That is:
newton.png

Here, f ‘ denotes the derivative of the function f. Then by simple algebra we can derive:
newton_2.png

We start the process off with some arbitrary initial value x0 (The closer to the zero, the better. But, in the absence of any intuition about where the zero might lie, a “guess and check” method might narrow the possibilities to a reasonably small interval by appealing to the intermediate value theorem).
The method will usually converge, provided this initial guess is close enough to the unknown zero, and that:
newton_3.png

Furthermore, for a zero of multiplicity 1, the convergence is at least quadratic (see rate of convergence) in a neighbourhood of the zero, which intuitively means that the number of correct digits roughly at least doubles in every step.

The 11 Rule

You likely all know the 10 rule (to multiply any number by 10, just add a 0 behind the number) but do you know the 11 rule? It is as easy! You should be able to do this one in your head for any two digit number. Take a look:

To multiply any two digit number by 11:

- For this example we will use 54
- Separate the two digits in you mind (5__4) – Notice the hole between them
- Add the 5 and the 4 together (5 + 4 = 9)
- Put the resulting (9) in the hole and you get the result: 594. That’s it! 11 x 54 = 594

The only thing tricky to remember is that if the result of the addition is greater than 9, you only put the “ones” digit in the hole and carry the “tens” digit from the addition.

For example 11 x 57 … 5__7 … 5 + 7 = 12 … put the 2 in the hole and add the 1 from the 12 to the 5 in to get 6 for a result of 627 … 11 x 57 = 627

One digit and get the entire number

And here’s another one. I don’t know about you but I’ve seen this one quite a few times but I was never able to figure it out. I remember my brother asking me numbers all the time and actually figuring them out but never told me how to do it. I guess those days are gone. Here’s the complete trick explained.

Basically you ask a person to think or a number between 1 and 9, annex a 0 to it, add the initial thought number to that result, multiply this sum by 3, then by 11 and the by 3 again, ask the person for the last digit of that result and you will be able to tell the entire number he computed, clear enough?, well here’s an example:

This part is all done by the person you’re asking. You don’t know this numbers.
- 1: The person thinks of any number, for the example we’ll use 3.
- 2: Annex a 0 to it. It will result in 30.
- 3: Add the original number to it. 30 + 3 = 33
- 4: Multiply this result by 3. 33 * 3 = 99
- 5: Multiply this result by 11. 99 * 11 = 1089
- 6: Multiply this result by 3. 1089 * 3 = 3267

Ask for the last digit from that number, the person should tell you 7

Now using that 7 you can compute (tell) this entire number and the number he first though. Here’s how:

- Last digit: 7 (This is the number the person told you)
- Second digit: 9 – 7 = 2
- First digit: 2 + 1 = 3
- Third digit: 9 – 3 = 6

3 (First digit) 2 (Second digit) 6 (Third digit) 7 (Last digit) = 3267

Back to the 7

I’ve been looking at some maths this morning and came across this one. No matter what number you choose to start playing you will always get back to the same number: 7

Follow this steps and have fun:

- 1: Think of any number you like, we’ll use 12 for the example.
- 2: Double your number, in our case it will be 24.
- 3: Add 14 your doubled number, we’ll get 38.
- 4: Divide your number by 2. Our result is 19.
- 5: Finally, subtract you original number from your result, in our case that number was 12.

19 – 12 = 7

And there you go, always back to the 7