Posts Tagged ‘Integration’

\displaystyle \int_0^{\pi/2} \frac{1}{\sin x + \sec x} \text{ d}x

Solution

\displaystyle I = \int_0^{\pi/2} \frac{\cos{x}}{\sin{x}\cos{x}+1} \text{ d}x = \int_0^{\pi/2} \frac{2\cos{x}}{2\sin{x}\cos{x}+2} \text{ d}x

\displaystyle = \int_0^{\pi/2} \frac{\cos x - \sin x}{2\sin x \cos x + 2} \text{ d}x + \int_0^{\pi/2} \frac{\cos x + \sin x}{2\sin x \cos x + 2} \text{ d}x

\displaystyle = \int_0^{\pi/2} \frac{\cos x - \sin x}{(\sin x + \cos x)^2 + 1} \text{ d}x - \int_0^{\pi/2} \frac{\cos x + \sin x}{(\sin x - \cos x)^2 - 3} \text{ d}x

Let u = sin x + cos x and v = sin x – cos x,

\displaystyle = \int_1^1 \frac{\text{d}u}{u^2+1} - \int_{-1}^1 \frac{\text{d}v}{v^2-3} = 2 \int_0^1 \frac{\text{d}v}{3-v^2}

\displaystyle = \frac{1}{\sqrt3} \int_0^1 \left(\frac{1}{\sqrt3+v} + \frac{1}{\sqrt3-v}\right) \text{d}v

\displaystyle = \frac{1}{\sqrt3}\left(\log(\sqrt3+v) - \log(\sqrt3-v)\right)\bigg|_0^1

\displaystyle = \frac{1}{\sqrt3} \left(\log(\sqrt3+1) - \log(\sqrt3-1)\right)

\displaystyle = \frac{1}{\sqrt3} \log\frac{\sqrt3+1}{\sqrt3-1}

Done.

I was browsing the net couple days ago and saw this integral. At first it looks quite difficult. I have tried numerous different substitutions and they don’t work. And later I tried using complex number and it seems to work. So, here is my solution.

Solution:

By Euler’s formula, cosine function is the real part of a complex number.

e^{i\theta} = \cos \theta + i \sin \theta

Hence,

\displaystyle \int e^{\cos x} \cos(2x + \sin x) \text{ d}x = \Re \int e^{\cos x} e^{i(2x+\sin x)} \text{ d}x

Re-arrange the exponents we’ll get

\displaystyle = \Re \int e^{\cos x + i\sin x} e^{2ix} \text{ d}x = \Re \int e^{e^{ix}} e^{2ix}\text{ d}x

Now, since

\displaystyle \frac{\text{d}}{\text{d}x} e^{e^{ix}}=ie^{e^{ix}}e^{ix}

We can use integration by parts,

\displaystyle = \Re \; \frac{1}{i} \int e^{ix} \text{ d}e^{e^{ix}}

\displaystyle = \Re \; \frac{1}{i}\left(e^{ix}e^{e^{ix}} - \int e^{e^{ix}}\cdot i e^{ix} \text{ d}x \right)

\displaystyle = \Re \; \frac{1}{i}\left(e^{ix}e^{e^{ix}} - e^{e^{ix}}\right) + C

\displaystyle = \Re \; \frac{1}{i} e^{e^{ix}} \left(e^{ix}-1\right) + C

\displaystyle = \Re \; \frac{1}{i} e^{\cos x + i\sin x} (\cos x + i\sin x - 1) + C

\displaystyle = \Re \; \frac{1}{i} e^{\cos x + i\sin x} (\cos x - 1 + i\sin x) + C

By using the double angle identity of sine and cosine,

\displaystyle = \Re \; \frac{1}{i} e^{\cos x + i\sin x} \left(-2\sin^2 \frac{x}{2} + i2\sin \frac{x}{2} \cos\frac{x}{2}\right) + C

\displaystyle = \Re \; e^{\cos x + i\sin x} \left(2\sin\frac{x}{2}\cos\frac{x}{2} + i\left(2\sin^2 \frac{x}{2}\right)\right) + C

