# Definite Integral involving natural log

I ran into a problem today that I don't really understand and was hoping someone could help me out. I'm sure it's basic, but I must be missing something from elementary calculus.

I was trying to integrate a probability density function to determine the normalizing constant $c$:

$$f_{XY}(x,y)={{cx^2}\over{y}}$$ for $0<x<y<1$ and $(c>0)$

I can easily find that $c=9$ when I compute the inner most integral with respect to $x$ first and the outer most integral with respect to $y$. However, To check my work, I reversed the order of integration and stumbled into a problem: toward the end of my solution I find that I'm needing to evaluate $\int_{0}^{1}x^{2}\log(x)dx=\frac{1}{3}x^{3}\ln(x)\left|_{0}^{1}\right.-{1\over{9}}$ after performing $u$,$v$ substitution. The upper bound of this can clearly be calculated and it evaluates to $0$, but I'm finding that the lower bound should be undefined since $log(0)$ is undefined. What am I missing? It this because the bound of support is strictly less than $1$ so for the lower bound I should be really evaluating $\lim_{x\to 0}\frac{1}{3}x^{3} \ln(x)=0$?

Thanks.

## migrated from stats.stackexchange.comMay 7 '17 at 21:00

This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.

• You don't have the correct evaluation of the integral. You are missing a term. Also I don't see how the result helps you since the density requires integrating out both x and y over the appropriate region of integration. – Michael Chernick May 7 '17 at 21:00
• @MichaelChernick, you may have misunderstood the post -- I could have been clearer. The integral is after having taking the inner integral. I just skipped several steps. I know the final integral after integrating out y has been done correctly. I'm just scratching my head on the bounds. – StatsStudent May 7 '17 at 21:03
• See the link below if it helps. I used the same approach as this computer algebra system: symbolab.com/solver/definite-integral-calculator/… – StatsStudent May 7 '17 at 21:07
• No, the problem is NOT that Michael Chernick misunderstood you post- the problem is that you are integrating wrong. Your condition is that 0< x< y< 1. If you integrate with respect to y first, the y must be [b]larger[/b] than x. The integration is $c\int_0^1\int_x^1 \frac{cx^2}{y} dydx$. In doing the first integral, you evaluate it as y= 1 and y= x, not at y= 0. – user247327 May 7 '17 at 21:24
• @user247327, yep. That's exactly what I did as explained above. Thank you! The issue was two-fold: Michael misunderstood my question, but that was likely the precipitated by presentation of the question. I could have cut to the chase without much of the unnecessary background info which seemed to have also confused you. – StatsStudent May 7 '17 at 21:30

Note that $$\int_0^1 x^2 \log x \, \mathrm{d}x = \frac{x^3}{3}\ln x\bigg]_0^1 -\int_0^1 \frac{x^3}{3x} \, \mathrm{d}x = -\lim_{\epsilon \to 0} \frac{\epsilon^3}{3}\ln \epsilon - \bigg[\frac{x^3}{9}\bigg]_0^1 = -\frac{1}{9}$$
using integration by parts with $u=\ln x$ and $\mathrm{d}v =x^2$. The fact that it's negative doesn't bode well if this has to do with probability but it expected given the integrand is always negative in $[0,1]$.
The reason we take the limit is because $x^2 \log x$ isn't defined at $0$, so this is known as an improper integral. The notation $\int_0^1 x^2 \log x \, \mathrm{d}x$ really means $\lim_{\epsilon \to 0} \int_{\epsilon}^1 x^2 \log x \, \mathrm{d}x$ in this case, assuming the integral is convergent.