Complementary Error in LaTeX (\text{erfc}(x))

erfc(x)\text{erfc}(x)
LaTeX command
\text{erfc}(x)
Package
Add to your preamble:\usepackage{amsmath}
Mode
Text and math mode

Where it is used

Complementary error function, 1 - erf(x): the scaled Gaussian tail integral from x to infinity.

\text{erfc}(x) = \frac{2}{\sqrt{\pi}} \int_x^\infty e^{-t^2}\,dt = 1 - \text{erf}(x), and it is the preferred form for small tail probabilities, because computing 1 - \text{erf}(x) numerically loses precision for large x. It gives bit error rates in communications, Q(x) = \frac{1}{2}\text{erfc}(x/\sqrt{2}), and diffusion profiles in heat transfer. The scaled version \text{erfcx}(x) = e^{x^2}\text{erfc}(x) avoids underflow. As with erf, \operatorname{erfc} stays upright in italic contexts and spaces itself correctly, so it is the safer choice. For large x it behaves roughly like e^{-x^2}/(x\sqrt{\pi}).

Minimal compilable example

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

Q(x)=12 erfc(x2)Q(x) = \frac{1}{2}\,\text{erfc}\left(\frac{x}{\sqrt{2}}\right)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Complementary Error: $\text{erfc}(x)$

\[ Q(x) = \frac{1}{2}\,\text{erfc}\left(\frac{x}{\sqrt{2}}\right) \]
\end{document}

Related symbols

All الدوال الخاصة →

Frequently asked questions

How do I write Complementary Error in LaTeX?
Type \text{erfc}(x) in math mode, for example $Q(x) = \frac{1}{2}\,\text{erfc}\left(\frac{x}{\sqrt{2}}\right)$. Load amsmath first with \usepackage{amsmath}.
Which package do I need for \text{erfc}(x)?
\text{erfc}(x) needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
Can I use \text{erfc}(x) in text mode, or only in math mode?
Both. \text{erfc}(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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث