Any scientist will tell you – probably at length, if you're buying the drinks – that as much as they love their career, the day-to-day benchwork can be somewhat repetitive.

It's the eureka moments that make science worthwhile, and such moments are all the sweeter when they're unexpected. What the Dutch call geluk bij een ongeluk ("happiness by accident") and English speakers call serendipity – although when an irritating colleague receives serendipity's blessing, we're more likely to call him or her a jammy bastard.

Happy accidents have a secure place in scientific history. Perhaps the best known example is of Alexander Fleming, who was working at St Mary's Hospital in 1928 when he noticed that a culture of Staphylococcus aureus had become contaminated with mould – and the mould was destroying the bacteria. This chance observation led, ultimately, to the development of penicillin and other antibiotics. Similarly, x-rays, radiation and pulsars – and in a less exotic vein, Velcro, Vaseline and Teflon – all owe their discovery or existence to serendipity.

Now it seems we should consider adding another item to that illustrious list: the rocket. Long held as an exemplar of Chinese technological inventiveness, the rocket – dating from the Sung Dynasty of AD 960-1279 – has changed the face of civilisation. But Frank Winter, working with colleagues from the Smithsonian Institution and Sydney's Powerhouse Museum, claims that the rocket was almost certainly an accidental invention.

For one, Winter and colleagues argue, the Tao alchemists of the Sung period understood combustion in philosophical rather than scientific terms. They had observed, while attempting to synthesise an elixir of eternal life, that some chemical mixtures were explosive. But they interpreted that explosiveness as an interaction between the yin and yang of the elixir's ingredients.

So it's unlikely that the three vital components of the first rocket fuel – saltpeter, sulfur and charcoal – would have been deliberately selected and tested for their explosive potential. That just didn't fit with Tao philosophy.

In fact no one, either in China or the West, ever applied science to early rocket development. Even Newton, with his Third Law of Motion – now recognised as a description of rocket propulsion – didn't make the connection between his law and the Chinese "meteor". It wasn't until the late 19th century, and Konstantin Tsiolkovsky, that the dots were joined, paving the way for modern rocket science.

So, argues Winter, no one can really claim to have "invented" the rocket, because there was never any conscious attempt to create a self-propelled airborne device.

But even if it was an accidental discovery, the rocket is part of a fine, ongoing tradition: a surprising number of present-day scientists have, at one time or another, sailed the good ship Serendip. Take Dr Alex Wild. He's an entomologist, and during his PhD he was sorting through some fossilised ants. One specimen intrigued him, because it didn't belong within any modern ant group. It was unique – and, apparently, extinct. But Alex had other things to be getting on with, so he set the specimen aside.

Then, in 2002, a Google search led Alex to a surprising photograph. Taken in Brazil, the photo showed a creature that looked remarkably like this so-called extinct ant. It was apparently alive and well, although as yet unclassified.

So he headed to South America, and soon enough a bit of poking around by a Paraguayan roadside brought him face-to-antenna with his "extinct" ant. Alex had discovered a new genus, and though tempted to call it Googlaria, in honour of its sort-of co-discoverer, Alex settled on the rather more traditional name of Gracilidris.

Professor Bruce Hood – whom you may recognise from his Royal Institution Christmas Lectures – discovered the "children's gravity error": a cognitive phenomenon that demonstrates how very young children generate simple scientific theories.

Put simply, young children believe that falling objects always fall directly downwards, in a straight line, so they become confused when they see a ball dropped down a sideways slope. Although the ball still falls to the ground, it does not fall directly downwards. To the very young brain that just doesn't compute, and most children won't accept it – they make a "gravity error".

The phenomenon illuminates our understanding of the young brain. As Hood says, "It demonstrates how children generate simple theories to predict the world around them". But Hood discovered it quite by accident: at the time, he was more interested in exploring children's spatial awareness. Their confused response to some of his experiments – in which balls were dropped into twisting tubes – led to Hood's discovery.

Finally, Dr Birgit Draeger, a German phytochemist, experienced scientific serendipity in a most unusual form. In the mid-90s, Dr Draeger was researching betulinic acid: a medicinal chemical from birch tree bark. At the time, to obtain betulinic acid you had to strip the bark away from the birch – and the tree didn't take kindly to such treatment.

But Dr Draeger had a dream one night suggesting that, rather than stripping the bark from the birch, she should look at the bark of the plane tree, where she would find an alternative source of the same chemical.

The clever thing about plane trees is that, unlike birch, they shed their bark naturally. Upon investigation, Dr Draeger found that plane tree bark did indeed contain betulinic acid – 10 times more than in birch bark, in fact.

But there's a rational explanation for this apparently mystical insight. Years before her dream, Dr Draeger had encountered the chemical structure of platantic acid, which is found in plane trees and shares several chemical features with betulinic acid. The two compounds are almost chemical cousins. Her brain had dug out this obscure memory and run with it while she slept.

Dr Draeger's experience illustrates that many such happy "accidents" aren't really accidental at all: rather, they represent an unexpected fruition of underlying thought processes. Serendipity may take us by surprise, but it's still, frequently, a product of our own ability to reason.

This is all the greater justification to celebrate it. As Isaac Asimov said: "The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but "That's funny … "