SHORTEST DISTANCE FROM A LINE 1. introduction We will SHORTEST DISTANCE FROM A LINE
TU T. PHAM
MISSION HIGH SCHOOL
MR. HSU CALCULUS CLASS
1. introduction
We will introduce the problem of how to find the shortest distance from a curve to a point. Given a
curve on the Cartesian coordinate and a point, we want to find what is the distance from the point
to the curve. We will first introduce how to calculate the distance between two points. Then we
will formulate a function that calculate the distance from the point to any given point on the curve.
Graphing this function and after careful observation, the teacher and the students will conclude
together that the shortest distance between the point and the curve is a global minimum of such
a function. Then by taking the derivative, we conclude at what x-value along the curve has the
shortest distance to our fixed point. Then using this x-value and plugging it back into our distance
2. Distance of Two Points
Given two points in the Cartesian coordinate, (a, b) and (c, d), we can find the distance between
the two points using the Pythagorean theorem. If a = c then the distance between the two points
is just |b − d|. If b = d then the distance is |a − c|. We can then assume a 6= c and b 6= d. Hence
the distance between the two points is neither horizontal nor vertical. It is diagonal and hence we
can form a right triangle. Then by using the Pythagorean theorem we calculate the distance. We
denote D as the distance between the two points which correspond to the hypotenuse of the right
triangle and the sides are |d − b| and |c − a|. Solving for D we get
D2 = (c − a)2 + (d − b)2
p
D = (c − a)2 + (d − b)2
Date: Dec 8th, 2010.
1
2
TU T. PHAM MISSION HIGH SCHOOL MR. HSU CALCULUS CLASS
We will denote this formula as the distance formula.
p
D = (c − a)2 + (d − b)2
Example 1. Let the two points be (2, 2) and (5, 6) Hence by forming a right triangle we get that
the sides are 3 and 4. Solving for the hypotenuse we get
p
√
√
D = 32 + 42 = 9 + 16 = 25 = 5
Therefore the distance between the two points is 5.
Next we ask the students would this distance formula also work when the two points are horizontal
or vertical from each other? How about when the two points are equal? We then conclude that this
distance formula does indeed hold for any two points.
3. The Distance Problem
We now introduce a curve and a point and ask what is the distance from the line to the point. For
our example we will use a line as our curve. The problem that we will give the students will be a
parabola but the ideas are still the same. Given a line y = ax + b, what is the distance from the
point on the line to the origin? A point on the line has the form (x, ax + b) and our other point
is (0, 0). Given two points, (x, ax + b) and (0, 0), we can find the distance by using the distance
formula. Hence we have
p
D = x2 + (ax + b)2
Example 2. Given the line y = −2x + 10 we want to find the distance between any point on the
line to the origin. Any point on the line has the form (x, −2x + 10). Hence the distance formula is
p
D = x2 + (−2x + 10)2
p
p
D = x2 + 4x2 − 40x + 100 = 5x2 − 40x + 100
At x = 0 we have the point (0, 10) on the line and it is easy to see that this point is 10 units away
from the origin. Using our distance formula
√
√
D = 5 ∗ 0 − 40 ∗ 0 + 100 = 100 = 10
Hence the formula holds.√ Testing another point when
√ x = 5 we get (5,√0). Plugging in x = 5 into
the formula we get D = 5 ∗ 52 − 40 ∗ 5 + 100 = 125 − 200 + 100 = 25 = 5 which is indeed the
distance from (5, 0) to the origin.
SHORTEST DISTANCE FROM A LINE
3
4. Graphing the Distance Function
p
Next we ask the students to graph this distance function D = x2 + (ax + b)2 . Each group will
be assign a different line function hence their distance function will be different as well. They
will use a graphing calculator to graph the distance function and analyze what each point mean.
From the function we notice that D ≥ 0, this makes sense because there is no such thing as a
negative distance between two objects. Hence because of this property, we are guarantee to have
a minimum. The question that the student will need to answer is what happens when x 7→ ∞ and
x 7→ −∞.
Example 3. Using the line function in the previous example our distance function is
p
p
D = x2 + (−2x + 10)2 = 5x2 − 40x + 100
5. Solving the Problem
Here we ask the students to find the point on the line that is the closest to the origin. After some
group discussion the students should be able to realize that they need to find the minimum of the
distance function. Then by using the derivative they should be able to calculate what is the x value
of the minimum. By plugging this x value back into the distance function they will be able to find
the shortest distance from a point to the line.
√
Example 4. Given D = 5x2 − 40x + 100 we can find the minimum by taking the derivative.
−1
1
D0 = (5x2 − 40x + 100) 2 (10x − 40)
2
10x − 40
D0 = √
2 5x2 − 40x + 100
To find the extremal points we set D0 = 0 and solve for x. Hence we have
10x − 40
0= √
2 5x2 − 40x + 100
4
TU T. PHAM MISSION HIGH SCHOOL MR. HSU CALCULUS CLASS
We observe that in order for the derivative to be 0 the numerator must be 0, hence 10x − 40 = 0,
which means x = 4. The point that is the closest to the origin is when x = 4. We plug this x value
back into the line function to get the point.
y = −2 ∗ 4 + 10 = 2
Hence the shortest point to the origin is (4,
√ 2). Using√the distance formula we get the shortest
distance to the origin from the line is D = 22 + 42 = 20.
6. The Problem
John claimed that Tony was trespassing into his property. From satellite we were able to pick up
Tony’s path as he wanders around John’s neighborhood. John’s house is located at (0,0) and Tony’s
path is represented by the curve. If John’s property span 50 feet radius at point (0,0), did Tony
1 2
trespassed into John’s property? Tony’s path is represented by the curve f (x) = 10
x − 12x + 360
If a group finish early we extend the problem to another fixed point that is not the origin.(see
worksheet)
7. Conclusion
This activity let the student see how Calculus is related to geometry. It introduces the students to
the notion of distance in the Cartesian space and how to calculate the distance between two points.
This activity also let the students think about how this can be applied to the real world. At the
end of the activity we ask the student to come up with a scenario where this can be apply. The
following will be samples of worksheets we will pass out to the students. Since the curve we use in
the worksheet is not a line, finding the minimal point requires a graphing calculator.
This lesson was implemented in Mr. Hsu’s Calculus class at Mission High School. The students
did very well in figuring everything out. Mr. Hsu and I observed that many of the students start
sketching the graph and try drawing a circle of radius 50. This lead to a class discussion of why it
wouldn’t work in this case. To solve it graphically requires precision in the graph. Another reason
1 2
x − 12x + 360 is picked carefully so that you cannot solve it just
is because the curve f (x) = 10
by sketching the graph. There is a small part of the curve where the distance is slightly less than
50. Hence when the students try to draw the student with the curve, it can be very ambiguous
as to if Tony trespass or not. The closest Tony ever got to the house was 49 feet. Hence he did
trespass.
SHORTEST DISTANCE FROM A LINE
5
Trespassing
Name:
(1) Tony’s path is represented by the function f (x) =
and identify where John’s house is located.
1 2
10 x
− 12x + 360. Sketch Tony’s path
(2) For each value x, find f (x) and calculate the distance from Tony to John’s House. Denote
D(x) as the distance from Tony to John’s house when Tony was at x.
x
-10
f(x)
0
20
30
40
50
60
x
1 2
10 x
− 12x + 360
D(x)
6
TU T. PHAM MISSION HIGH SCHOOL MR. HSU CALCULUS CLASS
(3) Sketch the graph of the distance function D(x). Did Tony trespass into John’s property?
What was the closest Tony ever got to John’s house?(hint: scale the units so that you can
see the whole graph)
(4) On the same axes, graph D0 (x) and show the connection between the minimum on D(x)
and the zero on D0 (x).
SHORTEST DISTANCE FROM A LINE
7
Trespassing: Part II
Name:
(1) James who lives at (60, 200) also claimed that Tony was trespassing into his property.
James’ property has a radius of 40 feet from his house. Did Tony trespass into James’
property?
(2) For each value x, find f (x) and the distance from the point (x, f (x)) to (60, 200). Denote
D(x) as the distance from the point (x, f (x)) to the origin.
x
0
f(x)
10
20
30
40
50
60
x
1 2
10 x
− 12x + 360
D(x)