For a 2-periodic analytic function f, its Fourier expansion is given by the formula
f(x)=n=−∞∑∞fneiπnx,fn=21∫−11f(t)e−iπntdt
(a) Consider the two-point boundary value problem
−π21(1+2cosπx)u′′+u=1+n=1∑∞n2+12cosπnx,−1⩽x⩽1,
with periodic boundary conditions u(−1)=u(1). Construct explicitly the infinite dimensional linear algebraic system that arises from the application of the Fourier spectral method to the above equation, and explain how to truncate the system to a finitedimensional one.
(b) A rectangle rule is applied to computing the integral of a 2-periodic analytic function h :
∫−11h(t)dt≈N2k=−N/2+1∑N/2h(N2k)
Find an expression for the error eN(h):=LHS−RHS of (∗), in terms of hn, and show that eN(h) has a spectral rate of decay as N→∞. [In the last part, you may quote a relevant theorem about hn.]