I have a problem where I want to find where 2 1 dimension polynomials intersect.
Any ideas on a good algorithm to perform this task?
Thanks,
Printable View
I have a problem where I want to find where 2 1 dimension polynomials intersect.
Any ideas on a good algorithm to perform this task?
Thanks,
Polynomial 1: y = ax^2 + bx + c
Polynomial 2: y = dx^2 + ex + f
Intersect at equality:
ax^2+bx+c = dx^2 + ex + f
Rearrange:
(a-d)x^2 + (b-e)x + (c-f) = 0
Solve with quadratic equation!
If this wasn't quadratic (and thus can be solved analytically), a good strategy would still be to subtract one from the other and then use Newton's method to do root finding.
Hope that helps.