2. Non-Linear Equations

a. Bend Me, Shape Me

Solving non-linear equations is a bit more difficult. Consider the following two equations:

Values for x and y can't be determined by Substitution or Gaussian Elimination. Both are second degree polynomials: each is a curve with a single inflection point. Increasing a polynomial's degree introduces more inflection points complicating conditions even further. Adding trig functions can add insult to injury.

We could plot the curves and pick their intersection graphically, Figure C-2.

Figure C-2
Plotted Non-Linear Equations

But that can be tedious and limit accuracy to below that desired. Notice how flat -x+4y2+y=13 plots: almost a straight line, but not quite. A plotting error in that curve can substantially affect its intersection with the second line.

A numeric solution is preferred. One simplified way to solve simultaneous non-linear equations is a Taylor Series.

b. Taylor Series

(1) Derivatives

A Taylor Series determines an equation's root by stating with an initial approximation (an educated guess) which is refined with a series of corrections. The corrections are based on successive partial  derivatives of the equation.

In general, for any non-linear function in a single unknown B(x), its root is determined from:

xo: Initial approximation for the unknown x
iB(xo)/∂xi: Partial derivatives with respect to x of B(x) from i=1 to n
dxi: correction for xo at each partial derivative
1!, 2! ... n!: factorials

The greater the value of n, the better the solution; n = infinity being the best (theoretically).

(2) Iterative Solution

Because not all functions can be derived to infinity (nor would it be prudent time-wise), a practical approach is to drop everything after the first derivative. The first partial is the largest contributor with each successive derivative substantially smaller. Using an initial approximation for the variable, xo, the abbreviated series is used to compute a correction, dx.

The correction is applied to xo and the series solved again generating another update. This iterative process continues until, theoretically, dx is zero. Because of the approximate nature of the abbreviated series, it could take an infinite number of iterations to achieve exactly dx=0.

Instead, iterations continue until an acceptable cutoff for dx is met. For example, if the answer must be good to 0.01, iterations may stop after dx=±0.005 ft. The better the initial approximation, xo, the more quickly the solution will converge.

The non-linear equation must have at least one real root.

x2-2x+3=0 cannot be solved with a Taylor Series because both its roots are imaginary.

This can be shown using a quadratic solution:

Where multiple real roots exist, the Taylor Series will converge to one closest to the initial approximation.

(3) Example

Using a Taylor Series, determine a root to nearest 0.001 for the expression F(x) = x2-9x+2=0

The derivative of the equation with respect to x is:

Set up the Taylor’s Series and rearrange the equation to solve for dx:

Starting with an initial approximation of 1, compute dx:

Update the initial approximation and compute a new dx:

Update and solve again:

...until the difference is small enough for the iterative solution to terminate. In this case, 0.001 meets our criterion, so with one last update we're done:

Solution: x=0.227+.0001=0.228

Because this is a second degree polynomial, it should have a second root. Starting with xo= 10, the Taylor Series converges to x = 8.77.
Check with a quadratic solution:

Figure C-3 is a graphic plot of the equation showing where the equation crosses y=0.

Figure C-3
F(x) = x2-9x+2=0
(4) Higher Degrees

So why use a Taylor Series if the equation can be solved with the quadratic solution? Because the quadratic solution is for a second degree polynomial. Higher degrees are much less likely to be easily solved. The quadratic solution cannot determine the roots of 4x3-x2+3x = 34, but a Taylor Series can.

c. Two Variables

(1) Multiple Derivatives

When applied to a single equation with a single variable, a Taylor Series will find the equation roots, the values where the function is zero. When applied to two simultaneous non-linear equations in two variables, the Taylor Series determines their intersection point(s).

To solve two non-linear equations:

we apply a Taylor Series to both simultaneously. Partial derivatives, from i=1 to n, for each variable are added to the function evaluated at initial approximations for both unknowns.

The Taylor Series for two equations in two unknowns, D(x,y) and E(x,y), are:

Each derivative is a correction applied to some initial approximations.

As with a single variable equation, the Taylor Series approximation includes just the first derivative for each variable.

The truncated Taylor Series results in two equations in two unknowns: dx and dy. These are corrections to the initial approximations, xo and yo. Using the iterative approach, initial approximations are updated, new corrections computed, and the process repeated until some threshold level for corrections is reached.

(2) Example 1

Determine x and y for the following equations using a Taylor Series.

Partial derivatives for both equations with respect to each variable are:

    

Starting with xo=4 and yo=3

Solving the two simultaneous equations results in dx = +1.167 and dy = -0.833

Update x and y and solve again; second iteration:

And so on...

Third iteration   Fourth iteration
x 5.029   x 5.000
y 2.203   y 2.000
dx -0.029   dx 0.000
dy -0.023   dy 0.000

The solution converges in four iterations, three if ±0.05 is sufficiently accurate.
Final answers: X=5.0, Y=2.0

(3) Example 2

The equation of a circle is N2+E2 = R2 where N and E are the radius point coordinates. If we have coordinates of the radius point and another on the perimeter, Figure C-4, the radius can be computed from:

Figure C-4
Radius and Points

In coordinate geometry (COGO), we often need coordinates at the intersection of two circular arcs. Using the radius point coordinates and radii, equations can be written for both circles and their intersection, Figure C-5.

 

Figure C-5
Intersecting Circles

Because they are non-linear equations, a Taylor Series can be used to solve NP and EP. The equations are second degree polynomials so there are two possible intersection points. Initial approximations should be selected which are closer to the desired intersection than the other.

Given the data in Figure C-6, what are the coordinates of point P?

The closer the initial approximations are to point P, the quicker the solution will converge.

We will start with 600.00’ N and 900.00’ E.

Figure C-6
Intersecting Circle Example

 

Using function A to represent one circle and B the other, the two equations can be written as:

Partial derivatives of each equation with respect to NP and EP are:

Set up the Taylor Series approximations with initial coordinate approximations.

Substitute dN from function A into function B.

Then substitute dE back into dN.

Apply the corrections to the initial approximations.

Re-solve the Taylor Series with the updated coordinates:

The corrections are still relatively large, so update the coordinates and repeat.

dN dE updated N updated E
+0.05 +0.02 615.38 923.08
+0.002 +0.003 615.38 923.08

Final coordinates: NP = 615.38, EP = 923.08