0

I have a pair of quadratic equations in the form

$ax^2 + bx + cy^2 + dy + e = 0$

$fx^2 + gx + hy^2 + ky + l = 0$

and there should be a solution in the range $-2 \leq x,y \leq 2$ which I need to find programmatically.

I can eliminate one variable by squaring to get a quartic equation which I could solve numerically and substitute back, but I'm not sure about numeric stability and spurious roots. Is there a better way of solving this?

Edit: This question Solution af a system of 2 quadratic equations has answers with comments "In order to solve this degree 4 equation you need either some luck, or some patience " and "How would one programatically find the lines that constitute a degenerate conic?". That does not seem to demonstrate a better/simpler solution.

  • do you have concrete values for all the parameters? – Dr. Sonnhard Graubner Feb 14 '18 at 12:05
  • Use \ge or \geq to generate $\geq$ and \geqslant to generate $\geqslant$. Or, use \le or \leq to generate $\leq$ and \leqslant to generate $\leqslant$. If you are old-fashioned, use \gtrless to generate $\gtrless$. Now, you are set with all the inequality signs. The words in bold are called commands, and all you need to do is put a dollar sign before and after the commands to put them into action, i.e. $$\ldots$$. – Mr Pie Feb 14 '18 at 12:11
  • The Jenkins-Traub algorithm should provide acceptable numerical results for the roots of a quartic. If you're really concerned, you can use the roots Jenkins-Traub finds and use them as initial guesses for Newton-Raphson iteration. – Andy Walls Feb 14 '18 at 12:56
  • Thanks, the Jenkins-Traub algorithm looks like the best option at the moment. I will have concrete values for all parameters and need to solve this using C++ with real-time constraints, so want to avoid a slowly converging iterative process. – Toby Kelsey Feb 14 '18 at 13:43

0 Answers0