Peter Conlon
Posted on Thursday, 08 May, 2003 - 08:39 pm:

Does anyone know how I would go about solving

b2 + ab - p = 0
a2 + ab + aq - rq = 0

Where a,b are to be found and p,q,r are constants > 0?

It gets really messy as soon as I try any sort of substitution. Is there a better way, or should I accept the messy stuff as necessary. Can problems like this in general be solved?

Thanks
Peter
Katie Wesley
Posted on Sunday, 25 May, 2003 - 03:28 pm:

If you equate for ab, then
p-b2 =rq-aq-a2
a2 +aq-b2 =rq-p
(a+q/2)2 - b2 = q2 /4 + rq - p (a constant)
which is the equation of a hyperbola. You don't specify if you are looking for just integer solutions or all of them but if you want all possible real solutions then they are all the points (a,b) that lie on that hyperbola. There are an infinite number of solutions.
Kerwin Hui
Posted on Sunday, 25 May, 2003 - 04:54 pm:

That is incorrect. We have a general theorem (usually named Bezout's Theorem):-

If f,g are polynomials in two variables (X, Y) over an algebraically closed field k, then the intersection of f=0 and g=0 cannot have more than deg(f)deg(g) points, unless f and g have a nontrivial common factor.

The proof of this theorem can be found in any algebraic geometry textbook (e.g. Elementary Algebraic Geometry by Kendig), and is usually done in 3rd or 4th year of university.

Anyway, back to the question. (Assuming you are working in C,)using b2+ ab - p = 0, we get
b =
-a ±   ______
Öa2 + 4p
 

2
.

Substituting, we get
-a2 - 2aq + 2rq = ±a   _____
Öa2+ 4p
 
.
So we have a cubic equation for a, namely
qa3 + (q2 - rq- p)a2 - 2rq2a + r2 q2 = 0
and so you get three values of a. Each determines a unique value of bfrom a2+ ab+ aq + rq=0 (r,q> 0 so a cannot be zero). You then have to test that these pairs (a,b) are actually solutions of the original problem. The actual calculation is indeed horrible to write out, and I shall not attempt to give it here.

Kerwin


Katie Wesley
Posted on Sunday, 25 May, 2003 - 05:19 pm:

What was it that was wrong in my answer?
Kerwin Hui
Posted on Sunday, 25 May, 2003 - 06:04 pm:


Quote:

... if you want all possible real solutions then they are all the points (a,b) that lie on that hyperbola .There are an infinite number of solutions.



Not all points lying on the hyperbola are solutions. There can be at most three solutions (a,b).

Kerwin
Katie Wesley
Posted on Sunday, 25 May, 2003 - 07:27 pm:

Oh I know what I did wrong now - I created one equation involving a and b by equating for ab, but in doing so I lost the condition that ab=p-b2 . So the solutions are where the graphs of the hyperbola and the line a=(p-b2 )/b cross. Is that right?
Matthew Smith
Posted on Tuesday, 27 May, 2003 - 11:37 pm:

Yes. Though the line a=(p-b2 )/b is another hyperbola, I think (albeit one rotated with respect to the axes). It might be interesting to plot both original equations, and your hyperbola, using a computer (and some particular values of p, q and r). They should all meet at the three solution points.