1. ## nonelementary integrals

There is a theorem that states that if f(x) and g(x) are rational functions (and g(x) is not a constant) , then $\displaystyle \int f(x)e^{g(x)} \ dx$ can be expressed in terms of a finite number of elementary functions iff there exists a rational function R(x) such that $\displaystyle f(x)=R'(x)+R(x)g(x)$.

So let's take $\displaystyle \int \frac{\sin x}{x} \ dx = \int \sin x \ e^{- \ln x} \ dx$

So I have to show that there does not exist a R(X) such that $\displaystyle \sin(x)=R'(x)-R(x)\ln x$.

It's a linear first order differential equation with integrating factor $\displaystyle e^{-x \ln x+x} = x^{-x}e^{x}$

$\displaystyle x^{-x}e^{x}R'(x) - x^{-x}e^{x}\ln x R(x) = x^{-x}e^{x}\sin x$

$\displaystyle \frac{d}{dx} \int \big(x^{-x}e^{x}R(x)\big) = \int x^{-x}e^{x}\sin x \ dx$

$\displaystyle R(x) = x^{x}e^{-x} \int^{x}_{0} t^{-t}e^{t}\sin t \ dt + Cx^{x}e^{-x}$

How do I show that R(x) is not rational? Do I have to show that $\displaystyle \int x^{-x}e^{x}\sin x \ dx$ is nonelementary?

2. Originally Posted by Random Variable
There is a theorem that states that if f(x) and g(x) are rational functions (and g(x) is not a constant) , then $\displaystyle \int f(x)e^{g(x)} \ dx$ can be expressed in terms of a finite number of elementary functions iff there exists a rational function R(x) such that $\displaystyle f(x)=R'(x)+R(x)g(x)$.

So let's take $\displaystyle \int \frac{\sin x}{x} \ dx = \int \sin x \ e^{- \ln x} \ dx$

So I have to show that there does not exist a R(X) such that $\displaystyle \sin(x)=R'(x)-R(x)\ln x$.

It's a linear first order differential equation with integrating factor $\displaystyle e^{-x \ln x+x} = x^{-x}e^{x}$

$\displaystyle x^{-x}e^{x}R'(x) - x^{-x}e^{x}\ln x R(x) = x^{-x}e^{x}\sin x$

$\displaystyle \frac{d}{dx} \int \big(x^{-x}e^{x}R(x)\big) = \int x^{-x}e^{x}\sin x \ dx$

$\displaystyle R(x) = x^{x}e^{-x} \int^{x}_{0} t^{-t}e^{t}\sin t \ dt + Cx^{x}e^{-x}$

How do I show that R(x) is not rational? Do I have to show that $\displaystyle \int x^{-x}e^{x}\sin x \ dx$ is nonelementary?
this is a good question! i just saw it but, considering your last post, i'm not sure if you're still looking for a solution or not?

3. Originally Posted by NonCommAlg
this is a good question! i just saw it but, considering your last post, i'm not sure if you're still looking for a solution or not?
Yes, I would still like a solution. I just thought that the example I gave doesn't apply because $\displaystyle \ln(x)$ isn't a rational function.

But I run into the same issue with $\displaystyle \int e^{x^{2}} dx$.

4. Originally Posted by Random Variable
There is a theorem that states that if f(x) and g(x) are rational functions (and g(x) is not a constant) , then $\displaystyle \int f(x)e^{g(x)} \ dx$ can be expressed in terms of a finite number of elementary functions iff there exists a rational function R(x) such that $\displaystyle f(x)=R'(x)+R(x)g(x). \ \ \ \color{red}(*)$
i think $\displaystyle \color{red} (*)$ is not correct. shouldn't it be $\displaystyle f(x)=R'(x)+R(x)g'(x)$ instead?

5. Originally Posted by NonCommAlg
i think $\displaystyle \color{red} (*)$ is not correct. shouldn't it be $\displaystyle f(x)=R'(x)+R(x)g'(x)$ instead?
Correct. There is a typo at the source the OP referenced the result from (the typo is very old now and was never corrected by the webmaster).

6. thanks mr f.

