# Homework Help: Integral question

1. Jul 23, 2008

### Marin

Hello everybody!

I have a question for you concerning the use of exponentials as an integrating technique :)

Here it is:

consider the integral: Int[a*e^(bx)*sin(cx)] dx - a very elegant solution is to go from R into C, considering sincx = Im{e(icx)} , so

Int[a*e^(bx)*sin(cx)] dx = Im{Int[a*e^(bx)*e(icx)] dx} which can be easily calculated :)

so far so good.

But when I apply this 'technique' to the following integral something goes wrong:

Int(from 0 to pi/2) [ln(sinx)] dx

considering sinx = Im(e^(ix)}, the integral gets to:

Im{Int(from 0 to pi/2) [lne^(ix)] dx} = Im{Int(from 0 to pi/2) [ix] dx} = Im{i/2*x^2}l(from 0 to pi/2)} = Im{i/8*pi^2} = 1/8*pi

Now this result does not correspond to the real one: -ln(2)*pi/2

and the question is, as you might guess, WHY and when can I use such a technique to make the calculations easier :) ?

with best regards, Marin

2. Jul 23, 2008

### Dick

It doesn't work because ln(Im(e^(ix))) is not equal to Im(ln(e^(ix))). Try x=pi/2. The first expression is 0, the second is pi/2.

3. Jul 24, 2008

### Marin

Thanks, Dick!

I think I got it :) so one has to go the hard way