@SammyS,
Thanks for the reply, but I have never seen the method you used before. I understand that you manipulated the first equation to get the second, but I do not know why. If you could explain it a bit or give me a link to a website that explains it I would appreciate it.

I switched t with x in the equation. Now that I think about it I'm even unsure of why I did this. Anyway, I solved the problem by taking t out of the function before integrating. Thank you all for the quick replies.