Intersection of 2 Polynomials
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Intersection of 2 Polynomials

  1. #1
    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. #2
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,005

    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

    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,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    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
    Posts
    1,089

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center