y=xlnxy = x \ln x

Graph of the Function y=xlnxy = x \ln x

y=xlnxy = x \ln x is the product of a linear function and a logarithm. As x0+x \to 0^{+} the factor lnx\ln x diverges to -\infty while xx tends to 00, so the first question is which of the two effects wins. The answer is xx, and the value converges to 00.

Domain and range

The logarithm forces the domain x>0x > 0. As shown below the minimum value is 1e-\dfrac{1}{e}, and the function diverges as xx \to \infty, so the range is y1ey \geq -\dfrac{1}{e}.

Behavior at the origin

The limit as x0+x \to 0^{+} follows from l'Hôpital's rule.

limx0+xlnx=limx0+lnx1/x=limx0+1/x1/x2=limx0+(x)=0\begin{align*} \lim_{x \to 0^{+}} x \ln x &= \lim_{x \to 0^{+}} \frac{\ln x}{1/x} \\ &= \lim_{x \to 0^{+}} \frac{1/x}{-1/x^2} \\ &= \lim_{x \to 0^{+}} (-x) = 0 \end{align*}

The indeterminate form \dfrac{-\infty}{\infty} was rewritten to make it tractable. The graph is drawn into the origin as though sucked in, but x=0x = 0 is not in the domain, so that end is open. The derivative y=lnx+1y' = \ln x + 1 diverges to -\infty there, so the tangent becomes vertical.

Monotonicity and extrema

The derivative y=lnx+1y' = \ln x + 1 vanishes when lnx=1\ln x = -1, that is at x=1ex = \dfrac{1}{e}. It is negative before that point and positive after, so the function has a minimum there, both local and global, of value 1e-\dfrac{1}{e}. The minimum point (1e,1e)(0.368,0.368)\left( \dfrac{1}{e}, -\dfrac{1}{e} \right) \approx (0.368, -0.368) is memorable for having coordinates of equal magnitude.

Concavity and intercept

The second derivative is y=1xy'' = \dfrac{1}{x}, positive throughout the domain, so the curve is concave up everywhere and has no inflection point. Since xlnx=0x \ln x = 0 only when lnx=0\ln x = 0, the single xx-intercept is (1,0)(1, 0).

Rangelnx\ln xyy
0<x<10 < x < 1negativenegative
x=1x = 10000
x>1x > 1positivepositive

Integral

Integration by parts gives the antiderivative.

xlnxdx=x22lnxx24+C\int x \ln x\,dx = \frac{x^2}{2}\ln x - \frac{x^2}{4} + C

From this 01xlnxdx=14\int_0^1 x \ln x\,dx = -\dfrac{1}{4}. The improper integral takes a finite value precisely because the integrand settles to 00 as x0x \to 0.

Relation to other functions

Since xx=exlnxx^x = e^{x \ln x}, this function is the exponent of y=xxy = x^x. That xlnxx \ln x attains its minimum 1e-\dfrac{1}{e} at x=1ex = \dfrac{1}{e} is exactly why xxx^x attains its minimum e1/e0.692e^{-1/e} \approx 0.692 at the same place.

Applications

In information theory an event of probability pp contributes plnp-p \ln p to the entropy. The shape of this graph, reflected in sign, shows that the contribution vanishes both at p=0p = 0 and at p=1p = 1 and peaks in between, at p=1ep = \dfrac{1}{e}. In complexity theory the lower bound for comparison sorting is nlognn \log n, and this function is precisely that rate of growth.