1. ## inequalities with geometry

So I got this question I couldn't solve. Can anyone help me solve it? Thank you!

Rectangle ABCD is 10 cm long and 5 cm wide. Point P is located x centimetres from A on side AB. Point Q is located y centimetres from A on side AD. For what values of y is it possible to locate a point R on side BC such that $angle QPR=90^o$

2. Let's imagine the rectangle is in a coordinate system with origin at P. Also, let BR=z. Then, PQ can be expressed as a vector, PQ=(-x,y). Likewise, PR=(10-x,z). Now since QPR is a right angle the dot product of PQ and PR must be zero, so this gives us the following equation:

$(-x,y) \bullet (10-x,z)=0$

$-10x+x^2+yz=0$

$z=\frac{x(10-x)}{y}$ (1)

Notice from this that the maximum value that x(10-x) can take is 25 (indeed, complete the square to find that $x(10-x)=-(x-5)^2+25$). Now, the largest possible value for y is 5 (the point Q can't surpass the side of the rectangle). If y=5, the largest possible value for z is then also 5 (since $z_{max}=\frac{(x(10-x))_{max}}{5}=\frac{25}{5}=5$), meaning that it's possible to find our point R on the side of the rectangle. Thus y=5, regardless of x, is an acceptable value. So now we have our upper limit for y. Now to find the lower limit.

It's clear that if we decrease y, z increases. We can continue to decrease y all the way until z=5, after that, R surpasses the side of the rectangle, which we don't want. So the lower limit for y must occur when z=5. Going back to the equation I labeled (1), we get that $y=\frac{x(10-x)}{5}$ when z=5.

So the values for y for which we can find a point R such that QPR=90 are:

$\frac{x(10-x)}{5} \le y \le 5$