Secant in LaTeX (\sec)

sec⁡\sec
LaTeX command
\sec
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Secant, the reciprocal of cosine, as an upright named operator.

\sec\theta = 1/\cos\theta, and its square appears as the derivative of tangent, \frac{d}{dx}\tan x = \sec^2 x. The integral \int \sec x\,dx = \ln|\sec x + \tan x| + C is a classic of calculus courses and of Mercator projection formulas. Typing sec without a backslash leaves italic letters and loses the space before the argument. In geometry, a secant line is a different object, named in words rather than with this command. Like the other trig commands, powers attach directly, \sec^2 x, with the argument after them.

Minimal compilable example

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

∫sec⁡x dx=ln⁡∣sec⁡x+tan⁡x∣+C\int \sec x \, dx = \ln\lvert \sec x + \tan x \rvert + C
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Secant: $\sec$

\[ \int \sec x \, dx = \ln\lvert \sec x + \tan x \rvert + C \]
\end{document}

Related symbols

All علم المثلثات →

Frequently asked questions

How do I write Secant in LaTeX?
Type \sec in math mode, for example $\int \sec x \, dx = \ln\lvert \sec x + \tan x \rvert + C$. It works in plain LaTeX without loading any package.
Which package do I need for \sec?
None. \sec is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \sec in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\sec$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

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

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

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