# Using Cauchy's integral formula to calculate an integral

Calculate $\int_0^{2\pi} e^{\cos(x)} \cos(\sin(x)) \; dx$ using Cauchy's integral formula.

I am really confused as I cannot bring the integral of the exercise and Cauchy's integral formula together.

When considering the integral bounds ($0$ to $2\pi$), it seems to me that the integral is calculated on a circle (what Cauchy's integral formula uses, as far as I understand it).

We already introduced line integrals as $$\int_\gamma f(z) \; dz = \int_a^bf(\gamma(t)) y'(t) dt$$ (where $\gamma$ is a path in the complex plane), but the integral provided doesn't look like that one.

Can you please tell me how the integral can be calculated using Cauchy's integral formula?

Consider the function $f(z)=e^{z}$. Using Cauchy's integral formula, you have \begin{align} 1=f(0)&=\frac1{2\pi i}\int_{|z|=1} \frac{e^z}{z} \; dz = \frac1{2\pi}\int_0^{2\pi}e^{e^{ix}}dx\\ &=\frac1{2\pi}\int_0^{2\pi}e^{\cos x +i\sin x}dx=\frac1{2\pi}\int_0^{2\pi}e^{\cos x }e^{i\sin x}dx\\ &=\frac1{2\pi}\int_0^{2\pi}e^{\cos x }(\cos (\sin x)+i\sin(\sin x))dx\\ &=\frac1{2\pi}\int_0^{2\pi}e^{\cos x }\cos (\sin x)dx+\left(\frac1{2\pi}\int_0^{2\pi}e^{\cos x }\sin(\sin x)dx\right)i. \end{align}
It follows that $$\int_0^{2\pi}e^{\cos x }\cos (\sin x)dx=2\pi.$$
• thank you for your answer! Could you please explain your first three steps? (1) Why do you get $z$ as denominator for your first integral (f(0) = $\int\cdots$)? (2) how do you get to $e^{e^{ix}}$ (3) how do you get from $e^{e^{ix}}$ to $e^{cos(x)} e^{i sin(x)}$? – muffel May 9 '14 at 19:42
• Well. (1). It is Cauchy Integral Formula for $z_0=0$. (2). Since $|z|=1$ then $z=e^{ix}$. (3). $e^{e^{ix}}=e^{\cos x +i\sin x}$ – Jlamprong May 9 '14 at 19:49
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 1, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9995817542076111, "perplexity": 318.0196074472749}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-26/segments/1560628000231.40/warc/CC-MAIN-20190626073946-20190626095946-00278.warc.gz"}