A simple method to calculate minimal area enclosed between a tangent to $f(x)$ and coordinate axes

analytic geometryoptimization

Given a function $y=f(x)$, take a tangent to the function at some point. We are to find the minimum area between this line and the coordinate axes. An example question is the coordinate axes have minimum area.

I faced two different algorithms to find the solution. The first one is straight-forward:

  • Pick a point on the function: $(x_1, y_1) = (x_1, f(x_1))$.
  • Find the derivative of the function at $x_1$ to calculate the slope of the line. ($m=f'(x_1)$)
  • Derive the tangent-line formula. $y-y_1=m(x-x_1)$
  • Find the formulations of intersections with coordinate axes $(0, y_0)$, $(x_0, 0)$.
  • Calculate the formulation of the area of triangle as $A = x_0 y_0/2$.
  • $A$ shall be a function of $x_1$, minimize that to calculate minimum area.

Second algorithm is very short compared to that:

  • Take the function $g(x) = 2 x f(x)$.
  • Minimize that function to calculate the result.

I cannot figure out how the second algorithm works, or when it works. I checked both against the following family of functions, and both algorithms give the same result:

  • $f(x) = ax+b$
  • $f(x) = k/x$
  • $f(x) = 3b^2 – a^2 x^2$
  • $f(x) = \frac{b}{a} \sqrt{a^2-x^2}$

Question is: Can we prove/disprove the second algorithm? If disproved, under what conditions does the second algorithm work?

Best Answer

$\def\x{\tilde x}$ Observe that all your examples except for $f(x)=ax+b$ have the following common properties. In the first quadrant they are:

$$\begin{align}&\text{positive and decreasing}\tag1\\ &\text{either concave or convex}\tag2 \end{align}$$

Let $(x,f(x))$ be the tangency point. Then the area of the triangle in question is: $$ A(x)=-\frac{(xf'(x)-f(x))^2}{2f'(x)}.\tag3 $$ Hence the equation $A'(x)=0$ reads: $$ \frac{[xf'(x)-f(x)]f''(x)[xf'(x)+f(x)]}{2(f'(x))^2}=0.\tag4 $$

Since due to properties (1) and (2) neither the first nor the second factor in the numerator can be $0$, we are left with the equation: $$ 0=xf'(x)+f(x)=[xf(x)]',\tag5 $$ so that the extrema of the functions $A(x)$ and $xf(x)$ are attained at the same point $\x$. Substituting $\x f'(\x)=-f(\x)$ into equation (3) one finally obtains that the extreme area is: $$ A(\x)=2\x f(\x)\tag6 $$ in agreement with the claim.

Related Question