The science festival is on in Edinburgh this week so let’s try a little thought experiment. You wake up tomorrow and everyone, including you, has forgotten how to swear. You stub your toe getting out of bed. A driver cuts you up on the way to work. A colleague does something stupid in the office. What do you say? “Oops”? “Deary me”? “Would you mind not doing that please”? Could you really get through life without all those beautiful little four-letter words?

Dr Emma Byrne, who’s appearing at the festival tonight to talk about swearing and the book she’s written about the subject, thinks not. In fact, she thinks that, if we could actually make everyone forget every swear word, it wouldn’t take long for us to invent new ones.

“I would give it a week for us to come up with something else,” says Dr Byrne. “The first time someone dropped something on their foot or was stuck in traffic, they are going to come up with something taboo or emotive.” Swear words are so deep down in our brains and emotions, says Dr Byrne, that removing them would never be possible. The writer and researcher says that instead we should celebrate and enjoy swearing because, even though it can be shocking and inappropriate and upsetting at times, it is also useful and natural. And most importantly, it’s good for us.

The evidence for this assertion is pretty extensive, says Dr Byrne. The research shows, for instance, that swearing can help build teams in the workplace - scientists have shown that teams who share a vulgar lexicon tend to work more effectively together and are more productive than those who don’t. Swearing also helps us deal with stress and withstand pain – in one experiment, it was shown that those who swore while their hand was in ice cold water could keep it there for longer than those who didn’t use swear words. In other words, the volunteers experienced less pain while swearing and the stronger the swear word the stronger the painkilling effect.

Dr Byrne believes this happens because swearing is deep-seated and primal and tells me about US research which showed that chimpanzees taught sign language appeared to spontaneously invent swearing – the sign for “dirty”, for example, became a word that the chimpanzees used emotionally or figuratively in the way that humans might use the word “s**t”. Dr Byrne also believes that swearing would have started very early in man’s history as a way of building tighter social groups.

But what’s really interesting is how swearing has changed since then and how our attitudes to certain swear words have evolved – in some cases words that were once considered swear words have become normalised and words that were once normal have become swear words or taboo. Damn, bloody and Christ have become normal (probably because of the decline in church-going), and so to an extent has f*** which can mean people reaching for something even stronger. It’s a kind of arms-race of swearing.

“That does seem to be what’s happening,” says Dr Byrne. “Ofcom do a study of words that would require a great deal of editorial judgement before they are approved and they survey a lot of people and you can see that the blasphemy thing over the last 20 years completely evaporates. Queer became offensive in the 70s and 80s and then has dropped out of the offensive when it’s used by someone talking about the LGBT community. So it’s not just that things go in one direction; sometimes things can become much more profane and offensive and then become less offensive again as they are reclaimed.”

The word c*** is one of the words that is arguably in the middle of one of these changes. “I remember in the 90s that I would tend to use it, particularly with my male friends, I didn’t think it that strong of a swear word,” says Dr Byrne. “But younger women are noticing that it is used a lot online particularly to shut women up. There is something special about the words that are slurs – they don’t just have an emotional impact, it is very difficult to use a slur affectionately unless you are part of that group.

Dr Byrne says the problem is that younger women are more likely to have been on the receiving end of “c***” as a slur. “I used to use it without thinking,” she says, “but I’ve noticed now, particularly among younger women, you can’t get over the emotional association if you’ve experienced that word tied to being attacked or under threat, even if it’s virtually. It’s impossible for them not to have that emotional reaction.”

However, should this mean us railing back on the use of the word? “There are those feminists, like myself, who would gladly reclaim the word c*** but there are others saying ‘no, it’s been used too long as an oppressive term and I hate it and I never want to hear it’ so it really depends on who your social group is.”

And there’s another interesting feminist angle to swearing, which is that although swear words can help you bond with others and deal with stress, for women there appears to be a danger in swearing that does not exist with men. Studies show that a swearer is judged much more harshly if they are a woman – if a man lets rip with some ripe words, he is likely to be seen as jocular and strong; a woman saying much the same thing, however, is more likely to be seen as unstable. It’s the same cause and effect that sees the word slut as an insult and stud as a compliment.

As a colourful and passionate swearer, Dr Byrne is a bit depressed by these double standards and says what’s worse is that we weren’t always judgmental about women cursing. “It wasn’t always this way,” she says. “During the middle ages, there were some women who were celebrated for their brilliantly inventive rhetoric and yet there was something that changed, largely around the publication of a Victorian pamphlet about how ladies were expected to keep themselves pure and innocent; language was seen as a sort of outward sign of your moral purity and we still carry on those attitudes. And women’s swearing seems to need explaining more – I found a number of papers with titles like Why Do Women Swear? As if somehow it is natural and innate for men to swear but what are women up to?”

However, there is evidence that women are catching up, with the most recent research into public swearing showing that there’s a 45/55 female/male split; there has also been a massive increase in the use by women of “f***” – the use of the word and its variants by women has increased fivefold since the 1990s.

“I think it’s partly because women are exposed to more male-dominated culture in the workforce , particularly places where there’s more manual labour,” says Dr Byrne. “It’s very strange that women have been expected to not swear and be innocent when you consider women are the ones who go through childbirth and are the ones who generally had to deal with the bodily functions of their little ones but we have had this belief that swearing is somehow inappropriate in the home, it’s inappropriate when raising children, but it is appropriate in the workplace. So part of it is just women joining the workforce, you are more likely to hear swearing than you are at home. But I think also it’s the desire to reclaim some of that power of swearing – that realisation that it really means something when you swear. It has an emotional impact that no other language can have.”

Dr Byrne expects that our attitudes, and use of swearing, will continue to change and cautions against getting too uptight about it. She is a great fan of regional and Scottish swearwords for example – “you don’t tend to hear regional swearwords so much on telly which is why when Irvine Welsh uses them in print, you think ‘wow, this is great’,” she says.

Dr Byrne also believes it is best to take a fairly relaxed approach on swearing with our children. Everyone has had to suppress a laugh when a wee one comes out with a swear word, but Dr Byrne believes we should actually be open with children about swearing and even allow them to do it in certain circumstances – the research shows that children who grow up with parents who are prepared to discuss swearing and its appropriate use are much less likely to go on to use it consistently or aggressively or inappropriately. Some parents might be shocked by that but it’s just realism: an acceptance that swearing is here to stay but that we all need to learn to use it well and appropriately. As Dr Byrne puts it: swearing is like mustard: a great ingredient but a lousy meal.

The Amazing Science of Bad Language is tonight at the Dissection Room, Edinburgh, from 5.30pm. For more information, see www.sciencefestival.co.uk. Swearing is Good for You by Emma Byrne is published by Profile at £12.99.