"Whatever," in current slang usage gives a perfect combination of indifference and derision. That's hard to achieve in a single word, but we can probably thank some teen somewhere in 1999 with giving it to us.
Normally, when we use the word ("Whatever you'd like would be fine," for instance) the word -- like most words in most languages -- has a musical quality. It goes from a medium tone ("what")to a higher one ("ev") to a lower ("er").
When used in the derisive sense ("You could do better in algebra." "Whatever.") the tone is different. The word sounds bored. It starts off high ("what") goes lower on the next syllable ("ev") and the tone remains the same on "er."
The teen years are an incubator for language. It's fun to watch. Even more fun to listen.