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)$

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)$.


Let the coordinates of the point $P$ be $(x_1,y_1).$
$P$ lies on the line $2x-y+5=0$,so $2x_1-y_1+5=0$

$|\sqrt{(x_1-4)^2+(y_1+2)^2}-\sqrt{(x_1-2)^2+(y_1+4)^2}|$ is maximum.

But i dont know,how to solve it further and find $(x_1,y_1).$Please help me.Thanks.

Solutions Collecting From Web of "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$$