4

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.

Wolgwang
  • 1,563
peterwang
  • 141
  • 1
    What ha you tried? Where are you stuck? – Andrei Nov 04 '20 at 19:28
  • It would be helpful if you could include a diagram, or include the exact steps you have done (rather than just naming the method). – Toby Mak Nov 05 '20 at 08:42
  • @peterwang You can make the calculations a bit simpler if you minimize $f(a,b) = (b-a)^2 + (e^b-e^a)^2$. The minimum will be attained at the exact same point (only the value of the minimum is squared). – PierreCarre Nov 05 '20 at 10:23
  • @PierreCarre true, thanks. – peterwang Nov 05 '20 at 11:01
  • Cool question. The trouble is that the question involves finding solutions to $$k(x-x_0)+y_0=e^x$$ Which unfortunately does not have a closed form in terms of elementary functions. Things like the Lambert W will be needed for this. – K.defaoite Nov 05 '20 at 11:35
  • @K.defaoite Thanks,I will have a look at the Lambert W you mentioned. – peterwang Nov 05 '20 at 12:21

2 Answers2

1

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)$$

0

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

PierreCarre
  • 20,974
  • 1
  • 18
  • 34
  • Thanks, the picture is really cool. Does this imply that there is only numerical solutions instead of exact analytic solutions. BTW, what's the math tool you used for drawing the picture? – peterwang Nov 05 '20 at 12:20
  • @peterwang It really depends on what you accept as exact... If you admit using the W-Lambert function you can represent the intersection points "exactly" and solve the one-dimensional optimisation problem. But, for all practical purposes, yes, I think we can only get numerical solutions. For this graph I used Wolfram Mathematica. – PierreCarre Nov 05 '20 at 13:19
  • 1
    I think that we can easily sole the equation. If you have time to waste, look at my answer. Cheers :-) – Claude Leibovici Nov 08 '20 at 03:27