Are you willing to give your money to Microsoft? There's the Math input panel included with Windows, and Onenote has ink-to-math as an integrated feature. Of course to properly use either of them, you need a tablet computer with a digitizer pen.
I have not tried this. I have tried a similar product from Notability/MyScript Nebo and discovered that I have less-recognizable handwriting than average, I guess.