u subs and x bounds on integrals

Could someone please explain how to use u subs when taking an integral? We learned this awhile ago and I never completely understood. Here is an example of a problem where, I think, I should be using a u sub:

ack! I can't figure out how to type this in........ sooooo....

The integral of x squared minus 1 over x between the bounds of e and 1

Hope that makes sense.

Thank you :)

Also, I know I'm only supposed to ask one question, but how would the answer change if the upper bound were x? Would I just plug in x to the final solution, or is there a special rule?