9

How can I evaluate the following integral?

$$I=\int_0^{\pi/2}\frac{\cos{x}}{2-\sin{2x}}dx$$


I tried it with Wolfram Alpha, it gave me a numerical solution: $0.785398$.
Although I immediately know that it is equal to $\pi /4$, I fail to obtain the answer with pen and paper.
I tried to use substitution $u=\tan{x}$, but I failed because the upper limit of the integral is $\pi/2$ and $\tan{\pi/2}$ is undefined.
So how are we going to evaluate this integral? Thanks.

YY Lam
  • 439
  • 1
    You can try the substitution $u = \tan \frac{x}{2}$. This always transforms a rational trigonometric expression into a rational function which you can integrate using partial fractions. – levap Jun 10 '16 at 13:01
  • @levap The disadvantage is that the integral will become very ugly. – Mc Cheng Jun 10 '16 at 13:02
  • 1
    @McCheng Yeah, I know. This is why I did not post it as an answer... In any case I don't find much point in finding clever tricks to calculate integrals that can be reduced to a form from which an algorithmic (admittedly ugly) procedure can be followed. – levap Jun 10 '16 at 13:05
  • $\int_0^a f(x)dx = \int_0^a f(x-a)dx$ – Jester Tran Jun 10 '16 at 13:21
  • @levap Undeniably, the result may look good. Like this one: http://math.stackexchange.com/questions/1820970/how-to-integrate-this-type-of-fractions/1820990#1820990 – Mc Cheng Jun 10 '16 at 14:28

7 Answers7

12

Hint:

Knowing that $\sin2x=2\sin x\cos x$ and $\sin^2x+\cos^2x=1$. The integral can be expressed as

\begin{equation} I=\int_0^{\pi/2}\frac{\cos x}{1+(\sin x-\cos x)^2}\ dx \end{equation}

then use substitution $x\mapsto\frac{\pi}{2}-x$, we have

\begin{equation} I=\int_0^{\pi/2}\frac{\sin x}{1+(\sin x-\cos x)^2}\ dx \end{equation}

Add the two $I$'s and let $u=\sin x-\cos x$.

4

Here is a step by step approach. :)

$$\begin{align} I &= \int_0^{\pi/2}\frac{\cos{x}}{2-\sin{2x}}dx \\ &= \int_0^{\pi/2}\frac{\cos{x}}{2-2 \sin x \cos x}dx \\ &= \int_0^{\pi/2}\frac{\cos{x}}{1+\cos^2 x -2 \sin x \cos x + \sin^2 x}dx \\ &= \int_0^{\pi/2}\frac{\cos{x}}{1+(\cos x - \sin x)^2}dx \\ &= \frac{1}{2} \left( \int_0^{\pi/2}\frac{\cos{x}}{1+(\cos x - \sin x)^2}dx + \int_0^{\pi/2}\frac{\sin{x}}{1+(\cos x - \sin x)^2}dx \right) \\ &= \frac{1}{2} \int_0^{\pi/2}\frac{\cos{x} + \sin{x}}{1+(\cos x - \sin x)^2}dx \\ &= -\frac{1}{2} \int_0^{\pi/2}\frac{d(\cos{x} - \sin{x})}{1+(\cos x - \sin x)^2}\\ &= -\frac{1}{2}\arctan(\cos{x}-\sin{x})|_{0}^{\frac{\pi}{2}} \\ &= \frac{\pi}{4} \end{align}$$

3

I write simplify. $$ =\int\frac{d\sin(x-\pi /4)}{ 2 \sin^2(x-\pi/4) +1 } $$ Before it, use $ u=\pi/2 $ to get numerator $\sin x $ and $\cos x$ is same value.

2

Hint:

1) $\sin 2x=2\sin x \cos x$

2) $\sin x =\frac {2t}{1+t^2}$

$\cos x =\frac {1-t^2}{1+t^2}$

$dx=\frac{2dt}{1+t^2}$

