Heaviside step function in LaTeX (H(x))

H(x)H(x)
LaTeX command
H(x)
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Heaviside step function: 0 for negative x and 1 for positive x, switching on at the origin.

The Heaviside step H(x) models a signal switched on at time zero, and its distributional derivative is the Dirac delta: H'(x) = \delta(x). The value at 0 is a convention, commonly 1/2 in Fourier analysis, 1 in control theory, sometimes left undefined. Alternative notations include \theta(x) in physics, u(t) in engineering, and the indicator \mathbf{1}_{x \geq 0}. Define it with a cases environment for clarity. Because H is overloaded with entropy, Hermite polynomials and Hamiltonians, a short definition at first use saves readers confusion. Its Laplace transform is 1/s.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

H(x)={0x<01x≥0H(x) = \begin{cases} 0 & x < 0 \\ 1 & x \geq 0 \end{cases}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Heaviside step function: $H(x)$

\[ H(x) = \begin{cases} 0 & x < 0 \\ 1 & x \geq 0 \end{cases} \]
\end{document}

Related symbols

All Special Functions →

Frequently asked questions

How do I write Heaviside step function in LaTeX?
Type H(x) in math mode, for example $H(x) = \begin{cases} 0 & x < 0 \\ 1 & x \geq 0 \end{cases}$. It works in plain LaTeX without loading any package.
Which package do I need for H(x)?
None. H(x) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use H(x) in text mode, or only in math mode?
Both. H(x) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers