2

how can i write this long equation in beamer

 \mathbb{E}^{x}[f(X_{\tau})]&=f(x)+\mathbb{E}^{x}\left[\int_{0}^{\tau}\left(\sum_{i}u_{i}  (s,\omega)\frac{\partial
f}{\partial
x_{i}}(X_{s})+\frac{1}{2}\sum_{i,j}(v.v^{T})_{i,j}(s,\omega)\frac{\partial^{2}f}{\partial
x_{i}\partial x_{j}}(X_{s}) \right)\diff s \right]

guz when i use align give error told me that Missing of { that's because \right) or \right]

\documentclass{beamer}
     \usepackage{amsmath}
      \usepackage{amssymb}
       \newcommand{\diff}{\mathop{}\mathopen{}\mathrm{d}}
     \begin{document}
    \begin{frame}
        \begin{align*}
    \mathbb{E}^{x}[f(X_{\tau})]&=f(x)+\mathbb{E}^{x}\left[\int_{0}^{\tau}\left(\sum_{i}u_{i}(s,\omega)\frac{\partial
    f}{\partial x_{i}}(X_{s})\\
    &+\frac{1}{2}\sum_{i,j}(v.v^{T})_{i,j}(s,\omega)\frac{\partial^{2}f}{\partial
    x_{i}\partial x_{j}}(X_{s}) \right)\diff s \right] \end{align*}
     \end{frame}
     \end{document}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
Educ
  • 4,362

1 Answers1

4

The standard way to match an unpaired \left<( [ {> and \right<) ] }> is to use \right. or \left.

Here's a complete MWE that demonstrates the idea

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{beamer}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand{\diff}{\mathop{}\mathopen{}\mathrm{d}}
\begin{document}

\begin{frame}
    \begin{align*}
        \mathbb{E}^{x}[f(X_{\tau})] & =f(x)+\mathbb{E}^{x}\left[\int_{0}^{\tau}\left(\sum_{i}u_{i}(s,\omega)\frac{\partial f}{\partial x_{i}}(X_{s})\right.\right.                \\
                                    & \left.\left.+\frac{1}{2}\sum_{i,j}(v.v^{T})_{i,j}(s,\omega)\frac{\partial^{2}f}{\partial x_{i}\partial x_{j}}(X_{s}) \right)\diff s \right] 
    \end{align*}
\end{frame}
\end{document}

Some folks would recommend that you use \bigg instead, or perhaps add a vphantom so that the measuring is exact.

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
cmhughes
  • 100,947
  • 2
    @Educ glad it helped :) your edit is fine, but would have been unnecessary if you had provided a complete MWE- something to remember for the future :) – cmhughes Oct 04 '13 at 19:24
  • Given that the big round paren and square bracket on the second line appear to be much larger than they are on the first line, use of explicit \bigg (or even \Bigg) directives would seem to be indicated. – Mico Oct 04 '13 at 19:36
  • @Mico yes, indeed- or perhaps the vphantom idea I mentioned – cmhughes Oct 04 '13 at 19:47
  • The downside of the \vphantom method is that it tends to clutter up the code. I think it's much easier to simply eyeball the situation and decide that \bigg is the size to go on both lines... – Mico Oct 04 '13 at 20:04