definitely discovered (at first, then people will call it invention after wards). we might not really notice it, but we indeed use math in dealing with our everyday life's situations, problems or decision making. it might appear that we invented it but we really discovered it down deep. think of it this way, there's a man who's trying to figure out a formula for a certain thing, don't you think when he figures that at the end, he'll say eureka! i just discovered something.
so that's why i'll say discovered at first then it's people that will name it as invention after.