0

I was trying to type the following equation, which 2 conditions answer for P(t). However, I don't get what I want. I do appreciate it if someone could please help me. I also required a single equation number for this equation as shown.

\begin{equation} \label{eq31} \begin{aligned}P(t) &= \!\begin{aligned}\Big\{[A(t)-B(t)].\Delta t] &\forall t, when A(t)>B(t) \\ {} 0 \forall t when A(t)\leq B(t) \end{aligned} \\ \end{aligned} \end{equation} [equation]

yo'
  • 51,322
Kam
  • 1

1 Answers1

3

The environment cases from amsmath is made to write such conditions.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation} \label{eq31} 
P(t) = \begin{cases}
    [A(t)-B(t)].\Delta t] & \text{when } A(t)>B(t) \\ 
    0                     & \text{when } A(t)\leq B(t)
\end{cases}
\end{equation}
\end{document}
Vincent
  • 20,157