Mathematics often discovers theorems and later, another subject finds out "oh wow, this actually applies to this physics/biology/pharmacology/engineering problem.
For the most part, you wont know when to apply certain formulas until you need to solve an equation and you find out a correlation between a sequence/formula and the problem