Roman83
  • 17,884
  • 3
  • 26
  • 70
1

There are 5 wonderful solutions already. I want to share with you one more alternative which is long but hopefully interesting.

Using $\sin 2x=2\sin x\cos x$ and multiplying both denominator and numerator by $1-\sin x \cos x$ rewrites$$ I=\frac{1}{2} \int_{0}^{\frac{\pi}{2}} \frac{\cos x+\sin x \cos ^2x}{1-\sin ^{2} x \cos ^{2} x} d x $$ Splitting the numerator into 2 parts and letting respectively $\sin x \mapsto x$ and $\cos x\mapsto x $ yields

$$ \begin{array}{l} \displaystyle I=\frac{1}{2} \int_{0}^{1} \frac{1+x^{2}}{x^{4}-x^{2}+1} d x \\ \displaystyle \quad =\frac{1}{2} \int_{0}^{1} \frac{\frac{1}{x^{2}}+1}{x^{2}+\frac{1}{x^{2}}-1} d x \\ \displaystyle \quad =\frac{1}{2} \int_{0}^{1} \frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^{2}+1} \\ \displaystyle \quad =\frac{1}{2}\left[\tan ^{-1}\left(x-\frac{1}{x}\right)\right]_{0}^{1} \\ \displaystyle \quad =\frac{1}{2}\left[0-\left(-\frac{\pi}{2}\right)\right] \\ \displaystyle \quad =\frac{\pi}{4} \end{array} $$

Lai
  • 20,421
0

Use $$I=\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$$

and $$2I=\int_a^bf(x)dx+\int_a^bf(a+b-x)dx=\int_a^b\left(f(x)+f(a+b-x)\right)dx$$

$$2I=\int_0^{\pi/2}\dfrac{\cos x+\sin x}{2-\sin2x}dx$$

As $\int(\cos x+\sin x)\ dx=\sin x-\cos x,$

let $\sin x-\cos x=u\implies u^2=1-\sin2x$

Can you take it from here?

0

A bit of an alternate solution, together with some motivation.

The first step is the same as in the other solutions: upon substituting $y = \frac{\pi}{2} - x$ we also get that $$I = \int_{0}^{\frac{\pi}{2}}\frac{\sin y}{2 - \sin 2y} dy,$$ and so adding $I$ again we also obtain $$2I = \int_0^{\frac{\pi}{2}} \frac{\cos x + \sin x}{2 - \sin 2x} dx.$$ Nothing new here opposed to the other solutions.

Now observe that the function $$f(x) = \frac{\cos x + \sin x}{2 - \sin 2x}$$ is symmetric for $0 \leq x \leq \frac{\pi}{2}$ about $x = \pi/4$. This makes it intuitive to perform the substitution $z = x - \frac{\pi}{4}$. This way we can 'make' $f$ into an even function, which almost always makes integrations easier. Since $dz = dx$ we find $$2I = \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \frac{\cos\left(z + \frac{\pi}{4}\right) + \sin \left( z + \frac{\pi}{4} \right)}{2 - \sin 2\left(z + \frac{\pi}{4} \right)} dz.$$ Here, using the sum formulas for sine and cosine one can easily verify that $$\cos\left(z + \frac{\pi}{4} \right) + \sin\left( z + \frac{\pi}{4} \right) =\cos z \cos \frac{\pi}{4} - \sin z \sin \frac{\pi}{4} + \sin z \cos \frac{\pi}{4} + \cos z \sin \frac{\pi}{4} = \sqrt{2} \cos z$$ and $\sin 2\left(z + \frac{\pi}{4} \right) = \cos 2z = 1 - 2\sin^2 z.$

In conclusion: $$2 I = \sqrt{2} \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \frac{\cos z}{1 + 2 \sin^2 z} dz.$$ Now it becomes obvious that a $u = \sin z$ substitution will lead us to an answer (with some help of the $\int \frac{1}{1 + x^2} dx = \arctan x + c$ standard integral).