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 $\displaystyle 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 $\displaystyle (x-3)^2+(y-4)^2=d^2\ and\ y=x^3$

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

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

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

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

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

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

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

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

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

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

$\displaystyle \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...

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

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