Complementary Error in LaTeX (\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.
\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
- Bessel J
J_n(x) - Error Function
\text{erf}(x) - Bessel Y
Y_n(x) - Riemann zeta function
\zeta(s) - Modified Bessel I
I_n(x) - Beta function
B(x, y)
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.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث