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

## Comments

Sort by:

TopNewestShort and Sweet! :) – Snehal Shekatkar · 3 years, 7 months ago

Log in to reply

– Jatin Yadav · 3 years, 7 months ago

Thanks!Log in to reply

\(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\) – Ankit Sultana · 3 years, 2 months ago

Log in to reply

Solve his other question too: Problem without words ! – Pi Han Goh · 3 years, 7 months ago

Log in to reply

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. – Jit Ganguly · 3 years, 7 months ago

Log in to reply

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? – Bhargav Das · 3 years, 7 months ago

Log in to reply

– Jatin Yadav · 3 years, 7 months ago

Hi, Bhargav, you are close, try to use expansion for \(e^x\).Log in to reply

– Bhargav Das · 3 years, 7 months ago

Is the answer \(\pi\)?Log in to reply

– Pranav Arora · 3 years, 7 months ago

I reach the same answer but is it possible to evaluate \(B\)?Log in to reply

\(W0w\) \(£xcellent approach\) – Harsh Soni · 2 years, 4 months ago

Log in to reply

It is an amazing approach to solve such problems. – Deepak Pant · 2 years, 7 months ago

Log in to reply

THANKS. VERY POWERFULL METHOD-CAN BE TACKLED ANY COMPLICATED INTEGRALS LIKE THIS ONE. – Prabir Chaudhuri · 2 years, 8 months ago

Log in to reply

Finally I got it! :) – Pranjal Jain · 2 years, 8 months ago

Log in to reply

Interesting method! – Paramjit Singh · 3 years, 1 month ago

Log in to reply

Easy approach....nice trick... – Prabhat Kumar · 3 years, 2 months ago

Log in to reply

Thanks a ton..! – Avadhoot Khairnar · 3 years, 2 months ago

Log in to reply

Answer is π – Ankit Sultana · 3 years, 2 months ago

Log in to reply

Too beautiful – Rishabh Chhabda · 3 years, 2 months ago

Log in to reply

great..:-) – Lalit Pathak · 3 years, 5 months ago

Log in to reply

-e^{-1} -1 is the ans – Shakir Khatti · 3 years, 6 months ago

Log in to reply

Awesome!! – Balaji Dodda · 3 years, 7 months ago

Log in to reply

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)? – Harshil Patel · 3 years, 7 months ago

Log in to reply

– Jatin Yadav · 3 years, 7 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.Log in to reply

– Saloni Gupta · 3 years, 7 months ago

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