I have to integrate
$$ \int \frac{a^{x} (x+1)}{(x-1)^2}dx$$
I tried different substitutions but didn't achieved any thing
Please help
I have to integrate
$$ \int \frac{a^{x} (x+1)}{(x-1)^2}dx$$
I tried different substitutions but didn't achieved any thing
Please help
Copyright © 2021 JogjaFile Inc.
So as @George Coote's points out, the integral only can be expressed in closed-form in terms of the non-elementary function known as the Exponential integral $\text{Ei}(x)$. Defined as $$\text{Ei}(x) = - \int_{-x}^\infty \frac{e^{-t}}{t} \, dt,$$ we will make use of the following indefinite form $$\int \frac{e^{-t}}{t} \, dx = \text{Ei}(-t) + C.\tag1$$
Let $$I = \int \frac{a^x (x + 1)}{(x - 1)^2} \, dx, \quad a > 0, a \neq 1.$$ Setting $x = 1 - t/\ln a, dx = - dt/\ln a$, after simplifying we have \begin{align*} I &= -a \int \frac{e^{-t} (2 \ln a - t)}{t^2} \, dt\\ &= a \int \frac{e^{-t}}{t} \, dt - 2a \ln a \int \frac{e^{-t}}{t^2} \, dt\\ &= a \int \frac{e^{-t}}{t} \, dt + 2a \ln a \frac{e^{-t}}{t} + 2a \ln a \int \frac{e^{-t}}{t} \, dt \quad \text{(by parts)}\\ &= 2a \ln a \frac{e^{-t}}{t} + a(1 + 2 \ln a) \int \frac{e^{-t}}{t} \, dt\\ &= 2a \ln a \frac{e^{-t}}{t} + a(1 + 2 \ln a) \text{Ei}(-t) + C, \end{align*} where use of the (1) has been made. Back substituting for $x$ one finds $$\int \frac{a^x (x + 1)}{(x - 1)^2} \, dx = a(1 + 2 \ln a) \text{Ei}[(x - 1) \ln a] - \frac{2a^x}{x - 1} + C.$$
For the case when $a = 1$, the integral reduces to $$I = \int \frac{x + 1}{(x - 1)^2} \, dx = \ln |x - 1| - \frac{2}{x - 1} + C,$$ a result that can readily found on applying a substitution of $u = x - 1$.
So in summary $$\int \frac{a^x (x + 1)}{(x - 1)^2} \, dx = \begin{cases} a(1 + 2 \ln a) \text{Ei}[(x - 1) \ln a] - \dfrac{2a^x}{x - 1} + C & a > 0, a \neq 1\\[2ex] \ln |x - 1| - \dfrac{2}{x - 1} + C & a = 1 \end{cases}$$