0

What's wrong with this?

\begin{equation}
\partial{Q}=\frac{1}{2}\frac{\sum{h_f}}{\sum \left({\frac{h_{fi}}{Q_i}\right)}}
\end{equation}

I keep getting errors.

  • 2
    (1) Welcome, (2) Next time please provide a full minimal example, that others can just copy and use. (3) Please cite the error you get – daleif Jul 20 '16 at 15:36
  • It should be }\right) instead of\right)} (in my opinion, the corresponding pair of braces isn't necessary). – Bernard Jul 20 '16 at 16:13
1

Make sure that you have put the curlybraces at the correct position. Also, the pair causing problems here, doesn't do anything here, so I suggest just removing it.

When there are lots of groups like {} and such, It gets difficult to see the where each group begins and ends. Try to add some space between, to ease the reading. Spaces are ignored in math-mode, so you can use as much as you want.

I have added two suggestions on how you could make it easier to read. The first simply adds some single-spaces here and there, while the other one adds linebreaks and indentation. This is probably overkill fo this example, but for complex formulas and programming, it is really a must. Both of them produces the same ouput.

Output

enter image description here

Code

\documentclass[11pt]{article}
\usepackage{mathtools}
\begin{document}
\begin{equation} 
    \partial{Q} = \frac{1}{2} \frac{ \sum{h_f} }{ \sum \left(  \frac{ h_{fi} }{ Q_i } \right)} 
\end{equation}

\begin{equation}% Same code, just formated for ease of reading. Overkill.
    \partial{Q} = \frac{1}{2} 
        \frac{
             \sum{h_f} }{
                          \sum  \left(
                                    \frac{ h_{fi} }{ Q_i } 
                                \right)
                        } 
\end{equation}
\end{document}
  • My editor checks {} () and []. It's getting \begin \end and \if \fi to match up that gives me problems. Sometime I have to add braces around environments just to find the problem. – John Kormylo Jul 20 '16 at 16:00

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.