Differentiating Fourier series

Compute the Fourier series for the even 2π-periodic extension of (e^x):

Simplify[(2/π)Integrate[Exp[x]*Cos[k*x],{x,0,π}],Assumptions->k∈Integers]

a[k_]:=((-2+2 (((-1))^k) (E^π))/(π+(k^2) π))

Plot[{Exp[x],((a[0])/2)+Sum[a[k]*Cos[k*x],{k,1,20}]},{x,-5,5}]

Plot the term-by-term derivative of the previous Fourier series. Notice that it converges to the odd 2π-periodic extension of (e^x).

Plot[{Exp[x],Sum[-a[k]*k*Sin[k*x],{k,1,100}]},{x,-5,5}]

Simplify[(2/π)Integrate[Exp[x]*Sin[k*x],{x,0,π}],Assumptions->k∈Integers]

Plot the term-by-term second derivative of the first Fourier series. Notice that it doesn’t converge!

Plot[{Exp[x],Sum[-a[k]*(k^2)*Cos[k*x],{k,1,1000}]},{x,-5,5}]