Complicated integration How can this be integrated? :
$$\int_{b}^{a} x \left ( \frac{D}{a-b} \right ) \left ( \frac{a-x}{a-b} \right )^{D-1}dx$$
The solution is :
$$\frac{a+(D)(b)}{D+1}$$
 A: \begin{align}
S &= \int_{b}^{a} x \left( \frac{D}{a-b} \right) \left( \frac{a-x}{a-b} \right)^{D-1} \,\mathrm{d}x \\\\
&= \frac{D}{\left(a-b\right)^D} \int_b^a x(a-x)^{D-1}\,\mathrm{d}x\\\\
&= \frac{D}{\left(a-b\right)^D} \int_b^a x(a-x)^{D-1}\,\mathrm{d}x
\end{align}
Let $y=a-x$ so that $x=a-y$, and
\begin{align}
S&= \frac{D}{\left(a-b\right)^D} \int_b^a x(a-x)^{D-1}\,\mathrm{d}x \\\\
&= \frac{D}{\left(a-b\right)^D} \int_{a-b}^0 (y-a)y^{D-1}\,\mathrm{d}y\\\\
&=\frac{D}{\left(a-b\right)^D} \left(\int_{a-b}^0 y^D\,\mathrm{d}y - a\int_{a-b}^0 y^{D-1}\,\mathrm{d}y\right)\\\\
&=\frac{D}{\left(a-b\right)^D} \left(a\int_0^{a-b} y^{D-1}\,\mathrm{d}y - \int_0^{a-b} y^D \,\mathrm{d}y\right)\\\\
&=\frac{D}{\left(a-b\right)^D} \left(\frac{a}{D}(a-b)^D-\frac{1}{D+1} (a-b)^{D+1}\right)\\\\
&=D\left(\frac{a}{D}-\frac{a}{D+1}+\frac{b}{D+1}\right)\\\\
&=D\left(\frac{aD+a}{D^2+D}-\frac{aD}{D^2+D}+\frac{bD}{D^2+D}\right)\\\\
&=\boxed{\displaystyle\frac{a+Db}{D+1}}
\end{align}
A: Let $u = (a - x)/(a - b)$. Then $(a - b)u = a - x$, thus $(a - b)\, du = -\, dx$. When $x = b$, $u = 1$ and when $x = a$, $u = 0$. Thus 
$$\int_b^a x\left(\frac{D}{a - b}\right) \left(\frac{a - x}{a - b}\right)^{D - 1}\, dx = D\int_0^1 [a - (a - b)u]u^{D - 1}\, du$$
Now 
$$\int_0^1 [a - (a - b)u]u^{D - 1}\, du = \int_0^1 [au^{D - 1} - (a - b)u^D]\, du = \frac{a}{D} - \frac{a - b}{D+1} = \frac{a + Db}{D(D + 1)}$$
Hence
$$\int_b^a x\left(\frac{D}{a - b}\right) \left(\frac{a - x}{a - b}\right)^{D - 1}\, dx = D\frac{a + Db}{D(D + 1)} = \frac{a + Db}{D + 1}$$