\displaystyle = \Re \; 2\sin\frac{x}{2} \cdot e^{\cos x + i\sin x} \left(\cos\frac{x}{2} + i\sin \frac{x}{2}\right) + C

\displaystyle = \Re \; 2\sin\frac{x}{2} \cdot e^{\cos x + i\sin x} e^{i\frac{x}{2}} + C

\displaystyle = \Re \; 2\sin\frac{x}{2} \cdot e^{\cos x} e^{i\left(\frac{x}{2}+\sin x\right)} + C

\displaystyle = 2 e^{\cos x} \sin\frac{x}{2}  \cos\left(\frac{x}{2} + \sin x\right) + C

So here is the definite integral:

\displaystyle \int_0^{2\pi} \cos^{2022}{x} \text{ d}x

And here is the solution:

The trick here is to use Euler’s formula and the rest is kinda straight forward.

In general, for any natural number n, we have the following,

\displaystyle \int_0^{2\pi} \cos^n{x} \text{ d}x = \int_0^{2\pi} \left(\frac{e^{ix}+e^{-ix}}{2}\right)^n \text{d}x = \frac{1}{2^n}\int_0^{2\pi} \sum_{k=0}^n \binom{n}{k} e^{i(n-k)x}e^{-ikx} \text{ d}x

\displaystyle = \frac{1}{2^n} \sum_{k=0}^n \binom{n}{k} \int_0^{2\pi} e^{i(n-2k)x} \text{ d}x

If n-2k\neq0, then

\displaystyle \int_0^{2\pi} e^{i(n-2k)x}\text{ d}x = \frac{e^{i(n-2k)x}}{i(n-2k)} \bigg|_0^{2\pi} = 0

So, the integral vanishes unless n-2k=0 or n=2k.

If n = 2k, then

\displaystyle \frac{1}{2^n}\sum_{k=0}^n\binom{n}{k}\int_0^{2\pi}e^{i(n-2k)x}\text{ d}x = \frac{1}{2^n}\binom{n}{n/2}2\pi = \frac{\pi}{2^{n-1}}\binom{n}{n/2}

Since the integral vanishes when n is odd, we can rewrite it as the following,

\displaystyle \int_0^{2\pi} \cos^{2n}{x}\text{ d}x = \frac{\pi}{2^{2n-1}}\binom{2n}{n}, \quad\text{for }n\in\mathbb{N}

For example, when n = 1011, then

\displaystyle \int_0^{2\pi} \cos^{2022}{x}\text{ d}x = \frac{\pi}{2^{2021}}\binom{2022}{1011}

Last week I was watching some youtube videos about some Korean undergraduates trying to do the JEE Advanced exam. Apparently this is a highschool exam, an entrance exam for some University or Institution or some sort in India. Some look quite difficult and some are interesting like math contest type questions. I may share them sometimes later. Here is one of the problems.

Divide the numerator and the denominator by (\sqrt{\cos \theta})^5, the integral becomes

\displaystyle I = 3 \int_0^{\pi/2} \frac{\sec^2 \theta}{(1+\sqrt{\tan \theta})^5} \text{ d}\theta

Let

w=1+\sqrt{\tan \theta}, \qquad (w-1)^2 = \tan \theta, \qquad 2(w-1)\text{ d}w = \sec^2 \theta \text{ d}\theta

Then the integral becomes

\displaystyle I = 3 \int_1^{\infty} \frac{2(w-1)\text{ d}w}{w^5} =  6 \int_1^\infty w^{-4}-w^{-5} \text{ d}w

\displaystyle = 6 \left(\frac{w^{-3}}{-3}+\frac{w^{-4}}{4}\right)\bigg|_1^\infty = 6\left(\frac13-\frac14\right) = \frac12

Solving Integral Using Symmetry

Posted: December 9, 2020 in Mathematics
Tags: ,

