# how to find the maximum area of a two rectangle under a parabola

Starting from a very basic concept, what is the largest rectangle to be drawn under the function $f(x)$ as shown in the figure. Picking an arbitrary point on the x-axis $(x, 0)$ and its mirror $(-x, 0)$ to form the width of the rectangle to be $2x$ and the height is $f(x)$ where the intersection with the function points $(\pm x,f(x))$. [This is true provided $f(-x)=f(x)$ and $f(y)\ge f(x)$ for all $y\in [-x,x]$. AR.]

Thus, the function that gives area of the rectangle is $A(x) = 2xf(x)$. Using the product rule for differentiation, you find the derivative of this function is

$$A'(z) = 2f(z) + 2zf'(z).$$ This is called the Jacobian matrix optimization (is this correct? if yes can you provide reference.). When you set this equation equal to zero to find the critical point(s), you obtain $$0 = 2f(x) + 2xf'(x) \rightarrow -2f(x) = 2xf'(x) \rightarrow -f(x) = xf'(x)$$ Solving this equation for $x$ yields the critical point(s), one of which provides the dimensions for the rectangle of maximum area. [This is true for a point $x_0$ from the interior of $\operatorname{dom} f$ such that a function $xf(x)$ has a finite derivative in some neighborhood of the point $x_0$, so you also have to consider separately points from $\operatorname{dom} f\setminus \operatorname{int}\operatorname{dom} f$. AR]

Suppose a parabola's equation is $f(x) = ax^2+bx+c$. This is the equation of a parabola whose y-intercept is (27.78, 0.9772) and whose two x-intercepts are (2.72, 0) and (52.84, 0). After shifting the function to be symmetric over the y axis the new y-intercept is (0, 0.9772) and x-intercept ($\pm 25.06$, 0). The new function looks like $f(x) = a(x+d)^2+b(x+d)+c$, where $d=27.78, a=-0.0016, b=0.086 \text{ and } c=-0.22$ for simplicity $f(x) =\bar{a}x^2+\bar{b}x+\bar{c}$.

The derivative of this function is $f'(x) = 2ax+b$. Now plug these functions into the rectangle maximization equation above to find the critical point:

\begin{equation*} \begin{aligned} &-f(x) = xf'(x) \rightarrow \bar{a}x^2+\bar{b}x+\bar{c}= x(2\bar{a}x+\bar{b})\rightarrow 2\bar{a}x^2+x\bar{b}-\bar{c} =0\\ &x=-\frac{\bar{b} \pm \sqrt{\bar{b}^2 + 8\bar{a}\bar{c})}}{4\bar{a}} \rightarrow \bar{x}=\pm 14.4730\rightarrow f(x)=0.6515 \end{aligned} \end{equation*}

This equation has the solutions $\bar{x}=\pm 14.4730$. The negative solution can be ignored since the parabola is symmetric. Using the critical value $\bar{x}=14.4730$, the width of the maximum-area rectangle is $2\bar{x}=2\times14.4730$. The height is found by plugging the critical point into the function $f(\bar{x})=0.6515$:

Thus, the maximum area is $2\bar{x}f(\bar{x})=2\times14.4730\times0.6515$. = $8.8583$.

Till here all is basic but adding another variable to x makes the problem more complex. Generalizing the Jacobin and numerical methods to find the optimal $\bar{x}$ for more than one rectangle is the target. The lower figure illustrates the concept for two different ${x}$ to obtain the max area of the rectangles. The wavy shaded area represent the first ${x}$ denoted as ${x}_2$ where the area is $2x_2f(x_2)$. The area of the strips shaded areas are function of ${x}_1$ and ${x}_3$, where the area of the lower rectangles is $2({x}_1 -{x}_2) f({x}_1)$ and the upper rectangle is $2{x}_3(f({x}_3)-f({x}_2))$, where again $f(x) = a(x+d)^2+b(x+d)+c$. Important assumption was counted here was inhabited from the combination theorem, where our of 2 options $2^2$ possible combination. For example if the optimal $\bar{x}_1,\bar{x}_2$ were selected to get $[f(\bar{x}_1),f(\bar{x}_2)]$ = $[0.2,0.6]$ then a third option is $[0.2+0.6=08]$ could be added, zero is the forth combination. From that $f(x_3)=f(x_1)+f(x_2)$. [Why? AR.]

\begin{align*} &A(x_1,x_2,x3)= 2x_2f(x_2)+ 2(x_1 -x_2) f(x_1) +2x_3(f(x_3) -f(x_2))\\ & =2x_2f(x_2)+ 2(x_1 -x_2) f(x_1) +2x_3(f(x_1) +f(x_2)-f(x_2))\\ & =2x_2f(x_2)+ 2(x_1 -x_2) f(x_1) +2x_3f(x_1)\\ \\ &\frac{A'(x_1,x_2,x_3)}{x_1}=f(x_1) + (x_1 - x_2)f'(x_1)+ x_3f'(x_1) \\ &\frac{A'(x_1,x_2,x_3)}{x_2}=f(x_2) + x_2f'(x_2)- f(x_1) \\ &\frac{A'(x_1,x_2,x_3)}{x_3}=f(x_1)= a(x_1 +d)^2 + b (x_1 +d) +c \\\\ &\frac{A'(x_1,x_2,x_3)}{x_1}=a (x_1+d)^2 + x_3 (b + a (2 x_1 +2d)) + (b + a (2x_1+2d)) (x_1 - x_2) + b (x_1 +d) + c \\ &\frac{A'(x_1,x_2,x_3)}{x_2}=- a(x_1+d)^2 + a(x_2+d)^2+x_2(b + a(2x_2+2d)) - b(x_1 +d) + b(x2+d) \\ &\frac{A'(x_1,x_2,x_3)}{x_3}= a(x_1 +d)^2 + b (x_1 +d) +c\\ \end{align*}

Then solving the Jacobin matrix to obtain the optimal $\bar{x}_{1,2,3}$ but unfortunately this system of equation is non-convex. (The question is, is this enough to proof non-convexity )

[What is a non-convexity of the system of equations? What are you asking about its convexity but not about its solution, realizing the maximum area? AR]

• Please consider reducing your question to the essentials. Most folks here won't want to parse this many lines of brute-force algebra just for fun. – dohmatob Dec 17 '15 at 16:57
• And you may wait a lot of time before a guy who calculates for fun will encounter your question. – Alex Ravsky Nov 8 '16 at 9:20
• I added some remarks and plausible corrections to your question. Please check if all is correct. – Alex Ravsky Nov 8 '16 at 9:50
• @AlexRavsky thanks for your comments. Please refer to my paper for the answer: sciencedirect.com/science/article/pii/S0038092X17300877 – Abdulelah Habib Jun 27 '17 at 18:39