# Something goes wrong after this line but I don't know what

$\begin{split} &( \frac{21! \cdot 2^3}{3! 18! \cdot 4^{18}} + \frac{21! \cdot 2^2}{2! 2! 17! \cdot 5^2 \cdot 4^{17}} \\ & + \frac{21! \cdot 2}{4! 16! \cdot 5^4 \cdot 4^{16}} + frac{21!}{6! 15! \cdot 5^6 \cdot 4^{15}} ) x^{36} \\ &= ( \frac{38138681}{67108864000000} ) x^{36} \end{split}$


Is there anything wrong with it? The log doesn't tell me anything useful. Here is the full file:

\documentclass[letterpaper, 12pt, titlepage]{article}
\usepackage{amsmath}

\begin{document}

\title{MATH 2P81 \\ Assignment \#1}
\date{\today}
\author{Fakaff \\ \texttt{4847653}}
\maketitle

\begin{enumerate}

\item All terms of the expansion will be of the form $\binom{21}{a, b, c} 2^a x^b (x^2)^c$. To
find the coefficient of $x^{36}$, we must first find all sets $\{a, b, c\}$ such that
$a + b + c = 21$ and $a + b + 2c = 36$:

$\{3, 0, 18\}$

$\{2, 2, 17\}$

$\{1, 4, 16 \}$

$\{0, 6, 15 \}$

Plugging these numbers into our formula, we get:

$\begin{split} &( \frac{21! \cdot 2^3}{3! 18! \cdot 4^{18}} + \frac{21! \cdot 2^2}{2! 2! 17! \cdot 5^2 \cdot 4^{17}} \\ & + \frac{21! \cdot 2}{4! 16! \cdot 5^4 \cdot 4^{16}} + frac{21!}{6! 15! \cdot 5^6 \cdot 4^{15}} ) x^{36} \\ &= ( \frac{38138681}{67108864000000} ) x^{36} \end{split}$

Checking in maple by using the \texttt{expand( (2 - (x/5) + (x^2/4 )^21 )} command confirms this result.

\end{enumerate}
\end{document}


You are missing the $s in: Checking in maple by using the \texttt{expand$(2 - (x/5) + (x^2/4 )^21)$} command confirms this result.  and you are also missing a \ in a \frac. The full corrected version is below (I have also added a \left(, \right) parenthesis as those will resize based on the vertical height of enclosing text. The left. and \right. are needed as we need to have a matching \left with a left on the same line. \documentclass[letterpaper, 12pt, titlepage]{article} \pagestyle{myheadings} \markright{Fakaff \hfill MATH2P81 \hfill} \usepackage{amsmath} \begin{document} \title{MATH 2P81 \\ Assignment \#1} \date{\today} \author{Fakaff \\ \texttt{4847653}} \maketitle \begin{enumerate} \item All terms of the expansion will be of the form$ \binom{21}{a, b, c} 2^a x^b (x^2)^c  $. To find the coefficient of$ x^{36} $, we must first find all sets$ \{a, b, c\} $such that$ a + b + c = 21 $and$ a + b + 2c = 36 $:$\{3, 0, 18\}  \{2, 2, 17\}  \{1, 4, 16 \}  \{0, 6, 15 \} $Plugging these numbers into our formula, we get: $\begin{split} &\left( \frac{21! \cdot 2^3}{3! 18! \cdot 4^{18}} + \frac{21! \cdot 2^2}{2! 2! 17! \cdot 5^2 \cdot 4^{17}} \right.\\ & \left. + \frac{21! \cdot 2}{4! 16! \cdot 5^4 \cdot 4^{16}} + \frac{21!}{6! 15! \cdot 5^6 \cdot 4^{15}} \right) x^{36} \\ &= \left( \frac{38138681}{67108864000000} \right) x^{36} \end{split}$ Checking in maple by using the \texttt{expand$(2 - (x/5) + (x^2/4 )^21)$} command confirms this result. \end{enumerate} \end{document}  If you do not want to format the the text within the \expand, and instead wanted the ^ symbol, you could use: Checking in maple by using the \texttt{expand(2 - (x/5) + (x\textasciicircum 2/4 )\textasciicircum 21)} command confirms this result.  The problem is that the text inside \texttt{} contains math notation, hence you need $ characters, as pointed out by @Peter Grill.
Checking in maple by using the $\mathtt{expand( (2 - (x/5) + (x^2/4 )^21 )}$ command confirms this result.

• Thanks. I was under the impression that texttt was for code. But I found out about \verb now so it's all good :) Sep 18, 2011 at 22:57