When scientists apply music to their work, the results can be surprisingly beautiful.

Canadian astrophysicists, for instance, recently translated the orbits of the exoplanet TRAPPIST-1 system into audio. The music was no random jumble of notes; the harmonized motion became a complex, looping song.

And the science-music relationship works the other way, too — as demonstrated by these five musicians capable of stimulating ears and academics alike.

• Bryan "Dexter" Holland, the Offspring: The pop-punk band the Offspring scored a hit with "Pretty Fly (for a White Guy)," which by 1999 was a radio staple, a popular MTV music video and parodied by "Weird Al" Yankovic. This month, 19 years later, Offspring singer Bryan "Dexter" Holland scored his Ph.D. He graduated from the University of Southern California with a dissertation in molecular biology, completing the degree he'd put on hold when his Offspring career took off. Holland studies the genetic material of HIV, with an eye to viral destruction.

"Imagine a virus is like a car," Holland said to radio station KROQ in 2013, after publishing his first scientific paper. "You want to break the car before you get run over. And there's a lot of ways you can break a car. You can disconnect the battery; you can slash the tires. So, what I'm trying to do is I'm trying to slash the tires of AIDS."

Brian May, Queen: Some fans suspect Queen singer Freddie Mercury invoked astronomer Galileo Galilei in "Bohemian Rhapsody" as a wink at the band's Brian May. The guitarist began his astrophysics research in 1970, then put his studies on hiatus for more than three decades — rock-stardom beckoned. But May returned to his celestial work and in 2007 published a Ph.D. dissertation with an appropriately groovy title: "A Survey of Radial Velocities in the Zodiacal Dust Cloud."

• Mira Aroyo, Ladytron: While Bulgarian-born musician Mira Aroyo was working on her Ph.D. in genetics at Oxford University in 1999, she joined up with the other three members of the British electronic outfit Ladytron. The group has collaborated with such bands as Nine Inch Nails and toured with Franz Ferdinand. And Aroyo has collaborated with other molecular geneticists to produce several papers on chromosome segregation.

• Greg Graffin, Bad Religion: Greg Graffin, frontman for punk-rock band Bad Religion, has a Ph.D. in zoology from Cornell University. His thesis, "Monism, Atheism and the Naturalist Worldview: Perspectives from Evolutionary Biology," became the basis for a book. He has lectured on life sciences and paleontology at the University of California at Los Angeles. "Graffin spends his days on campus," UCLA magazine noted in 2007, "then at around 5:00 heads to the band's Hollywood studio."

• Art Garfunkel, Simon & Garfunkel: Art Garfunkel earned his master's degree in mathematics at Columbia University in 1967. He began Ph.D. work in math but never finished. Childhood friends Paul Simon and Garfunkel parted ways in the early 1970s, for what was meant to be a brief break. In 1971, the same year the eponymous folk rock duo won a Grammy for album of the year, Garfunkel briefly taught geometry to prep schoolers in Connecticut.