Re: Intersection of 2 curves



dtshedd@xxxxxxxxx wrote:
I am trying to locate a numerical technique to find the intersection of
2 curves. These are defined by tables of data rather than equations.
The data can be fitted with a 2nd degree polynomial, and only intersect
at one point. Both curves have positive slopes, though one has a
larger slope than the other.


Appreciate any suggestions or references.

dan

Here's how I would do it in a programming language:

1. Define functions f(x) and g(x) with the tables built-in
(either directly or by direct reference to an array),
using your favorite interpolation method--Newton, Lagrange,
whatever--to evaluate the tabulated function at any x in
the range.

2. Then solve the equation f(x)-g(x) = 0 using any of the
umpty-bazillion 1-dimensional root-finders in circulation.
My favorite happens to be the hybrid regula falsi/binary
search, but any will do (except Newton--you don't want to
have to calculate derivatives!).

3. Solve. Be happy.

Any standard programming language will do. You can probably even use
(ugh!) Maple's limited programming capability. (I do when I have
to.)

--
Julian V. Noble
Professor Emeritus of Physics

http://galileo.phys.virginia.edu/~jvn/

"For there was never yet philosopher that could endure the
toothache patiently."

-- Wm. Shakespeare, Much Ado about Nothing. Act v. Sc. 1.
.


Quantcast