1

Currently I have a a set of equations with nested text in between them using intertext, however I have a problem with the last equation refusing to output (eq:4.3)

\documentclass[10pt]{article}
\usepackage{amsmath}
\setlength{\parskip}{1em}
\setlength{\parindent}{0pt}
\begin{document}
hello123
\begin{subequations}
\renewcommand{\theequation}{\theparentequation.\arabic{equation}}
\begin{align}
\left ( \frac{\partial \rho }{\partial t}+u_{i}\frac{\partial \rho }{\partial x_{j}}\right )+\rho \frac{\partial u_{i} }{\partial x_{i}}&=0 \label{eq:1.1}\\
\rho\left(\frac{\partial u_{i}}{\partial t}+u_{i}\frac{\partial u_{i}}{\partial x_{j}}\right)+\frac{\partial P}{\partial x_{j}}&=\mu\left(\frac{\partial^2 u_{i}}{\partial x_{j}^2}\right)+\rho g \label{eq:1.2}
\end{align}
\end{subequations}

hello123
\begin{subequations}
\renewcommand{\theequation}{\theparentequation.\arabic{equation}}
\begin{align}
u\left(\overrightarrow{r}\right)=\lim_{T \rightarrow \infty}\left(\frac{1}{T}\int_{t}^{t+T} u(\overrightarrow{r},t)dt\right)\label{eq:2.1}
\intertext{hello123}
\left(\overrightarrow{r},t\right)=\lim_{V \rightarrow \infty}\left(\frac{1}{V}\iiint u(\overrightarrow{r},t)dt\right)\label{eq:2.2}
\intertext{hello123}
u\left(\overrightarrow{r},t\right)=\lim_{V \rightarrow \infty}\frac{1}{M}\sum_{m=1}^Mu_n\left(\overrightarrow{r},t\right)\label{eq:2.3}
\end{align}
\end{subequations}
hello123
\par
hello123
\begin{subequations}
\renewcommand{\theequation}{\theparentequation.\arabic{equation}}
\begin{align}
u&=\overline{u}+u' \label{eq:3.1}\\
P&=\overline{P}+P' \label{eq:3.2}
\end{align}
\end{subequations}
hello123
\begin{subequations}
\renewcommand{\theequation}{\theparentequation.\arabic{equation}}
\begin{align}
\rho\left(\frac{\partial\left(\overline{ u_{i}}+u_i'\right)}{\partial t}+\left(\overline u_{i}+u_i'\right)\frac{\partial \left(\overline{ u_{i}}+u_i'\right)}{\partial x_{j}}\right)+\frac{\partial \left(\overline P+P'\right)}{\partial x_{j}}&=\mu\left(\frac{\partial^2 \left(\overline u_{i}+u_{i}'\right)}{\partial x_{j}^2}\right)+\rho g \label{eq:4.1}
\intertext{hello123}
\rho\left(\frac{\partial\left(\overline{ u_{i}}\right)}{\partial t}+\overline u_{i}\frac{\partial \left(\overline{ u_{i}}\right)}{\partial x_{j}}\right)+\frac{\partial \left(\overline P\right)}{\partial x_{j}}&=\mu\left(\frac{\partial^2 \left(\overline u_{i}\right)}{\partial x_{j}^2}\right)+\rho g \label{eq:4.2}
\intertext{hello123}
\rho\left(\frac{\partial\langle u_{i}\rangle}{\partial t}+\left(\langle u_{i}\rangle\langle u_{j}\rangle\right)\frac{\partial}{\partial x_{j}}+\langle u_{i}'u_{j}'\rangle\frac{\partial}{\partial x_{j}}\right )+\frac{\partial \langle P\rangle}{\partial x_{j}}=\mu\triangledown^2\langle u_{i}\rangle-\frac{\partial \langle\tau\rangle}{\partial x_{j}}\label{eq4.3}
\end{align}
\end{subequations}
\end{document}

I recieve the following error message for line 45

\end{align}

enter image description here

The code works perfectly without eq:4.3, so I am assuming it has to do with the length of the equation not being able to align properly?

  • apart from the undefined command you are using align without specifying any alignment points (&) which is always wrong):amsmath has gather and multline environments for non aligned math displays. – David Carlisle Apr 6 '17 at 14:10
3

The error you get say that the macro (control sequence) \triangledown is undefined. It is impossible to see from your screenshot, but if you open the .log file, you'll see that it says

! Undefined control sequence.
<argument> ...}{\partial x_{j}}=\mu \triangledown 
                                                  ^2\langle u_{i}\rangle -\f...
l.51 \end{align}

? 

The last macro before the linebreak is the one that is undefined/unknown, in this case \triangledown.

Add

\usepackage{amssymb}

to fix it.

  • Also, the last equation has no ampersand, and this causes problems with alignment. – Ian Thompson Apr 6 '17 at 14:02
  • @IanThompson Thanks, I didn't really look at the output, just checked that it worked with amssymb. – Torbjørn T. Apr 6 '17 at 14:03
  • Ah thank you so much, I thought I already had amssymb in my preamble. Looks like i was wrong – NashC Apr 6 '17 at 14:06

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.