welcome to the forum!
This would be the LaTeX code:
\[ x = 2 \left(2^{\frac{a-1}{2}} + 2^{\frac{a+1}{2}}\right) - 4 \]
Would you like to learn LaTeX? An excellent quick start is LearnLaTeX.org, see for example the Math Lesson.
Stefan
\[ x = 2 \left(2^{\frac{a-1}{2}} + 2^{\frac{a+1}{2}}\right) - 4 \]
nonfloat
package has such a command.\par\textit{Poem \themypoem. #1}
or comment it out.\ensuremath
command for your macros: latex2e.org/_005censuremath.html