Hello Math StackExchange! When I was in grade school, our math class did an art project where we drew many straight lines to make what appears to be a curve on the outside (pictures attached). I've been curious about the resulting curve for at least a year, and upon dedicating time toward it, I still can't get a satisfactory solution (besides a brute force method with the max(x,y) function). Is there a closed form for the limiting case of this curve? Is a closed form impossible?
Case of 5 lines:
Case of 100 lines:



Seems like you're looking for a closed form for the function defined as $$y(x) = \max_{p\in [0,1]} \Big(1-p-\tfrac{1-p}{p}x\Big)$$ for $x\in [0,1]$. Notice that we can rewrite the expression in parentheses as follows: $$1-p-\tfrac{1-p}{p}x = 1+x - 2\sqrt{x} - \Big(\sqrt{p} - \sqrt{\tfrac{x}{p}}\Big)^2$$ Because perfect squares of real numbers are always nonnegative, we can argue that this expression is always at most $1+x-2\sqrt{x}$. Furthermore, this value is actually achieved when $p=\sqrt{x}$. Hence, we have that $$y(x) = 1+x-2\sqrt{x}$$ and voila: