0

Is it possible to carry the modulus sign $| . |$ in two lines. I just put a mwe for a hypothetical example. Thank you for any suggestions.

\documentclass{article}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{equation*}
\begin{split}
\left| \sum_{n=1}^{\infty} (-1)^n (2x+1)^{n} \sin \left( \frac{\pi}{2} x^n \right) \right|&=\left| -(2x+1) \sin \left( \frac{\pi}{2} x \right) + (2x+1)^2 \sin \left( \frac{\pi}{2} x^2 \right) - (2x+1)^3 \sin \left( \frac{\pi}{2} x^3 \right) + (2x+1)^4 \sin \left( \frac{\pi}{2} x^4 \right) \\
&\dots +(-1)^{n-1} (2x+1)^{n-1} \sin \left( \frac{\pi}{2} x^{n-1} \right) +(-1)^n (2x+1)^n \sin \left( \frac{\pi}{2} x^n \right)  \right|  
\end{split}
\end{equation*}
\end{document}
Eureka
  • 1,013

1 Answers1

1

It isn't exactly clear what you intend, but you can use |...| around any inline alignment such as aligned (but not split which has to control the full width of the expression)

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\begin{document}
\footnotesize
\begin{equation*}
\sum_{n=1}^{\infty} (-1)^n (2x+1)^{n} \sin \left( \frac{\pi}{2} x^n \right)
=
\left|
\begin{aligned}
&
 -(2x+1) \sin \left( \frac{\pi}{2} x \right) + (2x+1)^2 \sin \left( \frac{\pi}{2} x^2 \right) - 
(2x+1)^3 \sin \left( \frac{\pi}{2} x^3 \right) + (2x+1)^4 \sin \left( \frac{\pi}{2} x^4 \right) \\
&\dots
 +(-1)^{n-1} (2x+1)^{n-1} \sin \left( \frac{\pi}{2} x^{n-1} \right) +(-1)^n (2x+1)^n \sin \left( \frac{\pi}{2} x^n \right)
\end{aligned}
 \right|  
\end{equation*}
\end{document}
David Carlisle
  • 757,742
  • Thank you. But that's not what I needed. I need the \left| to start after the equal sign and second line to be ended with a \right|. – Eureka Mar 14 '18 at 22:18
  • 1
    well just remove the left and right and use | or \bigl| and \bigr| (and if that's what you meant, it will be a duplicate question, I will find a link) @Fib1123 – David Carlisle Mar 14 '18 at 22:21