I would like to do x^(2n), however, when I try to do it, it shows up as (x^2) * n, which is not what I want.
How do I do it the correct way?
I would like to do x^(2n), however, when I try to do it, it shows up as (x^2) * n, which is not what I want.
How do I do it the correct way?
You have to put the entire exponent in braces, treat it like the argument of any other LaTeX command. You can get away with (for example) x^2 as a shortcut if you have only one character in your exponent. Otherwise, you need to put the whole thing in { ... }.
So you need x^{2n} or x^{(2n)} if you want the parentheses.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$x^{2n} \quad x^{(2n)}$
\end{document}
Personally, I always put braces around my exponents, because I find it more readable (though others may see it as clutter) and because it's a good habit to get into. It's easy to forget the braces when you do need them otherwise, and it's much more of a pain correcting x^n to x^{2n} than it is with x^{n}. I admit, though, it's a bit more cumbersome.
x^{2n}orx^{(2n)}if you want the parentheses. – Au101 Nov 09 '16 at 17:51\sumand when to write\sum\limits.) – Mico Nov 09 '16 at 17:57x^{...}even if the exponent is a single token. Similarly for subscripts. – egreg Nov 09 '16 at 18:08