CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Thread: Intersection of 2 Polynomials

1. Junior Member
Join Date
Apr 2010
Posts
8

## Intersection of 2 Polynomials

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,

2. ## Re: Intersection of 2 Polynomials

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

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.

3. Senior Member
Join Date
Oct 2008
Posts
1,456

## Re: Intersection of 2 Polynomials

Originally Posted by BioPhysEngr
If this wasn't quadratic (and thus ...
just wanted to note that there exist analytical formulas for polynomial roots up to and including degree 4 ...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•