Maximizing area of a triangle and rectangle intersection Problem: I was wondering the maximum (or possibly the least upper bound of the) possible area of intersection between a triangle and rectangle of area 1. 
I tried to draw several pictures to gain some ideas but there are so many possible triangles and rectangles which makes it seem difficult to consider them all.
 A: The maximum area is $2(\sqrt{2}-1)$. 
Similar question has been asked on 
MO
and mathematica.SE before. 
The answer on MO has same number but didn't have a proof while the one on mathematica.SE has verified the number numerically. 
In this answer, I'm going to present a proof of above statement.

Before we start, let me restate the problem in a way I understand and generalize it a little bit.


*

*For any 1-d or 2-d geometric figures in $\mathbb{R}^2$, let $|\cdot|$ be corresponding content.
(e.g. length for line segments and area for polygons).

*For any $\rho > 0$, let $\mathcal{T}_\rho$ be the collection of triangles with area $\rho$.

*Let $\mathcal{R}$ be the collection of rectangles with unit area.

*Let $\mathcal{P}$ be the collection of parallelogram with unit area.

*Let $S$ be any square of side $1$.


Let $M^{\mathcal{R}}_\rho$, $M^{\mathcal{P}}_\rho$, $M^S_\rho$ be the least upper bound of area of intersection between elements of $\mathcal{T}_p$ with elements of $\mathcal{R}$, $\mathcal{P}$ or $S$ respectively. More precisely,
$$\begin{align}
M^{\mathcal{R}}_\rho &= \sup \left\{ |T \cap R| : T \in \mathcal{T}_\rho, R \in \mathcal{R} \right\}\\
M^{\mathcal{P}}_\rho &= \sup \left\{ |T \cap P| : T \in \mathcal{T}_\rho, P \in \mathcal{P} \right\}\\
M^{S}_\rho &= \sup \left\{ |T \cap S| : T \in \mathcal{T}_\rho \right\}
\end{align}
$$
Since $S \in \mathcal{R} \subset \mathcal{P}$, we have
$M^S_\rho \le M^{\mathcal{R}}_\rho \le M^{\mathcal{P}}_\rho$.
Notice under affine transformations, the ratio of area between two polygons is an invariant and for any $P \in \mathcal{P}$, there is an affine transform $\phi_P$ which sends $P$ to $S$, we have
$$\begin{align} M^{\mathcal{P}}_\rho
&= \sup \left\{ |T \cap P| : T \in \mathcal{T}_\rho, P \in \mathcal{P} \right\}\\
&= \sup \left\{ |\phi_P(T) \cap S| : T \in \mathcal{T}_\rho, P \in \mathcal{P} \right\}\\
&\le M^S_\rho
\end{align}$$
Combine these, we obtain $M^S_\rho = M^{\mathcal{R}}_\rho = M^{\mathcal{P}}_\rho$. Let $M_\rho$ be this common value.
The problem at hand is a special case at $\rho = 1$ for following two questions:

  
*
  
*In $M^{\mathcal{R}}_\rho$, can we replace 'least upper bound' by a maximum?
  
*What is the value of $M_\rho$?
  

