Question 1087653
<pre>
The tutor above thought you just wanted an alternate expression for a<sup>2</sup>+b<sup>2</sup>.
But you wanted a numerical solution.
</pre>
If {{{ a + b = a/b + b/a }}} where a and b are positive integers, 
find the value of {{{ a^2 + b^2 }}}.
<pre>
By inspection we see that a=1 and b=1, and {{{a^2+b^2=1^2+1^2=1+1=2}}}.
is a solution.  But is that the ONLY possible solution?

We might guess that that is the only solution, but guessing
doesn't count!  :)

So let's see if we can prove that it is the only solution.

{{{ a + b = a/b + b/a }}}

Clear of fractions and set up the quadratic in b

{{{ a^2b + ab^2 = a^2 + b^2 }}}

{{{ab^2-b^2+a^2b-a^2=0}}}

{{{(a-1)b^2+(a^2)b-a^2=0}}}

The discriminant must be a perfect square for b to
even be rational:

{{{discriminant=(a^2)^2-4(a-1)(-a^2)=a^4+4a^3-4a^2=a^2(a^2+4a-4)}}}

So {{{a^2+4a-4}}} must be a perfect square, say p<sup>2</sup>

{{{a^2+4a-4=p^2}}}

{{{a^2+4a-4-p^2=0}}}

The discriminant must also be a perfect square for 'a' to
even be rational:

{{{discriminant=4^2-4(1)(-4-p^2)=16+16+4p^2=32+4p^2=4(8+p^2)}}}

So {{{8+p^2}}} must be a perfect square, say q<sup>2</sup>

{{{8+p^2=q^2}}}

{{{q^2-p^2=8}}}

{{{(q-p)(q+p)=8}}}

The only possibilities are

q-p=1, q+p=8, but that gives a fraction solution.
q-p=2, q+p=4 which gives the only solution in integers,
q=3, p=1 

So

{{{a^2+4a-4-p^2=0}}}

becomes

{{{a^2+4a-4-1^2=0}}}

{{{a^2+4a-5=0}}}

{{{(a+5)(a-1)=0}}}

So we have proved that 'a' can only be 1.

{{{ a + b = a/b + b/a }}}

{{{ 1 + b = 1/b + b/1 }}}

{{{b+b^2=1+b}}}

{{{b^2=1}}}

And now b can only be 1 also.

Therefore the only solution for a and b in positive integers is 
a = b = 1, and 

a<sup>2</sup>+b<sup>2</sup> = 1<sup>2</sup>+1<sup>2</sup> = 1+1 = 2.

Edwin</pre>