April 17 In-Class Example

Math 104 Calculus II, April 17, 2019
T. Ratliff, Wheaton College
ratliff_thomas@wheatoncollege.edu

Straight-line Distance Calculator

Hyperlink["https://www.mapdevelopers.com/distance_from_to.php"]

Let’s use km as units

If place Moline at (0,0) and Carboro at (1171,0), find coordinates for Norton

NSolve[ { x^2 +y^2 == 1602^2, (x-1171)^2 + y^2 == 959^2}]

We want the positive y-value, so Norton is at (1289, 952)

Define the function to minimize
d = 4*distance(dc, Moline) + 3*distance(dc, Carboro) + 2*distance(dc, Norton)

d=4*Sqrt[ x^2+y^2] + 3*Sqrt[ (x-1171)^2 + y^2] + 2 *Sqrt[ (x-1289)^2 + (y-952)^2]

NSolve[{ D[d,x]==0, D[d,y]==0}, Reals]

ContourPlot[d, {x,0,1300},{y,0,1000},Contours->50, ColorFunction->"Rainbow"]

Looks like we want to put our distribution center at (759, 139)

What town is closest to this point?
Let’s calculate the distance from the distribution center to Moline and Carboro, and then use the straight line calculator to guess

Distance from dc to Moline

N[Sqrt[759^2 + 139^2]]

Distance from dc to Carboro

N[Sqrt[ (759-1171)^2 + 139^2]]

So let’s look for a city that is about 772 km from Moline and 435 km from Carboro

West Virginia look like a good place to start

How about Charleston?