The original problem I was tasked with solving is
$$(x-1)y'' -xy' + y = 0$$
and given the solution $y_1(x) = e^x$.
I started working through the problem using this method (http://www.sosmath.com/diffeq/second/reduction/reduction.html) and got to $y_2(x) = e^x \int e^{-3x}(x-1)^{-1}dx$. How do I proceed from this point? How do I take this integral?
Sorry for the poor formatting, still new here.
Remark: by staring at the equation, we see that $y=x$ is another linearly independent solution. It's not always that easy, though...
I think you've gone wrong in your calculation. The point of reduction of order is basically to lose the lowest-order term, so that the last integration becomes easy. Putting $y=ue^x$, we find $$ y' = (u'+u)e^x, \\ y'' = (u''+2u'+u)e^x, $$ and putting these into the equation, $$ \left( (x-1)(u''+2u'+u) -x(u'+u) + u \right)e^x = 0, $$ so we can cancel off the $e^x$, and are left with $$ (x-1)u'' +(x-2)u' = 0. $$ We now solve this as a first-order equation in $u'$. We have $$ \int \frac{x-2}{x-1} \, dx = x - \log{(x-1)}, $$ so an integrating factor is $e^x/(x-1)$, so $$ \left( \frac{e^x}{x-1} u' \right)' = 0. $$ Integrating and dividing, $$ u' = A(x-1)e^{-x} \implies u = B + A\int (x-1)e^{-x} \, dx, $$ which is not what you have, but now this will give the right answer once you integrate by parts.