I'm trying to align my equations so that the align takes up a fresh line. My code at the moment is  \begin{align} \frac{d}{d x_3}(|\hat R(\omega,x_3)|^2 + |\hat T(\omega,x_3)|^2) &amp;= \frac{d\hat R}{d x_3}\overline{\hat R} + \frac{d \overline {\hat R}}{d x_3}\hat R + \frac{d \hat T}{d x_3} \overline {\hat T} + \frac{d \overline {\hat T}}{d x_3}\hat T \\ \nonumber &amp;+ \hat R \overline{\hat R}(\Delta_{4}-\Delta_1)-\hat{R}^2\overline{\hat R} \Delta_2+\overline{\hat R}\Delta_3 \\ \nonumber &amp;+\hat R \overline{\hat R}(\overline{\Delta_4}-\overline{\Delta_1})-\overline{\hat R}^2\hat{R} \overline{\Delta_2}+\hat R \overline{\Delta_3} \\ \nonumber &amp;- \hat T \overline{\hat T}(\Delta_1+\Delta_2\hat R) \\ \nonumber &amp;- \hat T \overline{\hat T}(\overline{\Delta_1}+\overline{\Delta_2}\overline{\hat R}). \\ \nonumber \end{align}   How can I align this such that the right hand side starts under the derivative? I want to fill the page better. Thanks in advance.
121680
I find that I have unpleasant spacing between the equals sign and (e.g.) the exponential function in this particular case, while using the align environment. I have a long expression which has to be split up in multiple rows. The alignment character &amp; appears to gobble up all space when it comes after the equals sign. How could I remedy this while still preserving the plus sign alignment below?   Ideally, I would like to have the second row from the first equation, and the first row from the second equation.    \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} % bad spacing at first row, but correctly placed second row     2 \cosh t =&amp; e^t \\             &amp;+ e^{-t}  \end{align} \begin{align} % good spacing at first row, but incorrectly placed second row     2\cosh t &amp;= e^t \\             &amp;+ e^{-t}  \end{align} \end{document}
39220
Suppose I have the following code  \begin{subequations}  \begin{align} a+b = c \label{eq.1}\\  d+e = f \label{eq.2} \end{align} \end{subequations}   I want now that upon giving the reference, it should appear as (1a-b). \eqref{eq.1} and \eqref{eq.2} will give output as 1a and 1b not what I want, which is (1a-b).
86921
I want to typeset a proof and want to emphasize what I do in each step e.g. by underbracing an equal-sign when I substitute a variable. In addition I also want to align equal-signs in every line. Unfortunately I don't know how to align an underbraced equal-sign and a non underbraced equal-sign at the same time.    Question: How can I align the underbraced and the non underbraced equal-sign vertically?  \documentclass{report}  \usepackage{amsmath} % Mathe \usepackage{mathtools} % Mathe \usepackage{amsfonts} % Mathesymbole  \begin{document}  \begin{align*}     D(D^TD)^{-1} &amp;\underbrace{=}_{\mathclap{D=B(B^TB)^{-1}}} B(B^TB)^{-1}((B(B^TB)^{-1})^TB(B^TB)^{-1})^{-1} \\       &amp;= B(B^TB)^{-1}(((B^TB)^{-1})^TB^TB(B^TB)^{-1})^{-1} \end{align*}  \end{document}
10375
I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work.  Also I'm using the align environment because I need the aligning functionality. Is there a way to have the size of delimiters automatically adjusted over multiple lines?
62089
I have a problem regarding alignment for my equations.  This dummy program shows the problem:  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{enumerate}     \item First do this     \begin{align}     c^2 &amp;= a^2 + b^2     \end{align}      \item Then do this      \begin{align}     variable &amp;= c^2     \end{align} \end{enumerate}  \end{document}     I would like the = to be aligned under each other, but still be able to list them inside the enumerate.  Any suggestions?
43159
If I type    \begin{enumerate}         \item        \begin{align*}         eqn 1         eqn 2       \end{align*}   \end{enumerate}   the label will appear on the first lines and the equations will appear on subsequent lines. How do I make it so that the equations begin on the same line as the enumerate label? Obviosly, I could manually adjust the location using \vspace and \rule, but is there a better way?
61397
I have a equation that needs to be left aligned within the cases environment. Here's my code so far, which does not work:  \documentclass{article}  \usepackage{amsmath}  \newcommand{\diff}{\mathop{}\!d} \begin{document}  \begin{equation}\label{eq:algin}  \begin{aligned} \begin{cases} u_i^{k+1}(x)=\arg \min_{u} \Bigg\{ {}&amp; \lambda\sum_{i=1}^{N}\int_{\Omega} r_i(x)u_i(x)\diff x  + \frac{\gamma}{2} \sum_{i=1}^{N}\int_{\Omega} \left( u_i(x)-m(x) \right)^2\diff x  + \frac{\mu}{2}\int_{\Omega} \left( u_i(x)-m(x) \right)^2\diff x \Bigg\}, \\ f'(x_{0})=0 \text{ : } z=f(x_{0}) \text{ is de horizontale raaklijn.} \\ \lim_{x\to x_{0}} f'(x)=\pm\infty \text{ : } x=x_{0} \text{ is de verticale raaklijn.} \\ g(x_{0}){R}_{0} \text{ : } z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})   \text{ is de raaklijn.} \end{cases} \end{aligned} \end{equation}  \end{document}    My wrong output is:   I'm trying to get output like this:    This is my expected result    Thanks egreg. I found that when equation is so long (we cut it before), the equation number will automatically locate in bottom. Could we can relocate it in middle?  Code  \documentclass{article}  \usepackage{amsmath,mathtools}  \newcommand{\diff}{\mathop{}\!d} \DeclareMathOperator*{\argmin}{arg\,min}  \begin{document}  \begin{equation} \begin{dcases} u_i^{k+1}(x) \!\begin{multlined}[t] =\frac{-\lambda r_i(x)+\gamma \bigl( r_i(x)+b_i(x)\bigr)+\gamma \bigl( \alpha-\beta\bigr)}{\theta}\\  -\frac{\sigma \bigl( -\lambda\int_{i=1}^N r_i(x) \diff x + \sigma\sum_{i=1}^N \bigl( r_i(x)-b_i(x)\bigr) +\gamma N \bigl( 1-r_i(x)\bigr)\bigr)}{\gamma\bigl( \sigma N -1\bigr)}, \end{multlined} \\[1ex] f'(x_{0})=0 : z=f(x_{0}) \text{ is de horizontale raaklijn.} \\[1ex] \lim_{x\to x_{0}} f'(x)=\pm\infty : x=x_{0} \text{ is de verticale raaklijn.} \\[1ex] g(x_{0}){R}_{0} : z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})   \text{ is de raaklijn.} \end{dcases} \end{equation} This is text \end{document}
29033
The following code does not compile:  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{align}      \eta_{m} = &amp; \omega_{m1}D_{1} + \omega_{m2}D_{2} + \dots + \omega_{mT}D_{T} \\     \eta_{a} = &amp; \omega_{a1}D_{1} + \omega_{a2}D_{2} + \dots + \omega_{aT}D_{T}  \end{align}  \end{document}   However, if I remove empty lines, it does. (Same with equation environment). Why? Why would it be problematic for a code to allow spaces? Convention?   For reference, the error in TexStudio is quite dramatic, for an apparent trivial issue:  line 7: Paragraph ended before \align was complete. line 7: Missing $ inserted. line 7: Missing \endgroup inserted. line 7: Display math should end with $$. line 8: Misplaced alignment tab character &amp;. &amp; line 8: Missing $ inserted. &amp; \omega line 9: Misplaced alignment tab character &amp;. &amp; line 10: Missing $ inserted. line 11: Misplaced \cr. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Extra }, or forgotten \endgroup. \end{align} line 11: Missing $ inserted. \end{align} line 11: Display math should end with $$. \end{align}   NOTE: I am aware of , , and  question. But none of them explains why empty lines are problematic (besides a trivial and rather tautological answer like "the code does not allow it").
60318
I'd like to put one symbol over another? There are some similar things in math, like $\binom{a}{b}$, but I don't want the parentheses, or $\frac{a}{b}$ without the division line.  The closest I've found is $\overset{a}{b}$ (from mathtools) but the a ends up smaller than the b.
83317
I am fairly new to TeX and need to create my math assignment with TeX.  I have succeeded aligning all my calculations with the use of \begin{align*} and \intertext{}, however in my document i have sections and subsections and if I \end{align*} and begin after the sections or subsections the alignment is off.  I have gone through google but all I can find is about \begin{equation} and has no mentioning of sections nor graphics.  How do I (if it is possible) make the alignment through the entire document?  Example:  \section{Opgave 1}  \subsection{a) Beregn arealet, der begrænses af kurven for $f(x) = x^{3}$, x-aksen og linjerne $x = -1$ og $x = 1$.} \begin{align*} % This \intertext{Først beregnes det bestemte integrale imellem $x = 0$ og $x = 1$:} \int_0^1 x^{3}\ dx &amp;= 0.25\\ \intertext{Da den er symetrisk omkring 0 kan vi tage det dobbelte areal:} 0.25 \cdot 2 &amp;= 0.50\\ \end{align*}  \begin{center} \includegraphics[width=100mm]{opg1graph.png}\\ Opg. 1, a) \end{center}  \pagebreak  \subsection{b) Bestem arealet af den lukkede figur, der dannes af parablen med regneforskriften $f(x) = -x^2 + 2x + 1$ og den rette linje med regneforskriften $g(x) = -0,5x + 1$} \begin{align*} % Is not aligned with this \intertext{Først findes de punkter hvor $g(x)$ afgrænser $f(x)$:} f(x) &amp;= g(x) \\ -x^2 + 2\cdot x + 1 &amp;= -0.5\cdot x + 1 \\ solve(-x^2 + 2\cdot x + 1 &amp;= -0.5\cdot x + 1,x) \\ x &amp;= 0\\ x &amp;= 2.5\\ \intertext{Så tager vi det bestemte integrale imellem $x = 0$ og $x = 2.5$:} \int_0^{2.5} -x^2 + 2x + 1\ dx &amp;= 3.54167 \pagebreak \intertext{Og det bestemte integrale for $g(x)$, for at fjerne arealet under linjen:} \int_0^{2.5} -0.5\cdot x + 1 dx &amp;= 0.9375 \intertext{Nu trækkes arealet under linjen fra:} 3.54167 - 0.9375 &amp;= 2.60417\\ \end{align*}
75226
\documentclass[11pt]{article} \usepackage{xfrac, array, tabu, multirow, graphicx, setspace, dcolumn, tikz} \usepackage[fleqn]{mathtools} %the argument for d specifies the maximum number of decimal places \usepackage[ngerman]{babel} \usepackage[applemac]{inputenc} \begin{document} \begin{align} \bar{x}&amp;=7+(2\times9) + (2\times10) + (4\times11) + (6\times12) + (7\times14)\\  &amp;+(2\times15) + (3\times16) + 17 + 18 + 19\\ \bar{x}&amp;=14  \end{align}  \end{document}   I was looking long and hard for an answer, I believe {alignat*} is capable to do what I want, I just can't figure out how. I want the too long equation to align as follows: 1st and 3rd row the = should be aligned. But I also want the 1st and 2nd row to be aligned where the first + comes in.
71656
\documentclass{article} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document}     \begin{align}         \hat{\alpha} &amp;= \begin{cases}                       \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}},  \,    &amp;\text{if }  \hat{\alpha_1}&gt;0 \, \hat{\alpha_2}&gt;0 \\                      \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+\pi,  \,  &amp;\text{if }  \hat{\alpha_1}&lt;0 \\                      \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+2\pi,   \, &amp;\text{if  }\hat{\alpha_2}&lt;0 \,  \hat{\alpha_1} &gt;0 \\                      \text{undefined}, &amp; \hat{\alpha_2}=0 \, \hat{\alpha_1}=0                 \end{cases}      \end{align}  \end{document}   I need to numbering of this cases but when i put align code , the file not compiling because \par .... what is wrong please help me i attempt every probability to solve this
28166
align environment without any explicit alignments points (given by &amp;) right justifies the equations in the block. They can be left justified by putting &amp; at the beginning of each equation. Is there any way to left justify them without starting &amp;-s? Maybe some special environment or option? It seems to be an extra work to tell the compiler again and again that I want left alignment on each line.
81540
\begin{equation}     \begin{aligned}         [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}]=&amp;c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v}',\mathbf{w}],\\         [\mathbf{v},c\mathbf{w}+c'\mathbf{w}']=&amp;c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v},\mathbf{w}'],     \end{aligned} \end{equation}   In this code, [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}] is not shown in the equation. Is it because of the aligned environment? How to fix it?
57470
What is the way to achieve something between gather and aligned? \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage[utf8]{inputenc}  \begin{document} \begin{gather}     3(a-x) = 3.5x + a - 1 \\     3a - 3x = 3.5x + a -1 \\     a = \frac{13}{4}x - \frac{1}{2}  \end{gather}  \begin{equation}     \begin{aligned}         3(a-x) = 3.5x + a - 1           \\         3a - 3x = 3.5x + a -1           \\         a = \frac{13}{4}x - \frac{1}{2}      \end{aligned} \end{equation} \end{document}  Result:  But... How to achieve something like this? I'd like to keep the centering.  Is this possible somehow?
59966
Here is my code:   \begin{align*} (a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|}  &amp;=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\ &amp;=(a-bx-by)e^{-(x^2+cy^2)} \\ &amp;=f(x,y). \end{align*}   I have a long equation. My question is as follows: I want to isolate the expression   (a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|}   on the first line so that I don't have an equation on the first line and I want this expression left justified with the other lines (that have the equal sign). How can I do this?
115636
I am quite new to TeX. I want that each line in the following equation be centered, but I cannot find how to do it.  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} a &amp; = \frac{M_{20}}{M_{00}} - x^{2}_{c}, \;\;\; b = 2(\frac{M_{11}}{M_{00}} - x_{c}y_{c}), \;\;\; c = \frac{M_{02}}{M_{00}} - y^{2}_{c}, \\ &amp;\quad x_{c} = \frac{M_{10}}{M_{00}}, \;\;\; y_{c} = \frac{M_{01}}{M_{00}}, \\ &amp;\quad M_{ij} = \displaystyle\sum\limits_{x} \displaystyle\sum\limits_{y} x^i y^j I(x,y) \end{split} \end{equation} \end{document}   Also, it would be awesome if I could write "and" after the first line ;)  Thanks in advance