I am typing some mathematical expression related to 'displaystyle'. This is working well for $\displaystyle\sum_{i=1}^nx_i=1$. But it is not working in the following example :
\documentclass[10pt]{article}
\usepackage{amsmath}
\begin{document}
$P \displaystyle\simeq_p Q$
\end{document}
This gives :

But my desired output is :
Anyone can tell me what is the problem here ?
\simeq_p. Why do you think it should be different? Setting displaystyle doesn't stack symbols as far as I know. – Martin Scharrer Apr 12 '13 at 14:23\stackrelfrom the stackrel package or\undersetfrom the amsmath package for such constructions. Cf. http://tex.stackexchange.com/q/39225/15925 – Andrew Swann Apr 12 '13 at 14:30