What is the coordinate of a point $P$ on the line $2x-y+5=0$ such that $|PA-PB|$ is maximum where $A=(4,-2)$ and $B=(2,-4)$

enter image description here

Now $PA=\sqrt{(x-2)^2+(y+4)^2}$ and $PB=\sqrt{(x-4)^2+(y+2)^2}$ Now using Cosine formula

We get $$\displaystyle \cos \theta = \frac{(PA)^2+(PB)^2-(AB)^2}{2\cdot (PA)\cdot (PB)}$$

Now we know that $$\displaystyle |\cos \theta | \leq 1\Rightarrow \left|\frac{(PA)^2+(PB)^2-(AB)^2}{2\cdot (PA)\cdot (PB)}\right|\leq 1$$

So we get $$|(PA)^2+(PB)^2-(AB)^2|=2|PA||PB|\Rightarrow \left |PA-PB\right|^2\leq |AB|^2$$

So we get $|PA-PB|\leq |AB|$ and equality hold when $\theta = \pi$

Means $A,P,B$ are Collinear.

So equation of line $PAB$ is $$\displaystyle y+4 = \frac{-2+4}{4-2}(x-2)\Rightarrow x-y=6$$

Now solving $2x-y=-5$ and $x-y=6\;,$ we get $(x,y) = (-11,-17)$


Actually every point P on the given line y = 2x + 5 satisfies the question because PA-PB = AB constantly which can be obvious with vectors in all drawing.

Let us see using the vectors $\vec i,\vec j$ in the plan. $$\overrightarrow {PA}=(x-2) \vec i +(y+4)\vec j$$ $$\overrightarrow {PB}=(x-4) \vec i +(y++2)\vec j$$ Therefore $$\overrightarrow {PA}-\overrightarrow {PB}=2\vec i + 2\vec j$$


All other answers are unnecessarily complicated. Consider a straight line through A and B, intersecting the given line at P. obviously in this case PA-PB= AB, and this is indeed the max value possible. To calculate the coordinates simply find the intersection of both the lines. To see why a straight line gives the maximum value, consider a point P' other than P. By triangle inequality, P'A