Non-elementary primitive of $xe^x$

115 Views Asked by At

Once I was working on simple integrals, and I decided to break the system by counting the integral. Let $f(x)=xe^x$. Then if we take not $\{x=u;\ e^xdx=dv\}$ but $\{xdx=dv;\ e^x=u\}$. As soon as I did so, the primitive took the form of $$ \int xe^xdx = \sum\limits_{n=2}^{+\infty}(-1)^n\frac{x^n}{n!}e^x + C $$ Can this be considered the right decision?

1

There are 1 best solutions below

1
On

Your answer is:

$$\begin{align}e^x\sum_{n=2}^\infty(-1)^n\frac{x^n}{n!}&=e^x\left(e^{-x}-(1-x)\right)\\ &=1+(x-1)e^x\end{align}$$

The usual integration by parts gives you:

$$e^x(x-1)$$
These two answers differ by a constant, so they can be (and are) both correct.


Technically, this is a risky approach, because what you really get, inductively, is, for any $N$:

$$\begin{align}\int xe^x\,dx &=e^x\sum_{n=2}^N(-1)^n\frac{x^n}{n!} +(-1)^{N+1}\frac{1}{N!}\int x^{N}e^x\,dx\end{align}$$

Now you need to know what it means for $$\frac1{N!}\int x^{N}e^x\,dx$$ to converge to zero, since the integral is an indefinite integral.

It works if you replace all the integrals with: $$I_N(x)=\int_{0}^x t^Ne^{t}\,dt$$

But you still need to know $\frac1{N!}I_N(x)\to 0$ for all $x.$

For any $x\geq 0$ $$0<I_N(x)=\int_0^x t^Ne^t\,dt<x^N\int_0^x e^t\,dt=x^N(e^x-1)$$ So we know $\frac1{N!}I_N(x)\to 0$ as $N\to\infty.$

When $x<0$ then $$|I_N(x)|\leq\int_0^{|x|}|x|^{N}=\frac{|x|^{N+1}}{N+1}$$

So again $\frac{1}{N!}I_N(x)\to 0.$


More generally, if $f_1(x),f_2(x),\dots$ have the property that $f_{n+1}’(x)=f_n(x)$ for all $n$ then:

$$\int f_1(x)e^{-x}\,dx=e^{-x}\sum_{n=2}^N f_n(x) + \int f_N(x) e^{-x}\,dx$$ (I’ve switched to $e^{-x}$ here to remove the alternating signs, but you can get them back easily.)

But if $f_1(x)=\cos x$ you don’t get $$I_N(x)=\int f_N(x)e^{-x}\,dx\to 0.$$

Amusingly, if $f_1(x)=\cos \alpha x$, with $\alpha>1,$ you get $I_n(x)\to 0,$ so you get an infinite series.

$$e^{-x}\sum_{n=1}^{\infty}(-1)^n\alpha^{-2n}\left(\alpha\sin \alpha x-\cos\alpha x\right)\\=\frac{\alpha \sin \alpha x -\cos \alpha x}{1+\alpha^2}e^{-x}$$

The right side is the correct value for any $\alpha,$ but the infinite series doesn’t converge for $|\alpha|\leq 1.$