Minimization problem of $e^x$ and straight line.

137 Views Asked by At

enter image description here Given the curve $C$: $y=e^{x}$ and a point $P$: $(x_0,y_0)$ with $y_0 > e^{x_{0}}$, a straight line $L$ of slope $k$ goes through the point $P$ and intersects $C$ at two points $A$ and $B$, try to find out: $(1).$ $k$ that minimizes the distance of $A$ and $B$, $(2).$ k that minimizes the area of triangle OAB ($O$ is the origin $(0,0)$).

Edit:

I've tried the Lagrange multiplier method and only solved part of the problem(the minimal triangle when P on yAxis, in this case, $k=y_0$). However, the steps are quite complicated (for high school students). I'd like to know if there is some elementary methods to approach this problem. Thanks!

Edit 2:

(add the image)

I took the following Steps:

  1. as shown in the chart, points P,Q,A,B are colinear. then we got the constraits of variables a,b and q, which are: $g(a, b) = 0, g(a,q) = 0, g(b,q) = 0$.
  2. the distance between A and B is given by $f(a,b) = sqrt((b-a)^2+(e^b-e^a)^2)$
  3. the area of the triangle OAB is given by $f(a,b,q)=1/2 * q * (b-a)$
  4. ${\mathcal {L}}(a,b,\lambda) = f(a,b)+\lambda*g(a,b)$
  5. solve equations: $\nabla _{a,b,\lambda }{\mathcal {L}}(a,b,\lambda )=0$

The last step was the part that is very complicated.

2

There are 2 best solutions below

3
On

This is not an answer, just an illustration. The picture below represents the contour lines for $f(a,b) = (a-b)^2+(e^a-e^b)^2$ and, in red, the constraint $\dfrac{e^b-y_0}{b-x_0} = \dfrac{y_0-e^a}{x_0-a}$. This was obtained for $(x_0,y_0) = (\frac 12, 2)$

As you can see, the minimum will be attained at a point where the contour line of $f$ is tangent to the constraint. This is in fact the thinking behind Lagrange multipliers. I believe that Lagrange multipliers is probably the best way to go but, even in this case, we need handle the numerical solution of one or more equations.

enter image description here

0
On

From the constraint $$\dfrac{e^b-y_0}{b-x_0} = \dfrac{y_0-e^a}{x_0-a}$$ it is not difficult to solve it for $b$. This gives $$b(a)=x_0+\frac{y_0 (x_0-a)}{e^a-y_0}-W\Big[\frac{x_0-a}{e^a-y_0}\exp\left(\frac{e^a x_0-a y_0}{e^a-y_0} \right)\Big]$$ The minimum of $$f(a) = \big[a-b(a)\big]^2+\big[e^a-e^{b(a)}\big]^2$$ will happen at a value of $a$ a bit larger than $\log(y)$.

We do not need optimization since the problem is now to find the root of $f'(a)=0$.

$$f'(a)=(a-b(a)) \left(1-b'(a)\right)+\left(e^a-e^{b(a)}\right) \left(e^a-e^{b(a)} b'(a)\right)$$ The edit gives the formal expression of $b'(a)$.

Now, using a very poor starting point $a_0=3$, Newton iterates are $$\left( \begin{array}{cc} n & a_n \\ 0 & 3.000000000 \\ 1 & 2.518474855 \\ 2 & 2.048112714 \\ 3 & 1.597475428 \\ 4 & 1.194726874 \\ 5 & 1.004001060 \\ 6 & 1.029256086 \\ 7 & 1.031630200 \\ 8 & 1.031646684 \end{array} \right)$$

If we want a better starting point, compute $f'(a)$ for $a=k \log(y)$ with $k >1$ until $f'(a)> 0$. For the worked example, this would give $$\left( \begin{array}{cc} k & f'(k \log(y)) \\ 1.1 & -324.676 \\ 1.2 & -55.3709 \\ 1.3 & -18.4489 \\ 1.4 & -5.89996 \\ 1.5 & +0.61317 \end{array} \right)$$

So, our starting guess $a_0=1.5\log(2) \sim 1.03972$ which is more than decent. Now, Newton iterates will converge without any overshoot since $f'(a_0)$ is positive and $f'''(a)>0$ (by Darboux theorem). $$\left( \begin{array}{cc} n & a_n \\ 0 & 1.039720771 \\ 1 & 1.031465818 \\ 2 & 1.031646591 \\ 3 & 1.031646684 \end{array} \right)$$

In short, the problem seems to be simple from a numerical point of view. Beside the root finder algorithm (using numerical derivatives), the only requirement is a routine for the computation of Lambert function (there are many which are available).

Edit

For the formal calculation of $b'(a)$ defining three intermediate functions of $a$ $$u=\frac{x-a}{e^a-y} \qquad \qquad v=\frac{e^a x-a y}{e^a-y}\qquad \qquad w=W(u\, e^v)$$ to make $$b(a)=x+y\,u-w\implies b'(a)=y u'-w'$$ $$u'=\frac{e^a (a-x-1)+y}{\left(e^a-y\right)^2}\qquad \qquad v'=y\, u'\qquad \qquad w'=\frac w {1+w}\left(\frac {u'}u +v'\right)$$