0

Given are $$S_1 = x(a_1x+2h_1y)+b_1y^2 + c_1=0$$ $$S_2 = x(a_2x+2h_2y)+b_2y^2 + c_2=0$$ $$S_1=S_2$$ I want to solve for a positive $x$ and positive $y$. There is a method as explained at the very end in this source, here's the quote:

Each of these equations represents a conic section, and they intersect at four points. We wish to find the point of intersection that lies in the all-positive quadrant - i.e. with x and y both positive. Form the equation $c_2S_1−c_1S_2=0$. This is also a quadratic equation representing a conic section passing through the four points. Furthermore, it has no constant term, and it, therefore, represents the two straight lines that pass through the four points. The equation can be factorized into two linear terms, αβ−0, where α=0 and β=0 are the two straight lines. Choose the one with positive slope and solve it with $S_1=0$ or with $S_2=0$ (or with both, as a check against arithmetic mistakes) to find x and y.

The source has given values for $a_1=11.73$, $h_1=17.06$, $b_1=14.93$ and $c_1=-20$ in its example $2.9.1$ which eventually shows that $x=0.2529$ and $y=1.000$

However, I don't really understand the method explained such as the factorization in two linear terms. How is this solved?

ShBh
  • 6,054
Phy
  • 153
  • Did you actually calculate $c2S_1 - c1S_2$? What form did it have? – Paul Sinclair Aug 03 '20 at 01:02
  • @PaulSinclair Yes, I deduced from this that: $$x^2(c_2a_1-c_1a_2)+2xy(c_2h_1-c_1h_2)+y^2(c_2b_1-c_1b_2)=0$$ But I'm not sure how to proceed further. – Phy Aug 07 '20 at 21:48
  • @PaulSinclair I have solved for $x$ in terms of $y$ using the abc-formula which shows that $$y=\frac{1}{2(c_2h_1-c_1h_2)}$$ Is this correct? – Phy Aug 08 '20 at 00:23
  • The equation is a relation between $x$ and $y$, and it should be obvious that for many $y$, there is an $x$ that will make the equation true. So how did you solve for a single value of $y$ that does not depend on $x$? – Paul Sinclair Aug 08 '20 at 14:39

1 Answers1

2

So you've gotten it to the form $$Ax^2 +Bxy + Cy^2 = 0$$ (the exact forms of $A, B, C$ will only get in the way right now).

The text tells you to write the left hand side as a product of linear factors:

$$Ax^2 +Bxy + Cy^2 = (ax + by)(cx + dy)$$ Except note that if you divide the first factor by a constant and multiply the second factor by the same constant, you get another factorization for the same expression. To get rid of that amiguity, assume $c = 1$:

$$Ax^2 +Bxy + Cy^2 = (ax + by)(x + dy)\\ Ax^2 +Bxy + Cy^2 = ax^2 +(ad + b)xy + bdy^2$$ Since this should hold for all $x, y$, we have $$a = A\\ad+b = B\\bd=C$$ which solves to $$\frac {AC}b + b = B\\b^2 - Bb + AC = 0\\b = \frac{B \pm \sqrt{B^2 - 4AC}}2$$

For each value of $b$ you can factor $$Ax^2 +Bxy + Cy^2 = (Ax + by)(x + \frac Cby)=0$$ which gives either $Ax + by = 0$ or $bx + Cy = 0$. This gives four lines in total: $$y = -\frac {2A}{B+\sqrt{B^2 - 4AC}}x\\y = -\frac {2A}{B-\sqrt{B^2 - 4AC}}x\\y = -\frac{B + \sqrt{B^2 - 4AC}}{2C}x\\y = -\frac{B - \sqrt{B^2 - 4AC}}{2C}x$$

These are the four lines the site talks about. Since you want both $x$ and $y$ positive, you can throw away any for which the slope is negative (this will depend on the values of $b_1, b_2, c_1, c_2, h_1, h_2$). Though I've not checked it myself, the site is claiming that there is always one with a positive slope, call it $y = mx$. Plug that back into either $S_1$ or $S_2$ (if you did the arithmetic right, either equation will give the same solution). The result will be a quadratic equation in $x$ only, which you can solve.

Once you know $x$, you also know $y = mx$, which gives the final solution.


Edit: Added demonstration on how to calculate that the four lines actually do satisfy the equation:

Let $$\omega = 1 \pm \sqrt{1 - \dfrac{4AC}{B^2}}$$

which gives $$\dfrac{4AC}{B^2} = 1 - (\omega - 1)^2 = 2\omega - \omega^2$$

