Solving a system of nonlinear (quadratic) equations

1,135

Solution 1

Here's my semi-geometrical solution. Let's scale $p$ and $q$ to $1+x$. So $$ P = p(1+x) \\ Q = q(1+x) $$ so equation become \begin{align} \left [P-(x+1)l \right ]^2 + \left [Q-(x+1)m \right ]^2 &= (a-l)^2 + (b-m)^2 \\ \left [P-(x+1)a \right ]^2 + \left [Q-(x+1)b \right ]^2 &= x^2 \left [ (a-l)^2 + (b-m)^2 \right ] \end{align} So, geometrical part now. The problem above is to find intersection points of two circles. Obviously circles might intersect at zero points (don't intersect), one point (tangent to each other), two points (real intersection) and infinite number of points (coinciding circles). Circle number one has a center at $[(x+1)l, (x+1)m]$ and a radius of $r = \sqrt{(a-l)^2 + (b-m)^2}$. Circle number two has a center of $[(x+1)a, (x+1)b]$ and a radius of $R = \sqrt{x^2 \left [ (a-l)^2 + (b-m)^2 \right ]} = rx$. Now, observe that distance between centers is $d = \sqrt{(x+1)^2 \left [ (a-l)^2 + (b-m)^2 \right ]} = (x+1)r = r + R$. So, the only possibility to those two circles is to be tangent to each other. Diagram is below

enter image description here

It is obvious now, that tangent point divides the line that connects the centers in $1:x$ proportion. So $$ P = (x+1)l + 1 \cdot (a-l) = a + xl \\ Q = (x+1)m + 1 \cdot (b -m) = b + xm $$ Going back to $p$ and $q$, you can easily find that $$ \left \{ \begin{array}{ccc} p & = & \frac {a + xl}{1 + x} \\ q & = & \frac {b + xm}{1 + x} \end{array} \right . $$

Solution 2

Hint: Divide both equations by $(x+1)^2$ and set $$\alpha^2 = \frac{(a - l)^2 + (b - m)^2}{(x+1)^2} \quad \beta^2 = \frac{x^2[(a - l)^2 + (b - m)^2]}{(x+1)^2},$$ then the system of equations to solve becomes $$\left\{\begin{array}{rcl} (p - l)^2 + (q - m)^2 &=& \alpha^2 \\ (p - a)^2 + (q - b)^2 &=& \beta^2 \end{array}\right.$$ I.e. you have to find the intersection of two circles in the plane. One of these circle has center $c_1 = (l,m)$ and radius $r_1 = \alpha$ while the other has center $c_2 = (a,b)$ and radius $r_2=\beta$.

Solution 3

The right hand sides just differ by a factor $x^2 > 0$: $$ \begin{align} (x + 1)^2 [(p - l)^2 + (q - m)^2] &= (a - l)^2 + (b - m)^2 \\ (x + 1)^2 [(p - a)^2 + (q - b)^2] &= x^2[(a - l)^2 + (b - m)^2] \end{align} $$

so we can get an equation for the left hand sides: $$ \begin{align} (x + 1)^2 [(p - l)^2 + (q - m)^2] &= \frac{(x + 1)^2}{x^2} [(p - a)^2 + (q - b)^2] \iff \\ [(p - l)^2 + (q - m)^2] &= \frac{1}{x^2} [(p - a)^2 + (q - b)^2] \quad (*) \end{align} $$

and indeed if we call the left side of $(*)$ $r_1^2$ and $x^2$ times the right side $r_2^2$ we got two circle equations in coordinates $p$ and $q$ $$ \begin{align} (p - l)^2 + (q - m)^2 &= r_1^2 \\ (p - a)^2 + (q - b)^2 & = r_2^2 \end{align} $$

where $r_1 = \sqrt{(a-l)^2+(b-m)^2}\, / \, (1 + x)$, $r_2 = x \, r_1$ and the first circle has radius radius $r_1$, origin $(l, m)$ and the second circle has radius $r_2$, origin $(a, b)$.

So the system can have the following solutions:

  • no solution: the two circles do not intersect, e.g. both origin $(0,0)$ and $r_1 \ne r_2$
  • one solution: the two circles intersect at just one point
  • two solutions: the two circles intersect in two points
  • infinite solutions: the two circles are congruent (same origin, same radius)

This gives $$ p = l \pm \sqrt{r_1^2 - (q -m)^2} = a \pm \sqrt{r_2^2 - (q - b)^2} \quad (**) $$ For $l = a$ this reduces to $$ r_1^2 - (q -m)^2 = r_2^2 - (q - b)^2 $$ which gives $$ q = \frac{b^2-m^2+r_1^2-r_2^2}{2(b-m)} $$ for $b \ne m$ otherwise this reduces to $$ r_1 = r_2 \iff x = 1 $$ for $b = m$.

For $l \ne a$ the calculation gets lengthy, throwing it into a computer algebra system (here WolframAlpha) gives this result.

Once one knows $q$ one can use one of the equations $(**)$ to calculate $p$.

Share:
1,135

Related videos on Youtube

curious_mind
Author by

curious_mind

Updated on August 01, 2022

Comments

  • curious_mind
    curious_mind over 1 year

    Consider the following system of equations: $$\begin{align} (x + 1)^2 [(p - l)^2 + (q - m)^2] &= (a - l)^2 + (b - m)^2 \\ (x + 1)^2 [(p - a)^2 + (q - b)^2] &= x^2[(a - l)^2 + (b - m)^2]\end{align}$$ Find the value of $p$ and $q$ in terms of $a, b, x, l$ and $m$, provided that $x > 0$.

    • Kaster
      Kaster over 9 years
      Try to divide second equation to the first one. I checked in Mathematica, this system has single solution and it's short and nice.
    • curious_mind
      curious_mind over 9 years
      what is the answer, then? please tell me, I don't have mathematica yet.
    • Claude Leibovici
      Claude Leibovici over 9 years
      Kaster gave you the very good hint ! Show your efforts, please. If you have problem, tell us where you are stuck and a lot of people will be helping you.
    • curious_mind
      curious_mind over 9 years
      Actually, I'm not showing my efforts because they are very lengthy
    • Claude Leibovici
      Claude Leibovici over 9 years
      I sware that, if you do what Kaster gave you, it is pretty simple (even simpler that what is given in the good answers you received). Come on ! Cheers :)
    • curious_mind
      curious_mind over 9 years
      @ClaudeLeibovici, I can't solve this using by paper and pen, even by Kaster's method, How do you sware that it's pretty simple. Please tell me post your answer I assure you I'll upvote your question and will choose your answer correct if it's simple. Please tell me your attempt. I tried for half an hour, and doesn't get success, please answer.
    • Claude Leibovici
      Claude Leibovici over 9 years
      I did by hand what Kaster suggested and I am almost blind ! It took me ten minutes or even less.
    • curious_mind
      curious_mind over 9 years
      can you please post your attempt? because I'm unable to solve honestly.
    • curious_mind
      curious_mind over 9 years
    • Claude Leibovici
      Claude Leibovici over 9 years
      I have to go now. But, in any manner, I would prefer that Kaster be involved. All the merit is his !
    • curious_mind
      curious_mind over 9 years
      but please tell me your method.
    • curious_mind
      curious_mind over 9 years
      @ClaudeLeibovici, Please post your answer, I'm feeling very uncomfortable. I've divided 2nd equation from 1st equation. Then, the RHS became $x^2$ then I've simplified LHS, but how to proceed then??
    • Kaster
      Kaster over 9 years
      @user91374 sorry for delay. I haven't solved this problem. I just suggest that dividing one to another might make it a bit easier. Based on Claude's answer, it is somewhat solvable. I was too lazy to solve by hands and so just fed it to the Mathematica, which provided the following answer: $$ p = \frac {a + lx}{1 + x} \\ q = \frac {b + mx}{1+x} $$
    • curious_mind
      curious_mind over 9 years
      @Kaster thank you, really. Actually, I don't have mathematica. But for the sake of information, I am asking. Does Mathematica provide step by step solution?
  • curious_mind
    curious_mind over 9 years
    Thanx, really, I want to know that how you get this idea?
  • Kaster
    Kaster over 9 years
    @user91374 well, main part is to scale $p$ and $q$. I decide to do so after doing some ``cheating'' :). I already knew the solution by using mathematica and I just observed that both $p$ and $q$ had a common denominator of $1+x$. So I multiplied to it to see if equations get simplified. They did and also revealed simple geometry with obvious centers location and relation between radii. I'm not sure if I would do that without knowing the solution beforehand.
  • curious_mind
    curious_mind over 9 years
    Oh, yes! I forgotten you used Mathematica... Despite you made a very good observation. I also made an observation just now!, It is that, p and q are same as Section formula, isn't it?
  • Kaster
    Kaster over 9 years
    @user91374 exactly. I actually used the same, just a bit shorter version of it.
  • curious_mind
    curious_mind over 9 years
    Okay, I'm satisfied from your answer and your method thank you very much for that, really. But for the sake of curiosity, what was Claude talking about? He said he solved this equations using your hint : Divide second equation by the first one, and he got the answer within ten minutes, I tried and simplified for half an hour, I got nothing than lengthy expressions, how did he? Have you any idea? Please, Check in mathematica if possible.
  • Kaster
    Kaster over 9 years
    @user91374 have no idea. Not that I spent a lot of time on it, but moving terms around didn't lead me anywhere. If you solve those equations in Mathematica and don't do full simplification, solution for the $q$ looks so ugly involving squares. But I don't completely reject the idea that there is some algebraically clever solution which is quite simple too. BTW, I think mvw is moving in that direction. He just didn't finish it up. I'm sure after all algebra's done, he should get the same answer. So give him some credit too.
  • mvw
    mvw over 9 years
    Kaster did spend the time to look at the one point solution closer and his graphics is very nice for this. I did not isolate that situation which should somehow show up in the lengthy solutions, giving a reason why not two but one solutions, e.g. by cancelling root sub terms. I tried instead to work in vector representation, location vector plus r times unit sphere vector but that results in statements of sine and cosine functions with different amplitudes and angles where one needs to decide if they have common points which I can only do by plotting them and not by looking at values alone.
  • mvw
    mvw over 9 years
    The fact that we share answers and comments allows improvement not unlike traditional publishing.
  • Claude Leibovici
    Claude Leibovici over 9 years
    @Kaster. Very elegant geometric analysis ! Thanks for providing it. Cheers :-)
  • curious_mind
    curious_mind over 9 years
    @ClaudeLeibovici, But how did you solve by hands within ten minutes! please tell us, I'm very curious to know about your method.I'm begging you for many days, please tell me.
  • Kaster
    Kaster almost 9 years
    Hey @user91374, why would you uncheck this as a solution?
  • curious_mind
    curious_mind almost 9 years
    Sorry mate, but I've found an short algebraic solution - (with no use of geometry) by hand, which I found to be more elegant, I 'll post it tomorrow.