Vectors - For which value of t is the moving point A on $\vec{g}$ the closest to point B?

I'm having trouble finding a way to solve this particular problem:

The point $A$ moves on $\vec{g}$ from point $J$ to $G$ and is dependent on the real parameter $t$:

$\vec{g} = (-1/0/0) + t*(1/1/1)$

For which value of $t$ is point $A$ the closest to point $B (9/1/1)$?

The length of $\vec{BJ}$ is 4 units and the length of $\vec{BG}$ is 7 units. The angle between $\vec{BJ}$ and $\vec{BG}$ is 60°.

I know the length of $\vec{JG}$ is $\sqrt{37}$

But how do I find the value for $t$ for which point $A$ is the closest to point $B$?

Edit:

There seems to be some confusion concerning the provided values, so I'm giving the full scope of the problem presented in my textbook. The text describes $g$ as a straight line, on which are the points $J$ and $G$, which are fixed points, and point $A$, which moves between these two points.

The location of $A$ is described as: $\vec{g} = (-1, 0, 0) + t*(1, 1, 1)$, which is why I thought this was primarily about vectors.

Then there's point $B$, which is at $(9, 1, 1)$. The distance from $B$ to $J$ is defined as 4 units and the distance from $B$ to $G$ is 7 units. The angle enclosed by $BJ$ and $BG$ is $60$°.

In the first partial problem I was asked to find the length between $JG$, which is $\sqrt{37}$.

Then in the second partial problem, which is the topic of the question posted here, I'm asked for which value of $t$ on the straight line $g$ is point $A$ the closest to point $B$.

That's all the info available to me.

• I think you have not quite specified the question accurately - do you have $0 \leq t \leq 1$? And is your equation for $\vec{g}$ really an equation for the variable point A, and is $J = (-1,0,0)$ and $G = (1,1,1)$? You can discover whether AB is perpendicular to JG by taking the dot product of the two vectors. If you can't find a perpendicular then the extreme value will be at one end of the line JG. – Mark Bennet May 27 '12 at 20:29

At time $t$, our location is $(-1+t, t,t)$. So the square of our distance from $(9,1,1)$ is $$((-1+t)-9)^2+(t-1)^2+(t-1)^2. \tag{1}$$

This simplifies to $3t^2 -24t + 102$. We want to minimize the distance. The distance is the square root of the expression $(1)$. But we continue to work with $(1)$.

If you are allowed to use calculus, find the derivative of the function in $(1)$, and set it equal to $0$, and solve for $t$. We get $t=4$.

It can also be done without calculus. Note that $$3t^2-24t+102=3(t^2-8t+34)=3[(t-4)^2 +18].$$ (We completed the square.) Since a square is always $\ge 0$, the minimum value of the square of the distance is reached at $t=4$. So that's when the minimum distance to the line is reached.

Note that the minimum square of the distance to the line is $54$, so the minimum distance is $\sqrt{54}$. It follows in particular that some of the information given in the post must be wrong. For example, the distance calculation is inconsistent with $BJ=4$.

If $J$ and $G$ get correctly specified, we need to do one more thing. Compute the values of $t$ that correspond to $J$ and to $G$. If $t=4$ lies between these values, then our minimum distance is $\sqrt{54}$. If $t=4$ does not lie between these values, then the minimum distance in our travels is $BJ$ or $BG$, whichever is smaller. This would be an instance of an endpoint minimum.

Remark: If you really want to work with distance instead of square of distance, note that the distance at time $t$ is equal to $$\sqrt{3t^2 -24t + 102}.$$ This can be rewritten as $$\sqrt{ 3[(t-4)^2 +18] }.$$ The expression inside the square root is smallest at $t=4$, when the distance is $\sqrt{54}$.

• Wait a moment, why are you using a square of $AB$? – Miroslav Cetojevic May 27 '12 at 20:36
• Because minimizing the distance $AB$ is the same problem as minimizing the square of the distance. But if you like, you can use distance, so look at $\sqrt{3t^2-24t+102}$, do the algebra that I did, but under the square root sign, and reach the same conclusion. – André Nicolas May 27 '12 at 20:40
• I don't actually understand the rationale behind using the square. Inspired by your answer, however, I tried the approach to calculate $t$ with the equation $\vec{AB} = \vec{OA} - \vec{OB} = (t-1, t, t)-(9, 1, 1) = 0$, which results in $3t - 12 = 0$, which is solved to $t = 4$. Is this valid? – Miroslav Cetojevic May 27 '12 at 21:04
• I think the fact that we got the same $t$ is accidental. – André Nicolas May 27 '12 at 21:08
• But either approach seems to work for any valid number. If $Bx$ is $12$, I get $t=5$ in both cases. – Miroslav Cetojevic May 27 '12 at 21:32