3

I'm rendering the following code in Mathjax:

$$\begin{aligned} \|f(a+h)-f(a) - Ah \|

&=\left \|\sum_{k=1}^{n} h_{k} \int_{0}^{1} \left(\partial_{k} f\left(x_{k-1}+t h_{k} e_{k}\right) -\partial_{k} f(a)\right) d t \right \| \\

&\le \sum_{k=1}^{n} |h_{k}|  \int_{0}^{1} \left \| \partial_{k} f\left(x_{k-1}+t h_{k} e_{k}\right) -\partial_{k} f(a)\right \| d t \\

&\le |h|_\infty \sum_{k=1}^{n}   \int_{0}^{1} \left \| \partial_{k} f\left(x_{k-1}+t h_{k} e_{k}\right) -\partial_{k} f(a)\right \| d t \\

&\le |h|_\infty \sum_{k=1}^{n}   \int_{0}^{1} \sup_{t \in [0,1]} \left \| \partial_{k} f\left(x_{k-1}+t h_{k} e_{k}\right) -\partial_{k} f(a) \| d t \\ 

&\le |h|_\infty \sum_{k=1}^{n}   \int_{0}^{1}  \sup_{x \in \mathbb{B}(a, \|h\|_\infty)} \left \| \partial_{k} f\left(x\right) -\partial_{k} f(a)\right \| d t \\

&= |h|_\infty \sum_{k=1}^{n}  \sup_{x \in \mathbb{B}(a, \|h\|_\infty)} \left \| \partial_{k} f\left(x\right) -\partial_{k} f(a)\right \|\end{aligned}$$

I could not understand why "Misplaced &" appears in Mathjax, but this code is rendered well in my LaTex editor.

enter image description here

Could you please help me figure out where is the error in my code? Thank you so much!

2
  • 2
    Welcome! You should remove the empty lines and add a \right before the second \| in `&\le |h|_\infty \sum_{k=1}^{n} \int_{0}^{1} \sup_{t \in [0,1]} \left \| \partial_{k} f\left(x_{k-1}+t h_{k} e_{k}\right) -\partial_{k} f(a) \| d t \`, but this site is not on MathJax (I think).
    – user194703
    Nov 3, 2019 at 3:00
  • Thank you so much @Schrödinger'scat :)
    – Akira
    Nov 3, 2019 at 3:06

1 Answer 1

3

In addition to fixing the two obvious issues which @Schrödinger'scat already pointed out (the inappropriate blank lines and a missing \right qualifier), you may want to get rid of all \left and \right sizing qualifiers: they either don't and shouldn't increase the size of the fences; in the one lone case in which the fence size should be increased, they don't do the job.

Here's how I'd rewrite your six-line equation in a LaTeX (not mathjax) setting.

enter image description here

\documentclass{article}
\usepackage{mathtools,amssymb}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}
\[
\begin{split} 
\norm{f(a+h) - f(a) - Ah}
&= \norm[\bigg]{\sum_{k=1}^{n} h_{k} \int_{0}^{1} \bigl(\partial_{k} f(x_{k-1}+t h_{k} e_{k}) -\partial_{k} f(a)\bigr) \,dt} \\
&\le \sum_{k=1}^{n} \abs{h_{k}} \int_{0}^{1} \norm{\partial_{k} f(x_{k-1}+t h_{k} e_{k}) -\partial_{k} f(a)} \,dt \\
&\le \abs{h}_\infty \sum_{k=1}^{n} \int_{0}^{1} \norm{\partial_{k} f(x_{k-1}+t h_{k} e_{k}) -\partial_{k} f(a)} \,dt \\
&\le \abs{h}_\infty \sum_{k=1}^{n} \int_{0}^{1} \!\sup_{t\in[0,1]} \norm{\partial_{k} f(x_{k-1}+t h_{k} e_{k}) -\partial_{k} f(a)} \,dt \\ 
&\le \abs{h}_\infty \sum_{k=1}^{n} \int_{0}^{1} \!\sup_{x\in\mathbb{B}(a,\norm{h}_\infty)} \norm{\partial_{k} f(x) -\partial_{k} f(a)} \,dt \\
&= \abs{h}_\infty \sum_{k=1}^{n} \sup_{x\in\mathbb{B}(a,\norm{h}_\infty)} \norm{\partial_{k} f(x) -\partial_{k} f(a)}
\end{split}
\]
\end{document}
3
  • 2
    Thank you so much for your help :)
    – Akira
    Nov 3, 2019 at 8:27
  • 1
    @Akira - Incidentally, I noticed that you write |h|_\infty in four instances and \|h\|_\infty in two others. Is this intentional?
    – Mico
    Nov 3, 2019 at 10:01
  • Oh my bad, it's a typo :(. I meant |h|_\infty.
    – Akira
    Nov 3, 2019 at 10:03

You must log in to answer this question.

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