Recently I was scrolling through YouTube, and saw the method of complexifying the integral https://m.youtube.com/watch?v=CpM1jJ0lob8. I tried some integrals out and it worked just fine.
However, I tried to take it up a notch, and tried finding.
$$\int \frac{e^x}{\mathrm{cos}x} dx$$
Which didn't work out. My guess was that it didn't work out because the function we are integrating is discontinuous at some points. So my question is under what circumstances can we apply the method of complexifying the integral?
My work:
$$=Re{\int \frac{e^x}{e^{ix}} dx}$$
$$=Re{\int e^{(1-i)x} dx}$$
$$=Re{\frac{e^{(1-i)x}}{1-i}}+c$$
With a little more algebra (and verified through wolphy I get):
$$\frac{1}{2}e^x(\mathrm{sin}x+\mathrm{cos}x)+c$$
Which looks incorrect because it is the same as when I evaluated:
$$\int e^x \mathrm{cos}x dx$$
Answer
The problem is in saying that $\frac{e^x}{\cos(x)}$ is the real part of $\frac{e^x}{e^{ix}}$. In general it is not true that $\text{Re}\left(\frac{z_1}{z_2}\right) = \frac{\text{Re}(z_1)}{\text{Re}(z_2)}$ for $z_1,z_2 \in \mathbb{C}$. Let's take a look at $\frac{e^x}{e^{ix}}$:
\begin{align*}
\frac{e^x}{e^{ix}} &= \frac{e^x}{\cos(x)+i\sin(x)}\\
&= \frac{e^x}{\cos(x)+i\sin(x)} \cdot \frac{\cos(x)-i\sin(x)}{\cos(x)-i\sin(x)}\\
&= \frac{e^x(\cos(x)-i\sin(x))}{\cos^2(x)+\sin^2(x)}\\
&=e^x(\cos(x)-i\sin(x)).
\end{align*}
So in fact $\text{Re}\left(\frac{e^x}{e^{ix}}\right)=e^x\cos(x)\neq \frac{e^x}{\cos(x)}$. Off the top of my head I can't think of how to recognize $\frac{e^x}{\cos(x)}$ as the real part of a complex function. That's not to say it can't be done, but I'm not sure how.
No comments:
Post a Comment