A strange integral having to do with the sophomore's dream:

Solution 1:

It is important to note some symmetry:

Consider: $$I=\int_0^1 \frac{x^x}{(1-x)^{1-x}}\text{d}x$$

If you substitute $x\to 1-x, \text{d}x\to -\text{d}x$

You are left with:

$$I=-\int_{1-0}^{1-1}\frac{(1-x)^{(1-x)}}{(1-(1-x))^{(1-(1-x))}}\text{d}x=\int_0^1 \frac{(1-x)^{1-x}}{x^x}\text{d}x$$

And your integral is only $I-I=0$, your result. You didn't even need to know $x^x$ properties!

In fact, this can be further generalized:

$$\int_0^1 \frac{f(x)}{f(1-x)}\text{d}x=\int_0^1 \frac{f(1-x)}{f(x)}\text{d}x$$

Solution 2:

So you have an integral: $$I = \int_0^1 \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x$$

Let's split the area of integration by half:

$$I = \int_0^{\tfrac 12} \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x + \int_{\tfrac 12}^1 \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x $$

and substitute $y=1-x$ in the second term:

$$I = \int_0^{\tfrac 12} \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x + \int_{\tfrac 12}^0 \left(\frac{(1-y)^{1-y}}{y^y}-\frac{y^y}{(1-y)^{1-y}}\right)(-\text{d}y) $$ $$ =\int_0^{\tfrac 12} \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x + \int_{\tfrac 12}^0 \left(\frac{y^y}{(1-y)^{1-y}}-\frac{(1-y)^{1-y}}{y^y}\right)\text{d}y $$

Now we swap the limits of integration for $y$: $$I = \int_0^{\tfrac 12} \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x - \int_0^{\tfrac 12} \left(\frac{y^y}{(1-y)^{1-y}}-\frac{(1-y)^{1-y}}{y^y}\right)\text{d}y $$ and after a few minutes of staring up we see the expression is $$I = K - K$$ with $$K = \int_0^{\tfrac 12} \left(\frac{x^x}{(1-x)^{1-x}}-\frac{(1-x)^{1-x}}{x^x}\right)\text{d}x$$

Hence $I = 0$.