People who have had cats all their lives are probably already well aware of this. Sometimes it just takes somebody else, an expert, to point out the obvious to the rest of the world.
Dogs wag their tails when they are happy. Not to be anthropomorphalistic, but that would be, by all accounts, the best way to describe how that animal is feeling. When cats wag their tails, it does not have the same meaning. In fact, it is just the opposite.
According to Mikkel Becker, writer for Vetstreet.com and animal trainer, that, indeed, is the sign of an unhappy cat. A violent thrashing of the tail would be a strong indicator the cat is, at the very least, upset. When it’s fearful, those comic strip illustrators have it right. Hair stands on end. Tail puffs out. The cat could also tuck its tail close to or underneath the body. Even without an animal behaviorist standing next to you, something probably telling you not to reach out to try and pet that cat. Innately, your own instincts should be able to respond appropriately.
The flip side? When cats tails are raised up and fairly high it means you are liked. Bekker also states that a very happy and excited cat will also have a slight twitch at the end of the tail. Those are some big kudos there from the feline community.
The Lawrenceville-Suwanee Animal Hospital discussed the signals of both cats and dogs and indicates, for cats, the tails alone do not provide the entire answer. It is often only part of the whole story.
What it all really boils down to is fairly simple. Animals, people included, have their own tells about the way they are feeling. Just as a dog may sometimes be both barking and wagging the tail, the individual will have to decide which end to believe under the circumstances.