## Integral Area

#### Problem

A rectangle measuring `x` by `y` has a unit square placed in the bottom right corner. The diagonal, `d`, joining the bottom left to the top right of the rectangle passes through the vertex of the square.

If the area of the rectangle is integer, what can you deduce about `d`?

#### Solution

By the Pythagorean Theorem, `x`^{2} + `y`^{2} = `d`^{2}.

By similar triangles,

(`x`1)/1 = 1/(`y`1)

(`x`1)(`y`1) = 1

`xy``x``y`+1 = 1

`xy` = `x` + `y`

Squaring both sides, (`xy`)^{2} = `x`^{2} + `y`^{2} + 2(`xy`) = `d`^{2} + 2(`xy`)

(`xy`)^{2} 2(`xy`) = `d`^{2}

(`xy`)^{2} 2(`xy`) + 1 = `d`^{2} + 1

(`xy`1)^{2} = `d`^{2} + 1

`xy`1 = (`d`^{2} + 1)

`xy` = 1 (`d`^{2} + 1)

But as the area, `xy` 0, we only need take the positive root.

`xy` = 1 + (`d`^{2} + 1)

So for `xy` to be integer, `d`^{2}+1 must be square. Let `d`^{2} + 1 = `k`^{2}, where `k` 1, hence `d` = (`k`^{2}1).

Given that `d` = 15, find the dimensions of the rectangle.

What if `d` = 8?

For which values of `d` are both the area and the dimensions integer?