# Math Help - Optimization

1. ## Optimization

A house lies on a plain at point (3,4). There is a highway along the graph f(x) = x^3. I want to make the shortest path between the house and the highway. I need to find the point where the lane should meet the highway.

2. Attachment 17056
Originally Posted by steezin
A house lies on a plain at point (3,4). There is a highway along the graph f(x) = x^3. I want to make the shortest path between the house and the highway. I need to find the point where the lane should meet the highway.
If you draw the graph, you have a cubic function $y=x^3$

and a circle centred at (3,4) which touches the graph at a single point.
The radius of this circle is the minimum distance.

The point (x,y) where the circle meets the curve must satisfy $(x-3)^2+(y-4)^2=d^2\ and\ y=x^3$

Hence $(x-3)^2+(x^3-4)^2=d^2$

This is the distance of all points (x,y) on the curve from (3,4)

hence differentiating $(x-3)^2+(x^3-4)^2$ and setting the result to zero will find the x corresponding to minimum distance.

3. Here's another way to do it: the shortest line from a point to a curve must be perpendicular to the tangent line to the curve at the point where they cross.

The derivative of $x^3$ is $3x^2$ so we must have a slope of $\frac{1}{3x_0^2}$ for the perpendicular line that crosses the curve at $(x_0, x_0^3)$. Since the line passes through (3, 4), it must be of the form $y= \frac{1}{3x_0^2}(x- 3)+ 4$. That line must also pass through $(x_0, x_0^3)$ so we must have $x_0^3= \frac{1}{3x_0^2}(x_0- 3)+ 4$

Yet another way- minimize the square of the distance $(x- 3)^2+ (y- 4)^2$ subject to the constraint $y- x^3= 0$ using Lagrange Multipliers.

4. We just need to change the polarity of the normal slope as it is negative-going.

$y-4=m(x-3)$

$x^3-4=-\frac{1}{3x^2}(x-3)$

$x^3=-\frac{1}{3x^2}(x-3)+4$

$3x^5=-(x-3)+12x^2$

$3x^5-12x^2+x-3=0$

If we differentiate the square of the distance (no need to take the square root)

$d^2=(x-3)^2+(x^3-4)^2$

$\frac{d}{dx}d^2=2(x-3)+2(x^3-4)3x^2=2x-6+6x^5-24x^2$

setting the derivative to zero...

$6x^5-24x^2+2x-6=0$

$3x^5-12x^2+x-3=0$