# tilde in superscript creates unnecessary spaces

I am using tile in math mode but it creates some unnecessary spaces over the variable I am using in superscript mode.

x^{\sim}

• Can you give a compileable example of it creating unnecessary space over the variable? It is not exactly clear what you are referring to. Is it that you want the \sim directly over the variable, or that you want it as a superscript but in some cases (yet to be described) it produces unwanted blank space? – Steven B. Segletes Sep 29 '17 at 10:07
• [ m= x^{\sim}_(n_+_1)_/_2] – Mubee Sep 29 '17 at 10:10
• Steven yes you are right this is what now I am facing – Mubee Sep 29 '17 at 10:11
• Are you looking for \overset{\sim}{x} rather than x^{\sim}? If so, it requires amsmath package. – Steven B. Segletes Sep 29 '17 at 10:13
• Are you looking for \tilde x or perhaps \widetilde x? – Andrew Swann Sep 29 '17 at 10:37

\documentclass{article}
$\overset{\sim}{x}\tilde x\widetilde x$
$\overset{\sim}{\textrm{x}}\tilde{\textrm{x}}\widetilde{\textrm{x}}$