CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010

    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?


  2. #2
    Join Date
    Feb 2011
    United States

    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

    (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.
    Best Regards,

    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3
    Join Date
    Oct 2008

    Re: Intersection of 2 Polynomials

    Quote Originally Posted by BioPhysEngr View Post
    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 ...

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.