This seems widely considered as bad form within mathematics papers. In some cases, it might not be clear that the previous sentence has ended, particularly if it also ends in mathematical typesetting, or the punctuation itself might be considered as part of the mathematics. This applies more generally, in that one should avoid placing too much mathematics around all punctuation marks. There are also capitilisation considerations, e.g. starting sentences with f(x). As already noted, it's usually very easy (and often desirable) to avoid this situation.