3

I want to typeset the integral

$$ \int{\dfrac{1}{\cos^2\left(5 - \dfrac{3x}{4}\right)}}\,\mathrm{d}x$$

I tried

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
$$ \int{\dfrac{1}{\cos^2\left(5 - \dfrac{3x}{4}\right)}}\,\mathrm{d}x$$
\end{document}

and I get

enter image description here

The integration symbol not high enough. How to typeset this integral?

egreg
  • 1,121,712
minthao_2011
  • 4,534
  • 7
  • 36
  • 61

1 Answers1

6

Option 1

\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class
\usepackage{amsmath}

\begin{document}
\abovedisplayskip=0pt\relax% remove this line in  your production
\[
\int \frac{1}{\cos^2\left(5 - \frac{3x}{4}\right)}\,\mathrm{d}x
\]
\end{document}

enter image description here

Option 2

\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class
\usepackage{amsmath}

\begin{document}
\abovedisplayskip=0pt\relax% remove this line in  your production
\[
\int \frac{1}{\cos^2\left(5 - \frac{3}{4}x\right)}\,\mathrm{d}x
\]
\end{document}

enter image description here

Option 3

Prof. Enrico likes this style I think.

\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class
\usepackage{amsmath}

\begin{document}
\abovedisplayskip=0pt\relax% remove this line in  your production
\[
\int \frac{1}{\cos^2(5 - 3x/4)}\,\mathrm{d}x
\]
\end{document}

enter image description here

Option 4

By Thorsten Donig's comment below.

\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class
\usepackage{amsmath,xfrac}

\begin{document}
\abovedisplayskip=0pt\relax% remove this line in  your production
\[
\int \frac{1}{\cos^2 (5 - \sfrac{3x}{4})}\,\mathrm{d}x
\]
\end{document}

enter image description here

Option ∞

Based on Qrrbrbirlbel's and Egreg's comments below.

\documentclass[preview,border=12pt]{standalone}% change it back to your own document class
\usepackage{amsmath,xfrac}

\begin{document}
\abovedisplayskip=0pt\relax% remove this line in  your production
\begin{gather*}
\int \sec^2\left(5 - \tfrac{3x}{4}\right)\,\mathrm{d}x \\
\int \sec^2\left(5 - \tfrac 3 4 x\right)\,\mathrm{d}x \\
\int \sec^2(5 - 3x/4)\,\mathrm{d}x \\
\int \sec^2\left(5 - \sfrac{3x}{4}\right)\,\mathrm{d}x 
\end{gather*}
\end{document}

enter image description here

David Carlisle
  • 757,742
  • Personally, I prefer the 2nd option. By the way, is \left/\right really needed here? – Manuel Nov 24 '13 at 13:03
  • The space between cos and opening parenthesis looks too big in versions 1 and 2 (due to the use of \left and \right I think)... – cgnieder Nov 24 '13 at 13:03
  • Mathematically, \cos^{-2} is also possible, avoiding the fraction altogether. – Qrrbrbirlbel Nov 24 '13 at 13:06
  • A fourth option would be to typeset the fraction by \sfrac from »xfrac«. – Thorsten Donig Nov 24 '13 at 13:12
  • Either (1) or (3). Option (4) is out of the question, because this is not about cooking. I'd prefer an italic “d”, but this is another matter. Maybe (1) with \frac{3}{4}x. I see you've changed (2) in the meantime: what are \left and \right doing? Nothing at all apart from adding an unwanted spacing. – egreg Nov 24 '13 at 13:22
  • 1
    @Qrrbrbirlbel Unfortunately there's somebody who writes \cos^{-1} to mean the arccosine, so \cos^{-2} would be difficult to interpret. – egreg Nov 24 '13 at 13:23
  • Option ∞.2 is the best, followed by Option 2. Also, the best typeset wouldn't have so many redundant { } 's. – Elements In Space Nov 24 '13 at 13:35
  • @egreg True. Although, I have never seen it outside of my CASIO calculator and calc.exe. – Qrrbrbirlbel Nov 24 '13 at 15:43
  • Quite frankly, interpreting \cos^{-1} x as \arccos x is mathematically pretty reasonable, while \cos^2 x ≡ (\cos x)^2 is more of an ad-hoc hack just to make this often-occuring expression more concise. But mixing both writings would be really confusing; \cos^{-2}x could be interpreted as either \arccos(\arccos x) or (\arccos x)^2 or 1/(\cos x)^2 or even \arcos x / {\cos x}, all of which have different results. – leftaroundabout Nov 24 '13 at 16:14