The kitchen is a great place to apply the principles you learned in school in real life. Ever wonder how you can keep a day-old cake from drying out? Or how to slice your bagel for optimal cream cheese coverage? Some of the hungriest minds in the fields of math and science have got your back.

1. SLICE A CAKE FOR MAXIMUM MOISTURE

Leftover birthday cake should be one of life’s greatest pleasures, but instead it becomes vulnerable to moisture-zapping air the moment you slice into it. Fortunately, this problem can be avoided with some simple geometry. In the video above, mathematician Alex Bellos outlines an alternative cake-cutting method he found in a 1906 issue of Nature magazine written by Sir Francis Galton. Rather than eating away at a round cake one wedge at a time, he suggests cutting one big sliver spanning the cake’s diameter. The center cut means that instead of having a giant exposed area that will dry out two future slices of cake at once, one rubber band can be used to hold the pieces together, exposing none of the soft interior to the air. This keeps the interior nice and moist until the cake is ready to be sliced into again (although it should be noted—rubberbanding a frosted cake rather than the fondant-covered ones shown in the video could get really messy really fast).

2. COAX KETCHUP FROM THE BOTTLE

As long as ketchup has been packaged in glass bottles, diners have struggled to set it free. If you’ve ever been the victim of a flash ketchup flood after minutes of fruitless shaking, you can blame physics. Ketchup is a non-Newtonian fluid, which in this case means it behaves like a solid sometimes (like when it refuses to leave its bottle) and like a liquid other times (when it all comes pouring out at once).

According to Heinz’s team of scientists, ketchup is meant to flow at 147.84 feet per hour, so hitting the bottle with full force isn’t your best bet. Anthony Stickland of the University of Melbourne's School of Engineering instead recommends doing the majority of the work while the cap’s still secure. On the University’s website he instructs readers to “briefly invoke your inner paint shaker” and evenly distribute the solid particles throughout the bottle. Next, with the cap still on, flip the container upside down and thrust the contents towards the neck. After that you’re ready to get the ketchup on your plate: Remove the cap and use one hand to aim the bottle at the plate at a 45 degree angle while gently tapping the bottom with the other, tapping harder and harder until you find the correct strength for that particular ketchup. If you still can’t get the hang of it after all that, perhaps a plastic squeeze bottle is more your style.

3. CREATE A MÖBIUS BAGEL

In math, a möbius strip is a twisting, continuous plane that has one surface and one edge. The shape has a handful of practical uses in the real world, like achieving optimal bagel-to-schmear ratio. Research professor and mathematical sculptor George Hart came up with this ingenious application several years ago. To produce the perfect cut, he makes four separate incisions into a bagel after first marking the key points with a food-safe marker for guidance. The final result pulls apart into two separate halves linked together like a chain. In addition to the impressive presentation, the möbius bagel offers more surface area for spreading. Now you can get more cream cheese on your bagel without slathering it on in gobs.

4. DUNK BISCUITS WITHOUT GETTING CRUMBS IN YOUR TEA

Dunking biscuits in tea is a popular British pastime, but it comes at a price: a mug full of sad, soggy crumbs. Scientists at the University of Bristol in England offered a solution to this problem in the late 1990s in the form of a mathematical formula. Instead of turning the cookie sideways, the researchers recommend dipping it into the tea broad-size first. Once the bottom surface is sufficiently moist, dunkers should flip the biscuit 180 degrees to allow the dry side to support the wet one. Apparently the snack is worth the effort: According to the study, biscuits are up to 10 times more flavorful dunked than dry.

5. CUT EQUAL SLICES OF PIZZA TO FEED A CROWD

Joel Haddley via Wikimedia Commons // CC BY-SA 4.0

Slicing a pizza into wedges works well enough at first, but there will inevitably be at least one person who wants only cheesy goodness and tosses the crust, while another person just can’t get enough crust. In 2016, researchers at the University of Liverpool proposed a brilliant alternative: dividing the pie into manageable, equal-sized pieces according to the monohedral disc tiling formula.

The basic design produces 12 slices. To start, the server slices the pie end-to-end along a curving path. They do this three times to create six, claw-shaped slices, then they cut each slice in half at an angle to make the full 12. Instead of floppy, skinny slivers, diners have their pick of funky-shaped pieces from any part of the pizza. In their study [PDF], researchers demonstrate how this concept can be taken even further. As long as the shapes have an odd number of sides, the monohedral disc tiling method can theoretically go on forever (though the authors specify that nine-sided slices are where things start to get impractical. You may want to spring for a second pie at that point).

6. FOLLOW THE FORMULA FOR A PERFECT GRILLED CHEESE ON TOAST

Many people have their own ideas of what constitutes an excellent grilled cheese, but the Royal Society of Chemistry's recipe is based on science. In 2013, they teamed up with the British Cheese Board to devise a formula for the optimal cheese on toast. Society science executive Ruth Neale said in a press release:

"As the result of tests we carried out in our Chemistry Centre kitchen, we found that the perfect slice can be made by melting 50 grams of sliced hard cheese, such as cheddar, on a slice of white bread, 10 millimeters thick, under the grill. The cheese on toast should sit at a distance of 18 centimeters from the heat source [...] and needs to cook for four minutes to achieve the perfect consistency and taste.”

The full equation, which includes variables for bread thickness and cheese mass, is available on the Royal Society of Chemistry’s website.

7. POUR CHAMPAGNE WITHOUT LOSING THE BUBBLES

Whipping up a meal based on complex algorithms can be exhausting. If you plan to reward yourself with a glass of post-dinner bubbly, just make sure to serve it the correct way. According to scientists from the University of Reims in France, that means pouring champagne into a tilted glass the same way you’d pour a pint of beer. Those effervescent CO2 bubbles that make champagne so pleasant to drink are also clamoring to escape into the atmosphere the moment you pop the cork. Their study published in the Journal of Agricultural and Food Chemistry suggests pouring your beverage at an angle to retain as many bubbles as possible. This method is less turbulent than pouring liquid into an upright glass, thus giving the carbon dioxide less opportunity to break free. To maximize the amount of bubbles per glass, the researchers also recommend chilling the champagne before serving.