This is kind of a follow up to this question. Consider the sample code:
\documentclass{minimal}
\begin{document}
A text with an inline equation which is broken in to two parts
but is not wanted right here $v_{initial} = 11111$.
\end{document}
Without any modification, TeX splits the inline formula after the = sign. One can modify the code adding braces around the content of the inline math: ${v_{initial} = 11111}$, then TeX does not split the formula, thus it runs in the right margin and TeX complains with an overfull box.
Now comes LuaTeX and its callback that can alter the paragraph building algorithm (post_linebreak_filter). Would it be possible to add some lua code, triggered when TeX enters an inline math expression, that would see that
11111is "too" short to come up alone in the next linev_{initial}is not that "long" so it could be pushed to the next line without leaving "too much" blank on the line- and that it would be worth adding some glue before the inline math so that the whole inline math would be at the beginning of the second line?

\relpenalty. LaTeX sets it to 500, a larger value would make less desirable a break after the equals sign. – egreg Jan 18 '13 at 14:51$1+1=2$. – cjorssen Jan 18 '13 at 15:52