[Math] Express the distance from a point $(x,y)$ on the graph of $x+y=1$ to the point $(2,3)$ as a function of $x$

algebra-precalculus

I am having problems understanding how to extract this information into a formula.

express the distance from a point $(x,y)$ on the graph of $x+y=1$ to the point $(2,3)$ as a function of $x$

(note, i do have have the answer to the question, my question is on how to extract the information)

Any help would be much appreciated, Cheers!

Best Answer

Applying the distance formula to the points $(x,y)$ and $(2,3)$, we obtain: $$ d(x) = \sqrt{(x - 2)^2 + (y - 3)^2} $$ But since $(x,y)$ lies on the graph of $x + y = 1$, we know that $y = 1 - x$. Substituting, we get that: \begin{align*} d(x) &= \sqrt{(x - 2)^2 + ((1 - x) - 3)^2} \\ &= \sqrt{(x - 2)^2 + (-x - 2)^2} \\ &= \sqrt{(x^2 - 4x + 4) + (x^2 + 4x + 4)} \\ &= \sqrt{2x^2 + 8} \\ \end{align*}

Related Question