x = linspace(-6,6,1000);
soln = zeros(1,1000);
b0 = 2;
soln = soln + ones(1,1000)*b0/2;
for n=1:200
  an = 2/3*(-3/(2*n*pi)*(cos(2*n*pi/3)-1)-3/(n*pi)*(cos(4*n*pi/3)-cos(2*n*pi/3))); 
bn = -2/3*(-3/(2*n*pi)*(sin(2*n*pi/3)-0)-3/(n*pi)*(sin(4*n*pi/3)-sin(2*n*pi/3))); 
soln = soln + an*sin(2*n*pi*x/3) + bn*cos(2*n*pi*x/3);
end

plot(x,soln)
