4

I have the following piecewise functions:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}
K(u) &= \begin{cases}
\frac{1}{2} & -1 \leq u \leq 1  \\
0 & \text{sonst}
\end{cases} \\ \\
K(u) &= \begin{cases}
\frac{3}{4}(1-u^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} \\ \\
K(u) &= \frac{1}{\sqrt{2\pi}}\text{exp}\left(-\frac{1}{2}u^{2} \right) \\ \\
K(u)&= \begin{cases}
\frac{3}{8}(3-5t^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst} 
\end{cases}
\end{align*}
\end{document}

enter image description here

I would like to label each of these functions by placing text to the right of them, in between the two cases. However, so far I've only managed to put text on the same line as the cases.

Thanks!

user2249626
  • 1,653
  • I am a little confused on where you want the text to go. Could you make a mock up of what you are asking for? – dustin Aug 23 '13 at 08:01

2 Answers2

6

Like this?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{align*}
K(u) &= \begin{cases}
\frac{1}{2} & -1 \leq u \leq 1  \\
0 & \text{sonst}
\end{cases} &&\text{This is labelled}\\[\baselineskip]
K(u) &= \begin{cases}
\frac{3}{4}(1-u^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} && \text{This is labelled} \\ \\
K(u) &= \frac{1}{\sqrt{2\pi}}\text{exp}\left(-\frac{1}{2}u^{2} \right) &&\text{This is labelled} \\ \\
K(u)&= \begin{cases}
\frac{3}{8}(3-5t^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} && \text{This is labelled}
\end{align*}
\end{document}

enter image description here

PS: Instead of using \\ \\ for extra line, you can use \\[\baselineskip].

0

Maybe you're looking for this?

\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{tkz-linknodes}
\thispagestyle{empty}

\begin{document}

\parindent=0pt

\begin{center}
  \fbox{%
  \begin{minipage}{10cm}    
        \begin{NodesList}[margin=2 cm]    
       \begin{align}    
     3\left(x^2-\frac{2}{3}\right) &= 4                             \AddNode\\    
       3x^2-2  &= 4                                                 \AddNode\\    
       3x^2    &= 6                                                 \AddNode\\    
       \intertext{\hfil isolate the term with the variable \hfil}
          x^2    &= 2                                                 \AddNode\\    
 \sqrt{x^2}    &= \sqrt{2}                                          \AddNode\\    
      |x|      &= \sqrt{2}                                          \AddNode\\    
       x       &= \pm\sqrt{2}                                       \AddNode
        \end{align}    
 \LinkNodes{expand}%    
 \LinkNodes{$+2$}%    
 \LinkNodes{$\div 3$}    
 \LinkNodes{$\sqrt{\ldots}$}    
 \LinkNodes{$\sqrt{x}=|x|$}    
 \LinkNodes{so that}    
   \end{NodesList}     
  \end{minipage}}

\end{center}


\end{document}

% Encoding : utf8
% Author   : Alain Matthes (2008)
% Engine   : pdfLaTeX (LaTeX only with pdftex >= 1.40)
% Packages : xkeyval, tikz with arrow library, amsmath, etex, ifthen
% Remark   : needs two compilations

I've found this on: http://altermundus.fr/pages/linknodes.html

Torbjørn T.
  • 206,688