Figured it out.
I know that Integrate[Abs[sqrt(x)-1],x] gives a piecewise defined function for its indefinite integral. But it seems that Mathematica cannot compute this piecewise defined function. Is there anyway to make it so that such integrals can be computed indefinitely on Mathematica?
Thanks in advance.