Some Remarks on Using Complex-Valued Functions

Consider functions of the form

$\displaystyle f(x) + i g(x),$ (5.3)

where $ x$ is a real variable and $ f,g$ are real-valued functions. For example,

$\displaystyle e^{ix} = \cos(x) + i \sin(x).
$

We observed before that

$\displaystyle \frac{d}{dx} e^{wx} = w e^{wx}
$

hence

$\displaystyle \int e^{wx}dx = \frac{1}{w} e^{wx} + c.
$

For example, writing it $ e^{ix}$ as in (5.2.2), we have

$\displaystyle \int e^{ix} dx$ $\displaystyle = \int \cos(x) dx + i \int \sin(x) dx$    
  $\displaystyle = \sin(x) - i \cos(x) + c$    
  $\displaystyle = -i (\cos(x) + i \sin(x)) + c$    
  $\displaystyle = \frac{1}{i} e^{ix}.$    

Example 5.2.6   Let's compute $ \displaystyle \int \frac{1}{x+i} dx$. Wouldn't it be nice if we could just write $ \ln (x+i) + c$? This is useless for us though, since we haven't even defined $ \ln (x+i)$! However, we can ``rationalize the denominator'' by writing

$ \displaystyle \int \frac{1}{x+i} dx$ $\displaystyle = \int \frac{1}{x+i}\cdot \frac{x-i}{x-i} dx$    
  $\displaystyle = \int \frac{x-i}{x^2+1} dx$    
  $\displaystyle = \int \frac{x}{x^2+1} dx -i \int \frac{1}{x^2+1} dx$    
  $\displaystyle = \frac{1}{2}\ln\vert x^2+1\vert - i \tan^{-1}(x) + c$    

This informs how we would define $ \ln(z)$ for $ z$ complex (which you'll do if you take a course in complex analysis). Key trick: Get the $ i$ in the numerator.

The next example illustrates an alternative to the method of Section 5.2.

Example 5.2.7  

$\displaystyle \int \sin(5x) \cos(3x) dx$ $\displaystyle = \int\left(\frac{e^{i5x} - e^{-i5x}}{2i}\right)\left( \cdot \frac{e^{i5x} + e^{-i5x}}{2}\right)dx$    
  $\displaystyle = \frac{1}{4i} \int \left( e^{i8x} - e^{-i8x} + e^{i2x} - e^{-i2x}\right)dx + c$    
  $\displaystyle = \frac{1}{4i} \left( \frac{e^{i8x}}{8i} + \frac{e^{-i8x}}{8i} + \frac{e^{i2x}}{2i} + \frac{e^{-i2x}}{2i}\right) + c$    
  $\displaystyle = -\frac{1}{4}\left[\frac{1}{4}\cos(8x) + \cos(2x)\right] + c$    

This is more tedious than the method in 5.2. But it is completely straightforward. You don't need any trig formulas or anything else. You just multiply it out, integrate, etc., and remember that $ i^2=-1$.

William Stein 2006-03-15