The lines have the form $$y = -\frac {2A}{B\omega}x,\quad y = -\frac {B\omega}{2C}x$$

If you substitute the first expression for $y$ in $Ax^2 + Bxy + Cy^2$, you get $$\begin{align}Ax^2 + Bxy + Cy^2 &= Ax^2 - \frac {2A}\omega x^2 + \frac {4A^2C}{B^2\omega^2}x^2\\ &= \dfrac{Ax^2}{\omega^2}\left[\omega^2 - 2\omega + \dfrac{4AC}{B^2}\right]\\ &= \dfrac{Ax^2}{\omega^2}\left[\omega^2 - 2\omega + (2\omega - \omega^2)\right]\\ &= 0\end{align}$$

Had I used $y = \frac {2A}{B\omega}x$ as you claim in the comments, I would have gotten $\left[\omega^2 + 2\omega + (2\omega - \omega^2)\right] = 4\omega$ instead.

A similar calculation works for $y = -\frac {B\omega}{2C}x$ as well.

Paul Sinclair
  • 43,643
  • Thanks, but why is it permitted to assume $c=1$? – Phy Aug 13 '20 at 10:26
  • I inadvertently dropped the 2nd half of the sentence explaining this. As long as $c \ne 0$, you can multiply $a, b$ by $c$ and divide $c, d$ by $c$, and you get another factorization for the same expression. So we might as well just assume $c=1$ in the first place. (If $c = 0$, then use $d$ instead and exchange the roles of $x$ and $y$ in the remainder. If both $c$ and $d$ are $0$, then so would be $A, B, C$, which would mean that $c_2S_1 = c_1S_2$ so you wouldn't have two intersecting conic sections after all.) – Paul Sinclair Aug 13 '20 at 16:16
  • When not throwing out $c$, I can not seem to find the point where it actually cancels itself out as you said. I got to the point where $$y= -\frac {2A}{B+\sqrt{B^2c^2 - 4AC}}x$$ Notice the $c^2$ in the denominator. I can't seem to throw it away. – Phy Aug 25 '20 at 23:35
  • You goofed up somewhere, because $c$ is not going to occur just there. For general non-zero $c$, note that $(ac x + bc y)(x + \frac dc y) = (ax + by)(cx + dy)$, so if you replace $a, b, d$ in my post with $ac, bc, \frac dc$ everywhere, you get the same result. – Paul Sinclair Aug 26 '20 at 00:16
  • So if I do not assume $c=1$ at the start and write out $(ax+by)(cx+dy)=acx^2+xy(bc+ad)+y^2d=0$ and define $A,B$ and $C$ accordingly, the $c$ will eventually cancel itself out and vanish down the road? – Phy Aug 26 '20 at 00:37
  • Yes. The lines $ax + by = 0$ and $acx + bcy = 0$ are the same, as are the lines $cx + dy = 0$ and $x + \frac dc y = 0$. They do not suddenly have different intersections because you multiplied the equation through by a constant. – Paul Sinclair Aug 26 '20 at 04:01
  • Thanks, I got it. There's one peculiar issue though; plugging your four derived relations between $y$ and $x$ in $Ax^2+Bxy+Cy^2$ does not yield $0$ because of the minus signs in front your derivations. I noticed that I can also just solve $Ax^2+Bxy+Cy^2$ in terms of $y$ and $x$ each using the abc-formula and it will give the exact same derivations like yours but without the minus signs in front of them, which indeed yields $0$ when plugging them in the equation. – Phy Aug 26 '20 at 17:40
  • Without the negative, the $2Bxy$ term has the same sign as the other two. How do you expect to get $0$ that way? I've included the calculation for the first two lines in the post (it works equally well for both). The calculation for the other two lines is similar. – Paul Sinclair Aug 26 '20 at 23:32
  • I've found the root confusion of all this. Somehow I deduced according to the abc-formula that $$b = \frac{-B \pm \sqrt{B^2 - 4AC}}2$$ Instead of $$b = \frac{B \pm \sqrt{B^2 - 4AC}}2$$ because I skipped that the B-term is already negative in $$b^2 - Bb + AC = 0$$ Aside from this, I noticed that just solving $Ax^2+Bxy+Cy^2=0$ with the abc-formula would also give me the answer.Thank you very much for your time and help – Phy Aug 27 '20 at 11:49
  • I knew you'd made a sign error somewhere, but couldn't say where. Glad you found it. – Paul Sinclair Aug 27 '20 at 13:21