I am attempting to compute and replicate the exact solution of the Burgers equation following Kutluay, Bahadir, Ozdes.
The solution which is obtained after Hopf-Cole transformation is given as:
$$u(x,t)= 2\pi\nu\frac{\sum_{n=1}^{\infty} a_n\exp(-n^2\pi^2vt)n\sin(n\pi x)} {a_0+\sum_{n=1}^{\infty} a_n\exp(-n^2\pi^2vt)\cos(n\pi x)}$$
where $\nu$ is a constant and the Fourier coefficients are defined as:
$$a_0=\int_{0}^{1} \exp{\left( -(2\pi\nu)^{-1}[1-\cos(\pi x)] \right)} dx$$
$$a_n=2\int_{0}^{1} \exp{\left( -(2\pi\nu)^{-1}[1-\cos(\pi x)] \right)}\cos(n\pi x) dx$$
So to be more precise, how would I calculate the integrals of $a_0, a_n$ and the infinite sums ?
Regarding the summation, do I set an arbitrary larger number, $T$, and compute the sum until $T$? or is there an elegant way where I can simplify the summation with a formula like in a geometric power series?
For $a_0$ I can get an approximate as seen WolframAlpha $a_0$. I know for $\cos(n\pi)$ it's $1$ for $n=even$ and $-1$ if $n=odd$ but I'm not too sure how to approach $a_n$.