So when I was doing the sample final lab earlier today I thought I could do some shorthand just to save myself some typing but it didn't work out and I wanted to know why.
On Problem 1, under Fourier's solution the line of code that says:
Assumptions->Element[n, Integers]
I tried to put in
Assumptions-> n $\in \mathbb{Z}$
thinking they were equivalent but apparently not! When I did, my answers differed slightly. With Dr. McClure's code, I got the answer:
$$\frac{64[-1+(-1)^n]}{n^3\pi^3}$$
And with the shorthand, the answer is:
$$\frac{32[-2 + 2\cos(n \pi) + n \pi\sin(n \pi)]}{n^3 \pi^3}$$
I guess fundamentally they're the same answer because $n \pi\sin(n \pi)$ will always equal zero and $\cos(n \pi)$ does simplify down to $(-1)^n$ and I tried doing FullSimplify to see if it would reduce down further but it didn't. I was wondering if anybody knew why the shorthand doesn't work in this case?