1

I want to create an equation like this enter image description here

\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 enter image description here

any hints?

4

Your equation

\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}

enter image description here

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}

enter image description here

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}

enter image description here

2

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

enter image description here

\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}
  • 1
    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 at 22:09
  • @Zarko I only saw the first image. I am blinded :-) – Sebastiano May 24 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.