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?