So I just applied the straightforward method by calculating $a_0,$ $a_n$ and $b_n$. I got that
$$a_0=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}e^{\pi b}dx=\frac{2\sinh(\pi b)}{\pi b}.\tag{1}$$
By fractions by parts twice and solving for the original integral I get
$$a_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}e^{\pi b}\cos(nx) dx=\frac{2b(-1)^n\sinh(\pi b)}{n^2+b^2},\tag2$$
and in a similar fashion
$$b_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}e^{\pi b}\sin(nx) dx=\frac{2n(-1)^n\sinh(\pi b)}{n^2+b^2}.\tag2$$
Thus
$$e^{bx}=\frac{\sinh(\pi b)}{\pi b}+\frac{2\sinh(\pi b)}{\pi}\sum_{n\in\mathbb{N}}\frac{(-1)^n}{n^2+b^2}(b\cos(nx)+n\sin(nx)).$$
Questions:
- Is this correct and how do I check it? I tried plugging in and plotting both sides for $b=3$ but Maple can't plot the RHS, it just loads and nothing happens.
- Is this the preferred way to go or would things be simpler if we went the complex way by computing $c_n$?
Things get simpler if we use complex way. We find that $$\begin{align*} a_n+ib_n&=\frac1{\pi}\int_{-\pi}^\pi e^{bx}e^{inx}\mathrm dx \\&=\frac1{\pi(b+in)}\left(e^{(b+in)\pi}-e^{-(b+in)\pi}\right)\\ &=\frac{(b-in)(-1)^n}{\pi(b^2+n^2)}2\sinh(b\pi)\\ &=\frac{(-1)^nb}{\pi(b^2+n^2)}2\sinh(b\pi)-i\frac{(-1)^nn}{\pi(b^2+n^2)}2\sinh(b\pi). \end{align*}$$ So we have $$ a_n=\frac{(-1)^nb}{\pi(b^2+n^2)}2\sinh(b\pi),\quad n\ge 1 $$ and $$ b_n=-\frac{(-1)^nn}{\pi(b^2+n^2)}2\sinh(b\pi) ,\quad n\ge 1. $$ It looks like you have the wrong sign for $b_n$.