1

In my TeX document, I use a composed function (potential pot/quantum well) and wrote it with this code:

\begin{align*}
    V(x) = \left\{ 
       \begin{matrix} -V_0 \Leftrightarrow -\frac{a}{2} \leq x \leq \frac{a}{2} \\ 
       \\ 
          \ \ \ \ \ \ \  0 \Leftrightarrow x \geq \frac{a}{2} \text{ und } x \leq - \frac{a}{2} 
       \end{matrix} 
       \right.
\end{align*}

I get this

enter image description here

What I want is this

enter image description here

I would appreciate it if someone could help me. Thanks!

1
  • Just out of curiosity: Why do you employ an align* environment here?
    – Mico
    Commented Jan 30, 2019 at 19:29

1 Answer 1

4

The problem is the many \ \ \ \ \ \ \ in your code. But I would suggest using cases instead:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
  V(x) = \begin{cases}
           -V_0, &  -\frac{a}{2} \leq x \leq \frac{a}{2} \\
           0,    &  x \geq \frac{a}{2} \text{ und } x \leq - \frac{a}{2}
         \end{cases}
\end{align*}
\end{document}

cases

BTW, shouldn’t the und be oder? I don’t think you can get x \geq \frac{a}{2} and x \leq - \frac{a}{2} simultaneously (if a>0).

6
  • Thank you very much :) Yes, I corrected with ´\geq´ to ´>´ and ´\leq´ to ´<´, than the ´und´ is right ;)
    – astronerd
    Commented Jan 30, 2019 at 18:26
  • 1
    @astronerd You are welcome. But I was referring to x>1 and x<-1. You cannot have a number that is both greater than 1 and less than -1. In rigorous math language it should be phrased as x>1 or x<-1. In your case, it can be further simplified to \text{otherwise} ;-) Commented Jan 30, 2019 at 18:30
  • The potential V(x) is 0 for x greater a/2 and for x less -a/2. Here is a plot I made (with python, matplotlib): postimg.cc/TpHNNp61
    – astronerd
    Commented Jan 30, 2019 at 18:35
  • 1
    @astronerd Yes, I understand where you’re coming from. The message you’re trying to convey is that V(x) = 0 whenever x is outside of [ -a/2, a/2 ]. What I’m saying is that the word and has special meaning in mathematical logic. When you write -a/2 <= x <= a/2, you are saying x >= -a/2 and x <= a/2. You cannot have x < -a/2 and x > a/2 because this gives you two mutually exclusive statements and the result is empty. The word for this case should be x < -a/2 or x > a/2 with the word or, not and. See, e.g., this answer on Math.SX. Commented Jan 30, 2019 at 18:47
  • 1
    @astronerd Perhaps your intention of using and was to simply list the alternatives as Jyrki Lahtonen commented on that post. But and also acts as logical conjunction (that is, both must be satisfied simultaneously). The former usage is fine, but it can cause ambiguity. Using or is perfectly fine in math literature and I’d argue it’s preferred. ;-) Commented Jan 30, 2019 at 18:55

You must log in to answer this question.

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