# Error "! Missing } inserted. <inserted text> } l.34 \end{align*}"

I don't understand what went wrong:

\begin{questions}
\question[10]
Evaluate the limit:
$$\lim_{x\rightarrow 0}\frac{8\sin^2(x)}{1-\cos(x)}$$
\begin{solution}
\begin{align*}
$$=&\lim_{x\rightarrow 0}\frac{8\sin^2(x)}{1-\cos(x)}$$ \\
$$=&\lim_{x\rightarrow0}\frac{8\sin^2(x)}{1-\cos(x)}\times\frac{1+\cos(x)}{1+\cos(x)}$$ \\
$$=&\lim_{x\rightarrow 0}\frac{4\sin^2(x)(1+\cos(x))}{1-\cos^2(x)}$$ \\
$$=&\lim_{x\rightarrow 0}\frac{4\sin^2(x)(1+\cos(x))}{\sin^2(x)}$$ \\
$$=&\lim_{x\rightarrow 0}4(1+\cos(x))$$ \\
$$=&4(1+\cos(0))$$ \\
$$=&4(1+1)=8$$ \\
\end{align*}
\end{solution}


And it prints out aligned but with weird text all the way on the right side.

Thank you so much

• $$...$$ is deprecated anyway, but definitely wrong inside of align* -- just omit it, you're using 'display math' already with align*
– user31729
Dec 14 '17 at 1:23

Your problem are the  in the align section. Also, your code is not complete/compilable. But, I think you want something like this. \documentclass{exam} \usepackage{amsmath} \begin{document} \printanswers \begin{questions} \question[10] Evaluate the limit: $\lim_{x\rightarrow 0}\frac{8\sin^2(x)}{1-\cos(x)}$ \begin{solution} \begin{align*} &=\lim_{x\rightarrow 0}\frac{8\sin^2(x)}{1-\cos(x)} \\ &=\lim_{x\rightarrow0}\frac{8\sin^2(x)}{1-\cos(x)}\times\frac{1+\cos(x)}{1+\cos(x)} \\ &=\lim_{x\rightarrow 0}\frac{4\sin^2(x)(1+\cos(x))}{1-\cos^2(x)} \\ &=\lim_{x\rightarrow 0}\frac{4\sin^2(x)(1+\cos(x))}{\sin^2(x)} \\ &=\lim_{x\rightarrow 0}4(1+\cos(x)) \\ &=4(1+\cos(0)) \\ &=4(1+1)=8 \\ \end{align*} \end{solution} \end{questions} \end{document}  • Replace ... by $...$ and I might upvote :-) Dec 14 '17 at 11:51