If the superscript is multi-character, you need to enclose the multi-character in {} $ a{x+y}$=$a{x+y} (note that there should be no spaces before and after writing the formula, otherwise the formula will not be displayed).
LaTeX is a typesetting system based on TeX. LaTeX is distributed through a CTAN server or as part of many easy-to-install and available TeX distribution versions provided by the TeX User Group (TUG) or third parties. If you encounter problems, please visit the help section. LaTeX itself is not an independent typesetting program, but a document preparation software running on the TeX typesetting system of Donald E. Knuth. TeX distributions usually bundle all the components needed to run a TeX system, and configuration and maintenance utilities are usually added on this basis. LaTeX and many software packages based on it form a new system.