# How can I write equation like this

I want to create an equation like this

\begin{multline*}
Time = a + b * h1(x) + c * h2(x) + d * h3(x) + e * h4(x) \\
where \ \ h\textsubscript{1,2,3,4}(x) =
\Bigg\{
\begin{tabular}{cc}
x  & x > 0 \\
0  & x $\leq$ 0
\end{tabular}
\end{multline*}


it looks like this without equation number

any hints?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline*}
\mathrm{Time} = a + b \times h_1(x) + c \times h_2(x) + d \times h_3(x) + e \times h_4(x) \\
\text{where}\ \ h_{1,2,3,4}(x) =
\begin{cases}
x  & x > 0 \\
0  & x \leq 0
\end{cases}
\end{multline*}
\end{document}


Strongly recommended version

\documentclass{article}
\usepackage{amsmath}
\begin{document}
We have
$\mathrm{Time} = a + b \times h_1(x) + c \times h_2(x) + d \times h_3(x) + e \times h_4(x)$
where
$h_{1,2,3,4}(x) = \begin{cases} x & x > 0 \\ 0 & x \leq 0 \end{cases}$
\end{document}


or

\documentclass{article}
\usepackage{amsmath}
\begin{document}
We have
$\mathrm{Time} = a + b \times h_1(x) + c \times h_2(x) + d \times h_3(x) + e \times h_4(x)$
where
$h_{1,2,3,4}(x) = \begin{cases} x & \text{if x > 0} \\ 0 & \text{otherwise} \end{cases}$
\end{document}


Here there is another proposal. There are many possibilities to better write your formula.

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}

\begin{flalign}
\mathrm{Time} = & \, a + b \ast h_1(x) + c \ast h_2(x) + d \ast h_3(x) + e \ast h_4(x) &\nonumber\\
\mathrm{where} & \,\ h_{1,2,3,4}(x) =
\begin{cases}
x  & x > 0 \\
0  & x \leq 0
\end{cases}
\end{flalign}

\begin{flalign}
\mathrm{Time} = & \, a + b \cdot h_1(x) + c \cdot h_2(x) + d \cdot h_3(x) + e \cdot h_4(x) &\nonumber\\
\mathrm{where} & \,\ h_{1,2,3,4}(x) =
\begin{cases}
x  & x > 0 \\
0  & x \leq 0
\end{cases}
\end{flalign}
\end{document}

• h_1, not h1 etc :-) . I also suspect that * means multiplication. You my suggest to OP that for multiplication usually we not write special symbol (after grammar school at least) – Zarko May 24 '19 at 22:09
• @Zarko I only saw the first image. I am blinded :-) – Sebastiano May 24 '19 at 22:10