I am trying to fit a Fourier cosine series to discrete data. I read through this, but I was not able to understand it. The data should be periodic with a period of $0.2 \text{ m}$, and it is the initial temperature distribution of a copper rod. I will then be using this function to solve the heat equation. Any ideas on how to compute a Fourier cosine series that fits this data (without the error bars)?
data =
{{0, 26.75}, {0.01, 26.5}, {0.02, 28}, {0.03, 28.75}, {0.04, 30}, {0.05, 32},
{0.06, 34.25}, {0.07, 37.5}, {0.08, 43.25}, {0.09, 59.5}, {0.1, 102},
{0.11, 67.75}, {0.12, 40.5}, {0.13, 35.75}, {0.14, 34}, {0.15, 31.75},
{0.16, 30}, {0.17, 27.5}, {0.18, 28}, {0.19, 26.5}, {0.2, 28}}
Graph: