# Math Help - nonelementary integrals

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 $\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 $f(x)=R'(x)+R(x)g(x)$.

So let's take $\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 $\sin(x)=R'(x)-R(x)\ln x$.

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

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

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

$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 $\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 $\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 $f(x)=R'(x)+R(x)g(x)$.

So let's take $\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 $\sin(x)=R'(x)-R(x)\ln x$.

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

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

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

$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 $\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 $\ln(x)$ isn't a rational function.

But I run into the same issue with $\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 $\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 $f(x)=R'(x)+R(x)g(x). \ \ \ \color{red}(*)$
i think $\color{red} (*)$ is not correct. shouldn't it be $f(x)=R'(x)+R(x)g'(x)$ instead?

5. Originally Posted by NonCommAlg
i think $\color{red} (*)$ is not correct. shouldn't it be $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 $\int e^{x^{2}} dx$.
let's prove a more general claim: if $g(x)$ is a polynomial and $\deg g(x) \geq 2,$ then $\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 $R(x)=\frac{p(x)}{q(x)},$ where $p(x),q(x)$ are some polynomials in $\mathbb{C}[x]$ and $R'(x)+g'(x)R(x) = 1.$ obviously we may assume that $p(x),q(x)$

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

now consider two cases:

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

case 2: $\deg q(x) \geq 1.$ let $q(x)=(x-a)^kq_1(x),$ where $k \geq 1$ and $q_1(a) \neq 0.$ put this in $(1)$ to get: $(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 $x=a$ will give us $p(a)=0$ and so $x=a$ would be a common zero of $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 $f(x)$ and $g(x)$ are rational functions, $\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 $R(x)e^{g(x)}$ where $R(x)$ is a rational function?

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

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

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

$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.
$\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
$\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 $\frac {\sin x}{x}$ and/or $x^{x}$ so that they are in the proper form to use the theorem?

My intuition tells me to use the complex form of $\sin x$ for $\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 $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 $x^{x}$ as $e^{x \ln x}$