Originally Posted by Random Variable
But I run into the same issue with $\displaystyle \int e^{x^{2}} dx$.
let's prove a more general claim: if $\displaystyle g(x)$ is a polynomial and $\displaystyle \deg g(x) \geq 2,$ then $\displaystyle \int e^{g(x)} \ dx$ cannot be expressed in terms of a finite number of elementary functions.

suppose otherwise. then there exists a rational function $\displaystyle R(x)=\frac{p(x)}{q(x)},$ where $\displaystyle p(x),q(x)$ are some polynomials in $\displaystyle \mathbb{C}[x]$ and $\displaystyle R'(x)+g'(x)R(x) = 1.$ obviously we may assume that $\displaystyle p(x),q(x)$

have no common zeros. we have $\displaystyle R'(x)=\frac{p'(x)q(x)-p(x)q'(x)}{q(x)^2}.$ thus: $\displaystyle p'(x)q(x)-p(x)q'(x)+g'(x)p(x)q(x)=q(x)^2,$ which gives us: $\displaystyle q(x)[p'(x)-q(x)+g'(x)p(x)]=p(x)q'(x). \ \ \ \ \ (1)$

now consider two cases:

case 1: $\displaystyle \deg q(x)=0$: in this case $\displaystyle R(x)$ would be a polynomial satisfying $\displaystyle R'(x)+g'(x)R(x)=1.$ this is impossible because $\displaystyle \deg(R'(x)+g'(x)R(x)) \geq 1 + \deg R(x) \geq 1.$

case 2: $\displaystyle \deg q(x) \geq 1.$ let $\displaystyle q(x)=(x-a)^kq_1(x),$ where $\displaystyle k \geq 1$ and $\displaystyle q_1(a) \neq 0.$ put this in $\displaystyle (1)$ to get: $\displaystyle (x-a)q_1(x)[p'(x)-q(x)+g'(x)p(x)]=kp(x)q_1(x)+(x-a)p(x)q_1'(x),$ which is impossible

because putting $\displaystyle x=a$ will give us $\displaystyle p(a)=0$ and so $\displaystyle x=a$ would be a common zero of $\displaystyle p(x),q(x).$ contradiction! Q.E.D.

7. I don't understand the case when q(x) is a polynomial of degree zero.

8. Is it equivalent to say that if $\displaystyle f(x)$ and $\displaystyle g(x)$ are rational functions, $\displaystyle \int f(x)e^{g(x)}$ can be expressed in terms of a finite number of elementary functions iff it's antiderivative is of the form $\displaystyle R(x)e^{g(x)}$ where $\displaystyle R(x)$ is a rational function?

Because then $\displaystyle \int f(x)e^{g(x)} = R(x)e^{g(x)}$

$\displaystyle \frac{d}{dx} \int f(x)e^{g(x)} = \frac{d}{dx} R(x)e^{g(x)}$

$\displaystyle f(x)e^{g(x)} = R'(x)e^{g(x)} + R(x)g'(x)e^{g(x)}$

$\displaystyle f(x) = R'(x) +R(x)g'(x)$

9. Originally Posted by Random Variable
I don't understand the case when q(x) is a polynomial of degree zero.
$\displaystyle \deg(R'(x) + g'(x)R(x))=\deg(g'(x)R(x)) = \deg g'(x) + \deg R(x) \geq 1 + \deg R(x) \geq 1.$

10. Originally Posted by NonCommAlg
$\displaystyle \deg(R'(x) + g'(x)R(x))=\deg(g'(x)R(x)) = \deg g'(x) + \deg R(x) \geq 1 + \deg R(x) \geq 1.$
Thanks.

Is it possible to write $\displaystyle \frac {\sin x}{x}$ and/or $\displaystyle x^{x}$ so that they are in the proper form to use the theorem?

My intuition tells me to use the complex form of $\displaystyle \sin x$ for $\displaystyle \frac{\sin x}{x}$. But then I have the difference of two functions of the proper form.

I have no idea what to do with $\displaystyle x^{x}$. Unless my understaning of the definition of a rational function is incorrect (namely that a rational function is function that can be written as the quotient of two polynomials) I can't writex $\displaystyle x^{x}$ as $\displaystyle e^{x \ln x}$