Problem 114
Medium Special Techniques

Prove that: integral from -a to a |x|^x(ln |x|+1) dx = 2

Prove that: $$ \int_{-a}^a |x|^x(\ln |x|+1) \, dx = 2\sinh(a \ln a), \quad (a>0) $$

Explanation of Method

This is a proof: a substitution or algebraic manipulation is used to relate the integral to itself or to a simpler integral, establishing the stated identity directly.

Step 1: Analyze the integrand

The integrand is $f(x) = |x|^x(\ln |x|+1)$.

For $x > 0$: $f(x) = x^x(\ln x + 1)$

For $x < 0$: $f(x) = |x|^x(\ln |x| + 1) = (-x)^x(\ln(-x) + 1)$

Note: $|x|^x = e^{x\ln|x|}$ is well-defined for $x \neq 0$.

Step 2: Check for symmetry

For $x < 0$, let $x = -t$ where $t > 0$:

$$f(-t) = |-t|^{-t}(\ln|-t| + 1) = t^{-t}(\ln t + 1)$$

Note that this is NOT the same as $f(t) = t^t(\ln t + 1)$.

However, we can observe:

$$t^{-t} = \frac{1}{t^t} = e^{-t\ln t}$$

So the function is NOT even or odd in the usual sense.

Step 3: Split the integral

$$I = \int_{-a}^a |x|^x(\ln |x|+1) \, dx = \int_{-a}^0 |x|^x(\ln |x|+1) \, dx + \int_0^a x^x(\ln x+1) \, dx$$

For the first integral, let $x = -t$ where $t > 0$, so $dx = -dt$:

When $x = -a$: $t = a$

When $x = 0$: $t = 0$

$$\int_{-a}^0 |x|^x(\ln |x|+1) \, dx = \int_a^0 t^{-t}(\ln t+1) \, (-dt) = \int_0^a t^{-t}(\ln t+1) \, dt$$

Therefore:

$$I = \int_0^a t^{-t}(\ln t+1) \, dt + \int_0^a x^x(\ln x+1) \, dx$$

$$= \int_0^a \left[t^{-t} + t^t\right](\ln t+1) \, dt$$

Step 4: Simplify using hyperbolic functions

Recall that:

$$t^t + t^{-t} = e^{t\ln t} + e^{-t\ln t} = 2\cosh(t\ln t)$$

Therefore:

$$I = \int_0^a 2\cosh(t\ln t)(\ln t+1) \, dt = 2\int_0^a \cosh(t\ln t)(\ln t+1) \, dt$$

Step 5: Evaluate the integral

Let $u = t\ln t$, so:

$$du = (\ln t + 1) \, dt$$

When $t \to 0^+$: $u = t\ln t \to 0$ (using L'Hôpital: $\lim_{t\to 0^+} t\ln t = 0$)

When $t = a$: $u = a\ln a$

Therefore:

$$I = 2\int_0^{a\ln a} \cosh(u) \, du = 2[\sinh(u)]_0^{a\ln a}$$

$$= 2[\sinh(a\ln a) - \sinh(0)] = 2\sinh(a\ln a) - 0$$

$$\boxed{I = 2\sinh(a\ln a)}$$

Step 6: Verification of the substitution

The key substitution is $u = t\ln t$.

Derivative:

$$\frac{du}{dt} = \ln t + t \cdot \frac{1}{t} = \ln t + 1$$

This confirms that $du = (\ln t + 1) \, dt$. ✓

Limits:

As $t \to 0^+$:

$$\lim_{t \to 0^+} t\ln t = \lim_{t \to 0^+} \frac{\ln t}{1/t} \stackrel{L'H}{=} \lim_{t \to 0^+} \frac{1/t}{-1/t^2} = \lim_{t \to 0^+} (-t) = 0$$

So the lower limit is indeed 0. ✓

Step 7: Alternative form of the answer

We can also write:

$$2\sinh(a\ln a) = 2 \cdot \frac{e^{a\ln a} - e^{-a\ln a}}{2} = e^{a\ln a} - e^{-a\ln a}$$

$$= a^a - a^{-a} = a^a - \frac{1}{a^a}$$

Therefore:

$$\boxed{\int_{-a}^a |x|^x(\ln |x|+1) \, dx = a^a - a^{-a}}$$

Numerical verification for $a = 1$

For $a = 1$:

$$2\sinh(1 \cdot \ln 1) = 2\sinh(0) = 2 \cdot 0 = 0$$

Alternatively:

$$1^1 - 1^{-1} = 1 - 1 = 0$$

Let's verify by direct integration:

$$\int_{-1}^1 |x|^x(\ln |x|+1) \, dx$$

By symmetry of our calculation, this should equal 0. ✓

Numerical verification for $a = 2$

For $a = 2$:

$$2\sinh(2\ln 2) = 2 \cdot \frac{e^{2\ln 2} - e^{-2\ln 2}}{2} = e^{\ln 4} - e^{-\ln 4} = 4 - \frac{1}{4} = \frac{15}{4} = 3.75$$

Alternatively:

$$2^2 - 2^{-2} = 4 - 0.25 = 3.75$$

Both forms agree. ✓

Summary

  1. Split the integral at $x = 0$
  2. For negative part, substitute $x = -t$ to get $\int_0^a t^{-t}(\ln t+1) dt$
  3. Combine with positive part: $\int_0^a [t^t + t^{-t}](\ln t+1) dt$
  4. Recognize: $t^t + t^{-t} = 2\cosh(t\ln t)$
  5. Substitute $u = t\ln t$ with $du = (\ln t+1)dt$
  6. Integrate: $2\int_0^{a\ln a} \cosh(u) du = 2\sinh(a\ln a)$

Key insights:


Result

$$\boxed{I = 2\sinh(a\ln a)}$$

Therefore:

$$\boxed{\int_{-a}^a |x|^x(\ln |x|+1) \, dx = a^a - a^{-a}}$$