3

I have an align like this:

\begin{align*}
\sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\
 &= \sqrt{\frac{1}{10}(
    (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 +
     (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 } \\
 &= \sqrt{24.6525}
\end{align*}

However, this goes off the edge of the page. I wanted to create a multiline inside the middle square root symbol, so I tried this:

\begin{align*}
\sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\
 &= \sqrt{\frac{1}{10}(
    \begin{split} (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 + \\
     (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 } \end{split} \\
 &= \sqrt{24.6525}
\end{align*}

but this gives me errors about mismatched curly braces.

Ideally, I would have something exactly like \frac, except which did not draw the horizontal line between it's operands.

1 Answer 1

4

You can use something like:

\sqrt{\frac{1}{10}
\begin{aligned}
  ( & (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 +\\
   & (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 ) 
\end{aligned}
}

This works just like align but is only usable inside math mode.

There's also gathered which works like gather.

1
  • Exactly what I was looking for. Thank you very much :) Commented Sep 21, 2010 at 0:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .