5

Both integrals can be solved by substitution, and while I am comfortable with that, in both cases I find the method unbearably ugly, mostly because there are hundreds of overtly feasible substitutions (and the corresponding factor the denominator and numerator is multiplied by) a when you look at the integral for the very first time, and so the one that happens to work must be memorised, either by rote or experience using it.

Is there a faster or more aesthetically appealing method of computing these (types of) integrals that 'forces the answer upon you' to a greater extent so that the solution does not require bursts of insight or previous experience, and can be applied generally to many types of awkward trigonometric integrals? Something using complex analysis maybe?

Or am I asking mathematics to be a little too easy on me?

Meow
  • 6,353

5 Answers5

9

I think the simpliest way is$$\int\frac{dx}{\cos x}=\int\frac{\cos x dx}{\cos^2 x}=\int\frac{d(\sin x)}{1-\sin^2 x}=\int\frac{dz}{1-z^2}=\frac{1}{2}\left(\int\frac{dz}{1-z}+\int\frac{dz}{1+z}\right)$$ Now these are easy to calculate. The same method works for the other integral also. Generally if you have a integral like $$\int\frac{dx}{\cos x\cdot F(\sin x)}$$ where $F$ is some nice polynomial ( like product of linear and quadratic factors), then you can use the same trick to convert the integral into the form$$\int\frac{dz}{(1-z^2)\cdot F(z)}$$ and try to solve it using the method of partial fractions.

pritam
  • 10,157
5

There is a standard trick for a number of trigonometric integrals: substitute $z = \tan(x/2)$. By grinding through the trigonometric identities, you can obtain facts like

  • $2\,dz = (1 + z^2)\, dx$
  • $\cos(x) = 2/(1 + z^2) - 1$

and such. This converts your integral into a rational function, and you can apply standard methods to those. (e.g. partial fractions)

2

Another approach may be:

Let we have $\int R(\sin(x),\cos(x))~dx$ wherein $R$ is a rational function respect to $\sin(x), \cos(x)$. Then we have the following substations also: $$R(-\sin(x),\cos(x))\equiv -R(\sin(x),\cos(x))\Longrightarrow t=\cos(x)\\\ R(\sin(x),-\cos(x))\equiv -R(\sin(x),\cos(x))\Longrightarrow t=\sin(x)$$

For other and general cases you can use what @Hurkyl suggested.

Mikasa
  • 67,374
1

Antiderivatives of $1/\sin x$ and $1/\cos x$ are known and usually provided in a table of antiderivatives. See here for instance: http://en.wikipedia.org/wiki/List_of_integrals_of_trigonometric_functions

Julien
  • 44,791
1

I revamp Steven Gubkin's answer at Math Educators SE, based on partial fractions.


Develop a general strategy for integrals of powers of trig functions: If a power is odd, you can use Pythagorean identity and a substitution. If both powers are even, use half angle reduction formulas. For instance, substitute $u = \cos(x)$ in

$\begin{align} = & \int \color{red}{\sin^{2k+1}} && \color{DarkTurquoise}{\cos^m(x)} & \, dx \\ = & \int \color{red}{(1-\cos^2(x))^k} && \color{DarkTurquoise}{\cos^m(x)} & \color{red}{\sin(x)} \, dx\\ = & \int -(1-u^2)^k && \color{DarkTurquoise}{u^m} & \, du \end{align}$

Start with some positive integer examples. Here, you just get a polynomial, so you can integrate by expanding and integrating termwise. Then observe the same strategy works for all integers, you just get rational functions of $u$ if an exponent is negative, which you might have to decompose with partial fractions.

An example of this general strategy is integrating secant !

$$ \begin{align} \int \sec(x) dx &= \int \cos(x)^{-1} dx \qquad \textrm{ (This is an odd power of cosine.)}\\ &= \int \color{BlueViolet}{\cos(x)^{-2}} \qquad \qquad \color{Peru}{\cos(x) \, dx}\\ &=\int \color{DarkOrchid}{(1-\sin^2(x))^{-1}} \quad \, \color{Peru}{\cos(x) \, dx}\\ &=\int \frac{1}{1-u^2} du\\ &=\frac{1}{2}\int \frac{1}{1-u}+\frac{1}{1+u} du\\ &=\frac{1}{2}\left( \ln(1+u) - \ln(1-u)\right)+C\\ &=\frac{1}{2}\ln(\frac{1+\sin(x)}{1-\sin(x)})+C\\ &=\frac{1}{2}\ln(\frac{(1+\sin(x))^2}{\cos^2(x)})+C\\ &=\ln\left| \frac{1+\sin(x)}{\cos(x)} \right|+C\\ &=\ln\left| \sec(x) +\tan(x)\right|+C \end{align} $$

So, integrating secant fits into our more strategy for integrating any function of the form $\sin^n(x)\cos^m(x)$.