For any $T \in \mathcal{T}_\rho$, $R \in \mathcal{R}$, we have $$|T \cap R| \le \min( |T|, |R| ) = \min( \rho, 1)$$
This implies $M_\rho \le \min(\rho,1)$.
Let $A, B, C$ be vertices of $T$ such that $AB$ is the longest side.
Let $R'_T$ be the rectangle having $AB$ as base and the edge opposite to $AB$ passes through $C$. 
It is easy to see $|R'_T| = 2\rho$. Let $F$ be the foot of altitude through $C$ on $AB$. Let
$R_T$ be following scaled copy of $R'_T$:
$$R_T = \left\{ \left(1 - \frac{1}{\sqrt{2\rho}}\right) F + \frac{1}{\sqrt{2\rho}} q : q \in R'_T \right\}$$
Since $|R_T| = 1$, $R_T \in \mathcal{R}$. 
When $\rho \le \frac12$, $T \subset R'_T \subset R_T$. This implies
$\rho = |T \cap R_T| \le M_\rho$ and as a result $M_\rho = \rho$.
When $\rho \ge 2$, it is easy to check $R_T \subset T$. We have $M_\rho \ge |T \cap R_T| = |R_T| = 1$. 
This leads to $M_\rho = 1$.
In above two cases, the least upper bound is achieved by $R_T$ and in definition of $M^{\mathcal{R}}_\rho$, we can replace the use of least upper bound by a maximum.
For the remaining case, we have $\frac12 < \rho < 2$. It is easy to verify 
$$|T \cap R_T| = \rho - (\sqrt{2\rho}-1)^2 \ge \frac12$$
This implies
$$M_\rho = \sup \left\{ |T \cap R|
: T \in \mathcal{T}_\rho, |T| \ge \frac12, R \in \mathcal{R} \right\}$$
With help of invariance under affine transformations again, this is equivalent to
$$M_\rho = \sup \left\{ |T \cap S| : T \in \mathcal{T}_\rho, |T| \ge \frac12 \right\}$$
Choose a coordinate system so that $S$ is the unit square $[0,1]^2$. Let $G = (\frac12,\frac12)$ be its center.
For any $T \in \mathcal{T}_\rho$ with $|T| \ge \frac12$, let $p$ be the vertex of $T$
most distant from $G$. Let $r = |pG|$. When $r > \sqrt{2}$, let $\lambda = \frac{r-\sqrt{2}}{r+\sqrt{2}}$
and consider following sequence of polygons:
$$Q_n \stackrel{def}{=}
\left\{ (1-\lambda^n) p + \lambda^n q : q \in T\cap S \right\}\quad\text{ for }\quad n = 0,1,\ldots$$
We have $Q_0 = T \cap S \subset T$. Since $T$ is convex, all $Q_n \subset T$.
It is not hard to see $Q_n$ lies inside a circle of radius $\sqrt{2}\lambda^n$
and the interior of these circles are disjoint. This leads to
$$2\ge \rho = |T| \ge \sum_{n=0}^\infty |Q_n| = \sum_{n=0}^\infty |T\cap S|\lambda^{2n} \ge \frac{1}{2(1-\lambda^2)}$$
Simplifying this give us
$$\lambda \le \frac{\sqrt{3}}{2} \quad\implies\quad r \le \sqrt{2}(2+\sqrt{3})^2 < 20$$
This tells us $T \subset \bar{B}(G,20)$
where $\bar{B}(G,20)$ is the closed disk of radius $20$ centered at $G$. As a result,
$$M_\rho = \sup \left\{ |T \cap S| : T \in \mathcal{T}_\rho, T \subset \bar{B}(G,20) \right\}$$
We can parameterize $T$ by its three vertices. The set $\left\{ T \in \mathcal{T}_\rho : T \subset \bar{B}(G,20) \right\}$ 
can be regarded as a closed subset of $\bar{B}(G,20)^3$ and hence is compact.
Since the map $T \mapsto |T \cap S|$ is continuous on this set, it achieve maximum at some $T$.
In definition of $M^S_\rho$ and hence in definition of $M^{\mathcal{R}}_\rho$ , we can replace the use of least upper bound by a maximum.
This settle the first question.
To address the second question, take $T \in \mathcal{T}_\rho$ and $R \in \mathcal{R}$ such that
$$M_\rho = |T \cap R| = | \phi_R(T) \cap S|$$
By an affine transformation of the form $(x, y) \mapsto (x,y + \alpha x + \beta)$ where $\alpha,\beta$ are constants,
we can find a $T_1 \in \mathcal{T}_\rho$ and $P_1 \in \mathcal{P}$ such that


*

*one side of $T_1$ is lying on the $x$-axis. i.e. it has the form $[a,b] \times \{0\}$
for some $a < b$.

*$T_1$ lies completely inside the strip $a \le x \le b$.

*$P_1$ has two vertical edges. One lies on line $x = 0$, the other one on line $x = 1$.

*$|T_1 \cap P_1 | = M_\rho$
By a reflection with $x$-axis if needed, we can assume $T_1$ lies in the upper half-plane. 
The area $|T_1 \cap P_1|$ can be expressed as an integral
$$|T_1 \cap P_1| = \int_0^1 |\ell_t \cap (T_1 \cap P_1 )| dt$$
where $\ell_t$ is the line $x = t$ and $\ell_t \cap (T_1 \cap P_1 )$ is a line segment.
Notice 
$$|\ell_t \cap (T_1 \cap P_1)| \le \min( |\ell_t \cap T_1|, |\ell_2 \cap P_1| )
= \min( |\ell_t\cap T_1|, 1)$$
We obtain
$$M_\rho = |T_1 \cap P_1| \le \int_0^1 \min( |\ell_t\cap T_1|, 1 ) dt
= |T_1 \cap S| \le M^{\mathcal{P}}_\rho = M_\rho$$
This implies $|T_1 \cap S| = M_\rho$.
By an affine transformation of the from $(x,y) \mapsto (x + \gamma y + \delta, y)$ where $\gamma,\delta$ are constants,
we can find a $T_2 \in \mathcal{T}_\rho$ and $P_2 \in \mathcal{P}$ such that


*

*$T_2$ is a right-angled triangle lies in first quadrant with a right angle at origin.

*$P_2$ has two horizontal edges. One lies on line $y = 0$, the other one on line $y = 1$.

*$|T_2 \cap P_2| = M_\rho$.


Similar to above, we can express $|T_2 \cap P_2|$ as an integral
$$|T_2 \cap P_2 | = \int_0^1 | \ell'_t \cap (T_2 \cap P_2 )| dt$$
where $\ell'_t$ is the line $y = t$. Once again, we have
$$M_\rho = |T_2 \cap P_2| \le \int_0^1 \min(|\ell'_t\cap T_2|,1) dt = |T_2 \cap S| \le M^{\mathcal{P}}_\rho = M_\rho$$
This implies $|T_2 \cap S| = M_\rho$.
By another affine transform of the form $(x,y) \mapsto (kx,\frac{y}{k})$ for some constant $k$, 
we can find a $T_3 \in \mathcal{T}_\rho$ and $R_3 \in \mathcal{R}$  so that


*

*$T_3$ is the triangle with vertices $(0,0), (\sqrt{2\rho},0), (0,\sqrt{2\rho})$

*$R_3$ is the rectangle $[0,k] \times [ 0, \frac1k ]$.

*$|T_3 \cap R_3| = M_\rho$.


As a function of $k$, it is now a trivial calculus exercise to show
$\left|T_3 \cap [0,k] \times [0,\frac1k]\right|$ is maximized at $k = 1$. i.e $R_3$ can be taken as $S$.
The end result is
$$M_\rho = \begin{cases}
\rho, & \rho \le \frac12\\
\rho - (\sqrt{2\rho} -1 )^2, & \frac12 < \rho < 2\\
1, & \rho \ge 2
\end{cases}\tag{*1}
$$
In particular, when $\rho = 1$, above formula leads to $$M_1 = 1 - (\sqrt{2}-1)^2 = 2(\sqrt{2}-1)$$
As a side note, we can drop the step of taking maximum over $\mathcal{T}_\rho$.
Recall the expression for the area $|T \cap R_T|$, $(*1)$ can be strengthen to

For any triangle $T \in \mathcal{T}_\rho$,
  $$\max\left\{ |T \cap R| : R \in \mathcal{R} \right\}
= |T \cap R_T| =  \begin{cases}
\rho, & \rho \le \frac12\\
\rho - (\sqrt{2\rho} -1 )^2, & \frac12 < \rho < 2\\
1, & \rho \ge 2
\end{cases}$$

