Hi I am trying to represent this following function:
$$f(x)=\begin{cases} 35.6236 + 0.161087e^{59.9842x},0\leq x < 0.1 \\ 35.6236 + 0.161087e^{59.9842 (-x + 0.2)},0.1\leq x \leq 0.2 \\ \end{cases} $$ In this form: $$f(x) = \sum_{n=0}^{\infty}C_{n}\cos(n\pi x/L).$$ Obviously this is a Fourier Cosine series, so what I did was to find the even extension: $$f(x)=\begin{cases} 35.6236 + 0.161087e^{-59.9842x},-0.1\leq x < 0 \\ 35.6236 + 0.161087e^{59.9842x},0\leq x \leq 0.1 \\ \end{cases} $$
And compute a normal Fourier Cosine Series:
$$p=2L$$ $$0.2=2L$$ $$L=\frac{1}{10}$$
Then:
$$C_0=\frac{2}{L}\int_{0}^{L}f(x)dx$$
$$20 \left(\int_{-0.1}^0 (0.161087\exp(-59.9842 x)+35.6236) \, dx+\int_0^{0.1} (0.161087 \exp (59.9842 x)+35.6236)\,dx\right)$$
and finally: $$C_0=\frac{2}{L}\int_{0}^{L}f(x)cos(\frac{nπx}{L})dx$$ $$=20 \left(\int_{-0.1}^0 (0.161087e^{-59.9842x}+35.6236)\cos (\pi 10 \unicode{0008} n x) \, dx+\int_0^{0.1} (0.161087e^{59.9842 x}+35.6236) \cos (\pi 10 \unicode{0008} n x) \, dx\right)$$
But when I graph this I don't get anything like the original function. Am I doing something wrong? Thank You.