# Use of complex numbers in calculus.

Hi, you might have come across:$$\displaystyle \int e^{ax}\cos bx$$ dx,

How do you solve it? You might use integration by parts, and also complex numbers, and I find use of complex numbers interesting!

Say $$A = \displaystyle \int e^{ax}\cos bx$$dx,

and $$B = \displaystyle \int e^{ax}\sin bx$$ dx

Hence, $$A + iB = \displaystyle \int e^{ax} (\cos bx + i \sin bx)$$dx = $$\displaystyle \int e^{ax} (e^{i bx})$$dx

= $$\displaystyle \int e^{(a+ib)x}$$dx

= $$\displaystyle \frac{e^{(a+ib)x}}{a+ib}$$

= $$\displaystyle \frac{e^{(a+ib)x}(a - ib)}{a^2 + b^2}$$

$$\Rightarrow A + iB = z = \displaystyle \frac{e^{ax} (\cos bx + i \sin bx)(a - ib)}{a^2+b^2}$$

Clearly,

$$A = \text{Re}(z) = \displaystyle \frac{e^{ax}}{a^2+b^2} (a \cos bx + b \sin bx)$$

$$B = \text{Im}(z) = \displaystyle \frac{e^{ax}}{a^2+b^2} (a \sin bx - b \cos bx)$$

You can try to find this definite integral:

Problem: $$\displaystyle \int_{0}^{\pi} e^{(\cos x)} \cos(\sin x)$$ dx

Note by Jatin Yadav
4 years, 3 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Short and Sweet! :)

- 4 years, 3 months ago

Thanks!

- 4 years, 3 months ago

$$cos { (\sin { x) } } =\quad ({ e }^{ isinx }+{ e }^{ -isinx })/2\\ { e }^{ cosx }\cos { (\sin { x) } } =\quad ({ e }^{ cosx+isinx }+{ e }^{ cosx-isinx })/2=({ e }^{ { e }^{ ix } }+{ e }^{ { e }^{ -ix } })/2\\ =((1+\frac { { e }^{ ix } }{ 1! } +\frac { { e }^{ i2x } }{ 2! } +...)+(1+\frac { { e }^{ -ix } }{ 1! } +\frac { { e }^{ -2ix } }{ 2! } +...))/2$$

In 2 more steps you will get the answer. The answer in this case is $$pi$$

- 3 years, 11 months ago

Solve his other question too: Problem without words !

- 4 years, 3 months ago

Hi Jatin! Thanks for the great post, but just one thing I was wondering that incorporating i, the complex number, and using the usual laws of Calculus, is it mathematically correct, I mean the laws of calculus is for reals. I may be fundamentally wrong somewhere but I need the answer.

- 4 years, 3 months ago

Awesome article.

By using your method I arrive at a step from where I can't proceed further.

The step is: $$A+iB=\int (e)^{e^{ix}}\,dx$$, where $$A=\int (e)^{(cos x)}cos(sin x)\,dx$$ and $$B=\int (e)^{(cos x)}sin(sin x)\,dx$$.

How to do after this?Precisely,what's the real part?

- 4 years, 3 months ago

Hi, Bhargav, you are close, try to use expansion for $$e^x$$.

- 4 years, 3 months ago

Is the answer $$\pi$$?

- 4 years, 3 months ago

I reach the same answer but is it possible to evaluate $$B$$?

- 4 years, 3 months ago

$$W0w$$ $$£xcellent approach$$

- 3 years, 1 month ago

It is an amazing approach to solve such problems.

- 3 years, 4 months ago

THANKS. VERY POWERFULL METHOD-CAN BE TACKLED ANY COMPLICATED INTEGRALS LIKE THIS ONE.

- 3 years, 5 months ago

Finally I got it! :)

- 3 years, 5 months ago

Interesting method!

- 3 years, 10 months ago

Easy approach....nice trick...

- 3 years, 10 months ago

Thanks a ton..!

- 3 years, 11 months ago

- 3 years, 11 months ago

Too beautiful

- 3 years, 11 months ago

great..:-)

- 4 years, 2 months ago

-e^{-1} -1 is the ans

- 4 years, 2 months ago

Awesome!!

- 4 years, 3 months ago

You came our with a simple and an interesting solution the technique that triggered me was to solve it using By Parts Method but have to admit your approach was far far better than mines Can you tell me how do you get such ideas at and tender age of 15(Just Asking)?

- 4 years, 3 months ago

Hi, solving this integral using complex numbers is well(not very much well though) known. I did not come up with it myself.

- 4 years, 3 months ago

Yeah, actually the same technique's been discussed with us at our insti as well... anyways, it's really good...

- 4 years, 3 months ago