Computing the integral $\int(x-ab)x^{a-1}e^{-\frac{x}{b}}dx$ Can someone justify to me why 
$\int(x-ab)x^{a-1}e^{-\frac{x}{b}}dx = -bx^ae^{-\frac{x}{b}}$?
WolframAlpha gives the answer but does not explain why. I'm absolutely new to this kind of integration. Thanks!

Hint: using the product rule, differentiate $-bx^{a}e^{\frac{-x}{b}}$. What do you get? In other words, take a look at your integrand. Expanding out, we find: 
$$(x-ab)x^{a-1}e^{-\frac{x}{b}} = x^{a}e^{\frac{-x}{b}} - abx^{a-1}e^{-\frac{x}{b}}$$
We can then rewrite this as:
$$(x-ab)x^{a-1}e^{-\frac{x}{b}} = x^{a}\cdot(-b)\cdot\frac{d}{dx}[e^{\frac{-x}{b}}] + e^{\frac{-x}{b}}\cdot\frac{d}{dx}[-bx^{a}] = \frac{d}{x}[-bx^{a}e^{\frac{-x}{b}}]$$
(Hopefully, this does not seem like a glib answer... I am trying to hint you towards recognizing that your integrand looks a lot like the derivative of some function $f(x)$, and computing the integral of $f'(x)$ is always nice! :) )
