Ice doesn’t belong in ice cream. If you want to make an extra lickable treat, you need to minimize the ice part.

“The first thing in making ice cream is that you have to cool down the milk and the cream so they freeze,” says Rama Bansil. “You don’t want it to form ice, but you want it to become very, very cold and thick.”

This, the Boston University College of Arts & Sciences (CAS) professor of physics teaches in her Physics of Food/Cooking class, is not just about being an artful chef-it’s about understanding the science of phase transitions: how one thing (say, water) transforms into something else (ice). The course covers the physics of soft materials, but Bansil has given it a more palatable spin to attract nonscience majors. They learn the basic principles of thermodynamics, molecular physics, and a dash of molecular biology. The class might not produce physicists or chefs, Bansil says, but it will give students “a better appreciation of what’s happening when they’re cooking.” And also whether the ice cream they’re scooping is good enough to justify the calories it’ll cost.

Before the existence of modern ice cream machines, glaciers (the French word for such professionals) would churn the liquid ingredients in a bucket lined with salt and ice. Salt brings down water’s freezing point, ensuring that the bucket is especially cold and that the ice cream hardens as quickly as possible, which reduces the opportunity for large ice crystals to form.

Modern physics, however, can do one better than a bucket.

“The best way to make ice cream is, hands down, with liquid nitrogen,” says Bansil, who has students in her class experiment with different production methods, from shaking ingredients in a bag to pouring liquid nitrogen on them. They also have to quantitatively measure the results.

Liquid nitrogen is so cold that it boils at minus 320 degrees Fahrenheit, says Bansil, meaning “everything that comes into contact with it freezes more or less instantaneously-the water molecules don’t have time to really form ice, they just solidify wherever they are.” Pour it into a bowl of blended cream, milk, and sugar and it freezes in seconds, producing ice cream with microscopic ice crystals, a smoother texture, and no wait.

For those who don’t have a liquid nitrogen canister tucked behind their saucepans, Bansil says, it’s important to keep stirring the mixture-it’ll help beat back those ice crystals-and to stick to cream (gelatin and condensed milk won’t cut it).

“Ice cream is both a foam and an emulsion,” she says, so the secret to good homemade ice cream is “to keep the size of the ice crystals to a very small, microscopic size, get the emulsion of fat droplets to the right consistency by using cream, and get the right amount of air in the foam.”

Other topics in her class range from the baking of cupcakes (heat diffusion) to making cheese (changing molecular and physical structures). After guest chefs, such as Nicki Hobson of Boston’s Island Creek Oyster Bar, make an appearance, students peer through microscopes to examine the star cooks’ concoctions. Hobson’s hollandaise was scrutinized to “calculate the pressure or the size of the bubbles inside the sauce and how that changed as you applied pressure or changed the concentration of the mixture,” Bansil says.

The construction of a coconut shell dessert demonstrates three physics principles: heat exchange, centrifugation, and gelation.

When it comes to steak, physics tells us to use the sous vide method: cooking the meat in a bag immersed in water held at a constant temperature. “Meat, like other foods, has lots of different proteins and each one of these proteins changes its shape at some specific temperature; that’s called denaturing,” she says. “You want to denature only one particular protein and not all.” It’s the same process that sees an egg turn from runny goo to hard-boiled if a cook doesn’t keep a close eye on temperatures and timings. Sous vide steak takes hours, she says, but “it’s perfect because the temperature is uniform” throughout the meat.

Most of us will continue to throw a steak in the pan. For that, you need to think about bounce-how the meat springs back after being poked (to measure it, Bansil recommends looking online at the “meat finger test”). “Texture happens to be related to the elastic properties of the food,” she says. “You want it to bounce just the right amount. Just right is, of course, up to the palate, but it ultimately relates to the molecular properties of the meat molecules, the proteins in the meat.”

Students are enthusiastic. Avery Singh (CAS’18) especially enjoyed the lab that involved making ice cream. “It illuminated the science behind how ice cream is made,” Singh says. “Cooking is a personal interest of mine. I definitely think about the concepts as I’m cooking.”

Classmate and self-described foodie Nina Kim (SAR’16) is taking the class to fulfill a lab requirement. “I think it’s cool to use food to lure people into science,” she says.