Monday, November 28, 2011

Approximation of Points of Intersection


      It is often difficult to solve simultaneous equations when finding points of intersection.  Thus we can use the method of halving the interval used for approximating roots to find these.  For example:

      If we want to find the point of intersection of f(x) and g(x), where f(x) = sinx and g(x) = (x-1)²,
      First we obtain (from the graphs) an initial approximate range for the x-value of the point of intersection)






Fig. 13 Sine Curve and Parabola


          There are two points of intersection between x = 0 & x = 0.5 and x = 1.5 & x = 2.  For the purpose of this demonstration I will focus on the former.  To find the x co-ordinate, we halve the interval and find the diference (f(x) - g(x)), comparing this to the results for the original approximations.

         For this example,
         f(0) - g(0) = sin0 - (0 - 1)²
                          = 0 - 1
                          = -1
          at x = 0 sinx is below (x - 1)² and the graphs are 1 unit apart
         f(0.5) - g(0.5) = sin0.5 - (0.5 - 1)²
                                ≈ 0.48 - 0.25
                                = 0.23
         at x = 0.5 sinx is above (x - 1)² and the graphs are approximately 0.23 units apart
                   (The above results can be verified by the graph)
         Halving the interval gives x = 0.25
         f(0.25) - g(0.25) = sin0.25 - (0.25 - 1)²
                                    ≈ 0.25 - 0.56
                                    = -0.31
         at x = 0.25 sinx is below (x - 1)² and the graphs are approximately 0.31 units apart
         The point of intersection is between x = 0.5 and x = 0.25, and closer to x = 0.5
         After a second application we reach x = 0.375 as the best considered approximation
         To find the y co-ordinate, it is reasonable to say, that because the graphs are so close, the average of the values of the two functions with the given x co-ordinate will give a rough estimation for the y co-ordinate.
          So, to find the y co-ordinate as an example,
          (f(0.375) + g(0.375))/2 = (sin0.375 + (0.375 - 1)²) / 2
                                                ≈ (0.38 + 0.39) / 2
                                                = 0.385
                   (for comparison, GeoGebra gives the point as (0.39, 0.38))
          It soon becomes obvious that this process is equivalent to decreasing f(x) by g(x) and finding the root, i.e. graphing the signed distance of g(x) from f(x) and finding the point at which the distance is 0 and thus the x-intercept of the graph.
          Using this information, we can now use Newton's method of approximation, using the identity h(x) = f(x) - g(x), to find the root of h(x), and thus the point of intersection of f(x) and g(x).  Obviously the order of the functions does not matter, the only change will be the sign of h(x), not the magnitude, and this will be completely opposite so as to cancel out any effect it might have.  The range of h(x) will be restricted to the smaller of the two ranges of f(x) and g(x), however this is of little importance as the point of intersection will not occur outside this range.

          Using our first example, and an initial approximation of x = 0.5 (since this was the closest)
          h(x) = sinx - (x-1)²
          h(0.5) ≈ 0.23
          h'(x) = cosx - 2(x - 1)
          h'(0.5) ≈ 0.88 - (-1)
                     = 1.88
                  x = 0.5 - 0.23 / 1.88
                     ≈ 0.38
         This gives a y co-ordinate of 0.38, which is reasonably close - and in only one step!

No comments:

Post a Comment