Suppose we have a unit square (say, with vertices $(0,0)$, $(0,1)$, $(1,0)$ and $(1,1)$) and cut it along the diagonal with end-points $(0,0)$ and $(1,1)$. We keep one part fixed, but we can translate the other part along the $x$-axis. What is the maximum area of intersection that one can obtain? Exactly where does it happen?
I have no idea how to turn this into an expression to be maximized (which would allow one to apply one-variable calculus methods to solve it).
Hint: Let the triangle on the left be $T_1$, and the one on the right $T_2$. If $T_2$ is shifted to the left by $x$ units, we can obtain the overlapping area by subtracting (the area of the triangle to the left of $T_1$ + the area of the triangle to the right of $T_1$) from the area of $T_2$.