My course book bluntly mentions (freely translation without any proof):
Integral functions with the terms $x^{\alpha} \sin(\beta x)$, $x^{\alpha} \cos(\beta x)$ or $x^{\alpha}e^{\beta x}$ ($\alpha, \beta\in \mathbb R$) are elementary if $\beta=0$ or $\alpha\in \mathbb N\cup{0}$.
Unfortunately, I cannot express the function $\int \cos(x) \ln(x) dx$ in any of the forms -- I always get three terms. Is there some elegant way to know whether some function is elementary, not just looking at some constants of certain functions? Could someone explain why the functions in the forms are elementary by which theorems?
References
- I am doing the book alone here, ex. 5 on page 529 for future readers (sorry not English book).
Concerning the last question, if $\beta=0$ then the integrand is just $x^{\alpha}$, which I trust you can integrate. Similarly, if $\alpha=0$ then the integrations are not hard. If $\alpha$ is a positive integer, then you can use integration by parts to reduce the exponent on $x$ by one; repeated application brings the exponent down to zero, and the previous sentence applies.