1

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
1

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}

enter image description here

| improve this answer | |
  • 2
    Replace $$...$$ by \[...\] and I might upvote :-) – campa Dec 14 '17 at 11:51
  • Thank you very much. It was only part of my document but it is fixed now. Thank you. – RJ Yarwood Dec 14 '17 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.