Saw an integral online this evening on Facebook. It is one of those that you won’t see as an example on regular textbooks but the teacher or prof will throw it on the exam or assignments. Or you will see them on integration bee contest. Here is the problem.

\displaystyle \int_3^5 \frac{\log(x+2)}{\log(-x^2+8x+20)} \text{ d}x

First of all, factorize the expression on the denominator.

-x^2+8x+20 = 20+8x-x^2 = (10-x)(2+x)

Then the integral becomes

\displaystyle \int_3^5 \frac{\log(2+x)}{\log((10-x)(2+x))} \text{ d}x = \int_3^5 \frac{\log(2+x)}{\log(10-x)+\log(2+x)} \text{ d}x

Next, we want to turn the integral into something like this,

\displaystyle \int_{-a}^a \frac{f(x)}{f(x)+f(-x)} \text{ d}x

So we let u = x – 4, and the integral becomes

\displaystyle \int_{-1}^1 \frac{\log(6+u)}{\log(6-u)+\log(6+u)} \text{ d}u

Then, let u = –v,

\displaystyle I = \int_{-1}^1 \frac{\log(6+u)}{\log(6-u)+\log(6+u)} \text{ d}u = \int_{-1}^1 \frac{\log(6-v)}{\log(6+v)+\log(6-v)} \text{ d}v

Final step, since u and v are dummy variables, we add the two integrals together.

\displaystyle 2I = \int_{-1}^1 \text{ d}x = 2 \qquad \therefore I = 1

Remark:

Whenever you see the symmetry in the integral that takes on the following form,

\displaystyle I=\int_{-a}^a \frac{f(x)}{f(x)+f(-x)} \text{ d}x

You will always have

\displaystyle I=\int_{-a}^a \frac{f(x)}{f(x)+f(-x)} \text{ d}x = \int_{-a}^a \frac{f(-x)}{f(x)+f(-x)} \text{ d}x

It can be easily shown algebraically or using a general graph. Then

\displaystyle 2I = \int_{-a}^a \frac{f(x)+f(-x)}{f(x)+f(-x)} \text{ d}x = \int_{-a}^a \text{ d}x = 2a

and hence

I = a

Leibniz Integral Rule states that given a function f(x, t) is continuous and continuously differentiable such as the partial derivatives exist and continuous and both the limit a(x) and b(x) are continuous and continuously differentiable, then

\displaystyle \frac{\text{d}}{\text{d}x} \int_{a(x)}^{b(x)} f(x,t) \text{ d}t = f(x,b(x))\cdot\frac{\text{d}}{\text{d}x}b(x) - f(x,a(x))\cdot\frac{\text{d}}{\text{d}x}a(x) + \int_{a(x)}^{b(a)} \frac{\partial}{\partial x} f(x,t) \text{ d}t

If a(x) and b(x) are both constant functions, then the above formula reduces to the simpler form:

\displaystyle \frac{\text{d}}{\text{d}x} \int_a^b f(x,t) \text{ d}t = \int_a^b \frac{\partial}{\partial x} f(x,t) \text{ d}t

For example:

Let \displaystyle I(a) = \int_0^\infty \frac{\tan^{-1} x - \tan^{-1} ax}{x} \text{ d}x, then

\displaystyle I'(a) = \int_0^\infty \frac{1}{1+(ax)^2} \text{ d}x = \frac{\tan^{-1} ax}{a} \bigg|_0^\infty = \frac{\pi}{2a}

and hence,

\displaystyle I(a) = \int \frac{\pi}{2a} \text{ d}a = \frac{\pi}{2}\log|a|+C

To get rid of the constant C, notice that I(1) = 0, so

\displaystyle I(1) = \frac{\pi}{2} \log 1 + C = C = 0

\displaystyle \therefore I(a) = \frac{\pi}{2} \log |a|

Therefore,

\displaystyle \int_0^\infty \frac{\tan^{-1}x - \tan^{-1}2x}{x} \text{ d}x = I(2) = \frac{\pi}{2} \log 2