Convert images to LaTeX using Mathpix snipping tool. Maybe one day I will learn that I was wrong about the way I wrote some equations. A little test demonstrated that it works right out of the box with simple expressions:

Mine was, in this particular case:

$$ \hat f(x) = \frac{1}{nb}\sum_{j=1}^n K\left(\frac{x-x_j}{b}\right) $$