Consider the following alternative paragraphs containing a line of mathematics. The mathematics is in its own line (thus not in line with the text), e.g., for the sake of emphasis.
This paragraph contains a mathematical expression $$f(x)\to g(c)$$ After the mathematical statement I have not added punctuation.
This paragraph also contains a mathematical expression $$f(x)\to g(x).$$ However, I closed the mathematical statement with punctuation.
Which one is correct? Are there better alternatives? I think the second is correct, though I find the punctuation somehow inappropriate in the mathematical line (one might for example confuse it for a mathematical symbol).
There are two different styles: one with punctuation following displayed formulas, one without. Both are used. Find the one you like, and be consistent. When you are publishing in a journal, there may be a format recommended by that journal.
Do include punctuation after in-line formulas if the grammar suggests it. But (in most cases) do not begin a sentence with a formula.
Advice on writing mathematics:
Halmos, P. R., How to write mathematics, Enseign. Math., II. Sér. 16, 123-152 (1970). ZBL0205.00101.
Halmos prefers displays with punctuation.