$\int_0^{\infty} e^{-x}\cos xdx\approx \frac{h}{2}\frac{\sinh(h)}{\cosh(h)-\cos h} $

83 Views Asked by At

Using Trapezoidal rule, how to prove that $$\int_0^{\infty} e^{-x}\cos xdx\approx\frac{h}{2}\frac{\sinh(h)}{\cosh(h)-\cos h} $$

The hint: $\sinh(t)=\frac{1}{2}(e^t-e^{-t})$, $\cosh(t)=\frac{1}{2}(e^t+e^{-t})$, $e^{i x}=\cos x+i\sin x$, $$ \sum_{n=1}^\infty \Re e^{(i-1)nh}=\Re \sum_{n=1}^\infty e^{(i-1)nh}$$ and the trapezoidal $$\int_{x_0}^{x_n} f(x)dx\approx \frac{h}{2}[f(x_0)+2(f(x_1)+\cdots+f(x_{n-1}))+f(x_n)]$$ where $h=x_{m+1}-x_m$ for all $m$.

Attempt: If $I$ is the original integral then by using $\cos x = \Re e^{ix}$ $$I= \int_{0}^\infty \Re \ e^{(i-1)x}dx$$ Then if $h>0$ is fixed consider $x_{m}=mh$ for $m\geq 0$, then $x_m\to \infty $ as $m\to \infty$. The idea of this is $$I = \sum_{m=0}^\infty \int_{x_m}^{x_{m+1}}\Re \ e^{(i-1)x}dx =\sum_{m=0}^\infty \Re\int_{x_m}^{x_{m+1}} \ e^{(i-1)x}dx$$ Here I can evaluate the integral or evaluate it using trapezium, but in the second way I don't have the right limits (I mean I should have at least 3 or more intermediate terms) in the integral to make sense on applying the trapezium, and in the first way if I compute the integral directly I will lose the integral so I cannot apply later the trapezium, $$ I\approx \sum_{m=0}^\infty \Re \frac{h}{2} \left( ???\right) $$ any help from here?

1

There are 1 best solutions below

0
On

Summing the geometric series, you have \begin{align*}\require{cancel} &\sum_{j=0}^{\infty}(e^{-(1+i)jh}+e^{-(1+i)(j+1)h})\\ &=(1+e^{-(1+i)h})\sum_{j=0}^{\infty}e^{-(1+i)jh}\\ &=\frac{(1+e^{-(1+i)h})}{(1-e^{-(1+i)h})}\\ &=\frac{(1+e^{-(1+i)h})(1-e^{-(1-i)h})}{(1-e^{-(1+i)h})(1-e^{-(1-i)h})}\\ &=\frac{1-e^{-2h}+e^{-h}(e^{-ih}-e^{ih})}{1+e^{-2h}-e^{-h}(e^{-ih}+e^{ih})}\\ &=\frac{\sinh h-i\sin h}{\cosh h-\cos h} \end{align*} That gives you the term in the RHS, but you also need to bound the error of trapezium rule.