So I was trying to work out the problem on the lab we got today to get some extra practice for the exam we have coming up because I need all the practice I can get. The b[n_] I calculated by hand is just a tad bit different than what Mathematica determined. I cannot find where I went wrong, so I attached the answer from Mathematica and the answer I got by hand. If someone could help me find my mistake, I will be forever grateful!
Latest Lab #1

clea

gigaliciousness
Hey Corey!
Your goof is when doing your limits of integration, the result should be:$$(-\frac{4}{n \pi}cos(n \pi)) -(-\frac{4}{n \pi})$$ not $$(-\frac{4}{n \pi}cos(n \pi)) +(-\frac{4}{n \pi})$$
With that correction, your function would easily simplify down to agree with Mathematica's output.

clea
Thanks Giggey! I'm such a goof, I forgot that you subtract the limits of integration instead of adding them slaps palm on forehead