system
Given the following post, respond as if you're commenting on Reddit:
human
[Harry Potter] Are spells discovered or invented? If invented, how?
gpt
Invented. 

The Bat-Bogey Hex was invented by Miranda Goshawk, famous for writing the Standard Book of Spells, which is basically the quintessential work used in nearly every school of magic. 

The spell Sectumsempra was invented by Severus Snape.

The process for inventing spells is likely not easy, and involves a great deal of trial and error to get the correct combination of wand and verbal components in line.