I have a function $f(x)$ and two points $p_1$ and $p_2$. What I need to find is the point where $f(x)$ and the line defined by the two point intersect.
I know what $f(x)$ is, $f(x) =\dfrac{c_0+c_2x+c_4x^2}{1+c_1x+c_3x^2}$, and I know that the two points are less than but close to the path of $f(x)$.
What I did was find the line $y=mx+c$, and solve $f(x) = mx+c$, which gave me a third order polynomial $ax^3+bx^2+cx+d = 0$, where the roots are the intersects.
My question is, can I solve for only one root? Specifically the one closest to $p_2$. Now, if there is an easier method to find the intersect (which will be implemented in a program), I would love to hear it and would immediately accept that answer.
I set $mx+c =f(x)=\dfrac{c_0+c_2x+c_4x^2}{1+c_1x+c_3x^2}$,
which gave me the following polynomial that I took the roots of
$mc_3x^3+(mc_1+cc_3-c_4)x^2+(m+cc_1-c_2)x+(c-c_0) = 0$
Then I found the root closest $p_2$.