I have several (well in this case 2) equations, that I want to align at the equality sign. This is easily done using the align
environment from the amsmath
package. Additionally, I want to have a note to the far right of each equation, which I do with double ampersands (&&
).
My problem is now, what do I do if any of the above-mentioned equations are longer than a single line, i.e. have to be broken up? Right now I have broken them into several environments, but that looks ugly, and not aligned. Any suggestions?
EDIT: I was apparently so hungry that I forgot the MLE, so here it is.
\begin{align*}
Y_{i,k}^{-} = Y_{i-1,k} + &g^0_{k}(Y_{i-1}) \Delta_{i-1,k} + \sum_{j=1}^{d} g^1_{k,j}(Y_{i-1}) \Delta W_{i-1,j} \\&+ \sum_{j_1,j_2=1}^d h_{k,j_1,j_2}(Y_{i-1})(\Delta W_{i-1,j_1}\Delta W_{i-1,j_2}-\Omega_{j_1,j_2}\Delta - A_{i-1,j,k}) && (\mbox{Milstein})
\end{align*}
\begin{align*}
Y_{i,k} &= \begin{cases}
Y_{i,k}^- & \mbox{if } t_{i} \notin \mathcal{I}^k_{arrival} \\
Y_{i,k}^- + Y_{i,k}^- \Delta J_{i,k} & \mbox{if } t_{i} \in \mathcal{I}^k_{arrival}
\end{cases} && (\mbox{Jump})
\end{align*}
\W
is defined with just a code snippet...or is that just a typo? – Steven B. Segletes Sep 1 '17 at 11:11\documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} Y_{i,k}^{-} ={}& Y_{i-1,k} + g^0_{k}(Y_{i-1}) \Delta_{i-1,k} + \sum_{j=1}^{d} g^1_{k,j}(Y_{i-1}) \Delta W_{i-1,j} \\&+ \sum_{j_1,j_2=1}^d h_{k,j_1,j_2}(Y_{i-1})(\Delta W_{i-1,j_1}\Delta W_{i-1,j_2}-\Omega_{j_1,j_2}\Delta - A_{i-1,j,k}) && (\mbox{Milstein}) \\ Y_{i,k} ={}& \begin{cases} Y_{i,k}^- & \mbox{if } t_{i} \notin \mathcal{I}^k_{arrival} \\ Y_{i,k}^- + Y_{i,k}^- \Delta J_{i,k} & \mbox{if } t_{i} \in \mathcal{I}^k_{arrival} \end{cases} && (\mbox{Jump}) \end{align*} \end{document}
– Steven B. Segletes Sep 1 '17 at 11:16\W
was a typo, it was supposed to just beW
. – Nicky Mattsson Sep 1 '17 at 11:47