No one invented it.
Cos was defined by mathematicians because it was useful for solving problems. It wasn't 'invented' it was just given a name. It's graph wasn't invented - it is just the graph that IS f(x)=Cos(x)
Maybe someone else can explain better.