How do I find the values for $a_0, a_1, \ldots, a_n$ such that the triangle is divided into $n+2$ parts of equal area? In the above example, $n=2$.
Let's assume that $a_i = 0$ means the line is at the lower right corner, and $a_i = 1$ is the vertical edge of the triangle. (In the above example, $a_0 \approx 0.25$, $a_1 \approx 0.5$, and $a_2 \approx 0.8$. That's obviously not a solution to the problem.)