Optimization problem: Find the point on the line $−x + 2y − 1 = 0$ that is closest to the point $(1, 2)$.

442 Views Asked by At

Find the point on the line $−x + 2y − 1 = 0$ that is closest to the point $(1, 2)$.

I solved the optimization and got $x=14/10$ and $y = 1.7$ but my $y$ coordinate is not correct. can anyone explain why it's wrong. I used $x$ coordinate and solved for $y$ using $y=(x+1)/2$.

2

There are 2 best solutions below

0
On

A point on that line is given by $\left(x,y\right)=\left(x,\frac{x+1}{2}\right)$. Using the equation for the distance between two points, the distance between a point on this line and $\left(1,2\right)$ is given by $\sqrt{\left(x-1\right)^{2}+\left(\frac{x+1}{2}-2\right)^{2}}$. You already know this is an optimization problem, so you just need to solve the equation $$\frac{\text{d}}{\text{d}x}\sqrt{\left(x-1\right)^{2}+\left(\frac{x+1}{2}-2\right)^{2}}=0.$$

0
On

Any point on the line $(2k-1,k)$

Now the point will be on the perpendicular line as well

So, the product of the gradients

$$\dfrac12\cdot\dfrac{k-2}{2k-1-1}=-1$$

Alternatively, if $d$ is the distance,

$d^2=(2k-1-1)^2+(k-2)^2=5k^2-12k+20=5(k-6/5)^2+20-5(6/5)^2$

The equality occurs if $k-6/5=0$