# Can You Fairly Cut the Birthday Cake?

## This Week's Fiddler

Let's orient the cake such that it spans 20 inches right of the origin along the x-axis and 10 inches above the origin along the y-axis.

We can then find a center point $(10,y)$ with cuts at $(0,10)$, $(20,10)$, and $(10,0)$ such that the areas are equal. There are two equally sized trapezoids formed, each with an area of $10(\frac{10+y}{2})$, and one triangle of area $\frac{1}{2}(20)(10-y)$. Setting the areas equal, we find that $50+5y=100-10y$, hence $y=\frac{10}{3}$.

Checking our work, we note that the total cake is $20\cdot10=200$ square inches, and each piece comes out to $\frac{200}{3}$ square inches, which is correct. Thus one valid solution would be...

**Answer:** Cake oriented from 0 in. to 20 in. along the x-axis and 0 in. to 10 in. along the y-axis. Center of cut at (10 in., 10/3 in.), piece boundaries at (0 in., 10 in.), (20 in., 10 in.), and (10 in., 0 in.).

## Extra Credit

We note that after we determine a center $(x,y)$, we only need to determine one of the cuts; the other two cuts are predetermined to be 20 inches away along the perimeter in either direction. Additionally, we can consider one cut on one of the long sides, as (aside from the boundary cases) will always have exactly one cut. Let's say $0\le t\le20$ is where we perform the cut along the x-axis.

If $t\le10$, then the shapes are as follows: $((t, 0), (20, 0), (20, t), (x, y))$, $((20, t), (20, 10), (10-t, 10), (x, y))$, and $((10-t, 10), (0, 10), (0, 0), (t, 0), (x, y))$.

An example, where $t=3.14$:

Full interactive Desmos visualization will be below!

As we know each piece should have an area of $\frac{200}{3}$, we can derive three equations. The first two pieces are quadrilaterals that can be split into two triangles, while the third piece is a pentagon which can be split into two trapezoids.

SymPy code for solving the linear equation:

```
import sympy
x, y, t = sympy.symbols('x y t')
eqs = [
sympy.Eq(400, 3 * ((20 - t) * y + t * (20 - x))),
sympy.Eq(400, 3 * ((10 - t) * (20 - x) + (10 + t) * (10 - y))),
sympy.Eq(200, 3 * (y * (t + x) / 2 + (10 - y) * (10 - t + x) / 2)),
]
print(sympy.solve(eqs))
```

Output:

```
[{x: 5*(3*t**2 - 30*t + 200)/(t**2 - 10*t + 100), y: 5*(3*t**2 - 50*t + 400)/(3*(t**2 - 10*t + 100))}]
```

Now we have a parametric equation of one half of the locus, which looks like this when plotted.

We observe that $y$ strictly decreases as $t$ increases, and there is a point of reflection about $t=5$. Thus, with a few integrals, we can find the area of the locus.

If we assign $x=f(t)$ and $y=g(t)$, then we can say the area under $y$ for the top half of the arc is $\int_5^0{g(t)\cdot f'(t)}\ dt$. Note that we integrate from $t=5$ to $t=0$ to go rightwards with $x$ and get a positive area. We can then subtract this with $\int_5^{10}{g(t)\cdot f'(t)\ dt}$. Finally, we double the area to account for the reflection of the locus not captured by this arc (i.e., the case when $10\le t\le20$).

Hence, the area:

$2\biggl(\int_5^0{g(t)\cdot f'(t)\ dt}-\int_5^{10}{g(t)\cdot f'(t)\ dt}\biggl)$We find that $f'(t)=\frac{1000(t-5)}{(t^2-10t+100)^2}$.

So:

$\int_5^0{g(t)\cdot f'(t)\ dt} \\ \int_5^0{5\frac{3t^{2}-50t+400}{3t^{2}-30t+300}\cdot\frac{1000(t-5)}{(t^2-10t+100)^2}\ dt} \\ \frac{25}{162}(45+4\sqrt3\pi)$And:

$\int_5^{10}{g(t)\cdot f'(t)\ dt} \\ \int_5^{10}{5\frac{3t^{2}-50t+400}{3t^{2}-30t+300}\cdot\frac{1000(t-5)}{(t^2-10t+100)^2}\ dt} \\ \frac{25}{162}(63-4\sqrt3\pi)$Making the total area:

$2\biggl(\frac{25}{162}(45+4\sqrt3\pi)-\frac{25}{162}(63-4\sqrt3\pi)\biggl) \\ \frac{25}{81}(8\sqrt3\pi-18)$...or about 7.88 square inches.

Animated Desmos visualization of valid cuts! (only from $t=0$ to $t=10$)

**Answer:** `25/81*(8*sqrt(3)*pi-18)`

square inches (about 7.88 sq. in.)