4

If you cannot think how to integrate a function $f\left(x\right)$ using techniques like integration by parts etc., would the following work as a general strategy:

  1. Replace $f\left(x\right)$ with its Taylor expansion, $t\left(x\right)$
  2. Integrate $t\left(x\right)$, giving you $T\left(x\right)$
  3. Figure out what $T\left(x\right)$ is the Taylor expansion of, say $F\left(x\right)$
  4. Then $F\left(x\right)$ is the integral of $f\left(x\right)$

As a basic example, the integral of (taylor ($\tan x$)) = taylor ($\int \tan x \, \mathrm{d}x$))

Does anyone use such a method? Or is e.g. step #3 impractical?

PrincessEev
  • 50,606
  • 1
    Try to integrate $\exp(-x^2)$ on some interval $[0,t]$. The method works and yields a powerseries representation for the integral. However it converges horribly slow if $t$ is large. – Nico Zimmer Nov 01 '24 at 22:58
  • 1
    Examples 2, 3, 4 at the end of this Mathematics SE answer may be of interest. Note that obtaining the expansions in these examples doesn't require calculus methods because they are geometric series. – Dave L. Renfro Nov 01 '24 at 23:55

1 Answers1

3

In principle, yes: if $f$ is infinitely-differentiable on the domain of convergence, then you can swap integration and infinite summation.

In fact, this is true for any power series representation of $f$.

So if $$ f(x) = \sum_{n=0}^\infty a_n (x-c)^n $$ then $$ \int_a^b f(x) \, \mathrm{d}x = \sum_{n=0}^\infty a_n \int_a^b (x-c)^n \, \mathrm{d}x = \sum_{n=0}^\infty \frac{a_n}{n+1} \Big( (b-c)^{n+1} - (a-c)^{n+1} \Big) $$ or, with similar domain assumptions, $$ \int f(x) \, \mathrm{d}x = C + \sum_{n=0}^\infty \frac{a_n}{n+1} x^{n+1} $$

This is a fairly common technique for handling integrals. However, it comes with some caveats:

  • Generally, if it is used, it is going to be an approach of last resort unless you don't mind errors. (If error is permissible, you can reduce the restriction that $f$ be infinitely differentiable in the Taylor case, depending on the approach taken.) This is because there is likely a belief that the series that you obtain will not be recognizable as some combination of elementary functions (and in fact many nonelementary functions are simply just integrals of elementary ones by definition).

  • Convergence of the relevant series may not be fast, as mentioned in the comments, which could make it difficult to obtain any good numerical approximations even with software.

  • In fact, the domain of convergence of the power series, and of the original series, may also not match, which can lead to problems in some contexts. For instance, $\frac{1}{1-x}$ is defined for all $x \ne 1$, but its Taylor series $\sum_{n=0}^\infty x^n$ requires $-1 < x < 1$.

Others may have further caveats of note, but these are just the first few that come to mind.

PrincessEev
  • 50,606