# Integration trick

Here’s a clever example from Paul Nahin’s new book Inside Interesting Integrals. Suppose you want to evaluate

Since the range of integration is symmetric around zero, you might think to see whether the integrand is an odd function, in which case the integral would be zero. (More on such symmetry tricks here.) Unfortunately, the integrand is not odd, so that trick doesn’t work directly. However, it does help indirectly.

You can split any function f(x) into its even and odd parts.

The integral of a function over a symmetric interval is the integral of its even part because its odd part integrates to zero. The even part of the integrand above works out to be simply cos(x)/2 and so the integral evaluates to sin(1).

## 6 thoughts on “Integration trick”

1. GlennF

Neat trick. Using the same basic trick it follows that for any even function g_e(x) and any odd function g_o(x) that:
$\int_{-1}^{1} \frac{g_e(x)}{\exp(g_o(x)) + 1} \, d x = \frac{1}{2} \int_{-1}^{1} g_e(x) \,d x$

(Which looks hard to believe).

2. Marco Valli

Hi John. I had already spotted that book on Amazon! Sounds interesting…is it worth buying?! Best, Marco

3. Yes, I’d say it’s worth buying.

4. Hey John,

Thanks for mentioning “Inside Interesting Integrals”… Bought it for Christmas. 🙂

Do you know any book like that about differential equations?

5. Thanks. Unfortunately I don’t know of such a book for differential equations. If you write one, let me know. 🙂
{"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": 0, "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": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9683090448379517, "perplexity": 1003.7583953576782}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "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-2017-39/segments/1505818689779.81/warc/CC-MAIN-20170923213057-20170923233057-00647.warc.gz"}