Is it a good practice to end a mathematical equation with a comma or a period in a scientific article?
In-line formulas are punctuated as required by the grammar. For displayed formulas there are two conventions: punctuate as required by the grammar; or no punctuation. See if the journal specifies this in their style (most don't). Example
[Jahnke & Emde, Dover Publications]
The practice I'm familiar with is that equations are part of the text, and end with a period if they are the end of the sentence and with a comma or other punctuation mark if the sentence continues and calls for it.