Question: Given two point $A(0,10)$ and $B(30,20)$, find the point $P$ on x axis for which sum of distances from given points to the required point is minimum
Now i could form a lengthy equation and use differentiation but instead I decided to do something else and would like to verify if what i did is correct
Consider a triangle formed by above given points and $(x,0)$. Let the distance between $A$ and $B$ be $c$, distance between $P$ and $A$ be $a$ and distance between $P$ and $B$ be $b$.
By the cosine law $c^2=a^2+b^2-2ab\cos(\angle BPA)$. Now since c is constant, $a^2+b^2$ will be minimum when $2ab\cos(\angle BPA)=0$ and thus when $\angle BPA=\pi/2$
Now, since $PA$ and $PB$ intersect at $90\deg$, the product of thier slope = $-1$
$\implies {-10 \over x}{20 \over 30-x}=-1$
$\implies x=20$ or $10$
Is my reasoning correct? And why does it give two different answers? (Minima is at $10$)
According to my reasoning both answers should be minimal values
EDIT: I got why 20 doesnt give right answer. Its because I'm Minimizing $a^2+b^2$ while i need to minimize a + b. Does this invalidate the other part to? that is will it work on all triangles or not?
