Find the Radius of Convergence of a Series Consider the function $f(z)$ defined by the series $$f(z):=\sum_{n=0}^{\infty}e^{-nz}\cos (nz).$$
I am asked to find the domain of $f$ defined by the convergence of the series.
To find the radius of the convergence, we need to firstly transform the summand into the form of power series.
So I simply wrote down the formula as:
\begin{align*}
e^{-nz}\cos(nz)&=\Big(\sum_{k=0}^{\infty}\dfrac{(-nz)^{k}}{k!}\Big)\Big(\sum_{\ell=0}^{\infty}\dfrac{(-1)^{\ell}}{(2\ell)!}(nz)^{2\ell}\Big)\\
&=\Big(\sum_{k=0}^{\infty}\dfrac{(-1)^{k}n^{k}}{k!}z^{k}\Big)\Big(\sum_{\ell=0}^{\infty}\dfrac{(-1)^{\ell}n^{2\ell}}{(2\ell)!}z^{2\ell}\Big)\\
&:=\Big(\sum_{k=0}^{\infty}a_{k}z^{k}\Big)\Big(\sum_{\ell=0}^{\infty}b_{\ell}z^{2\ell}\Big)\\
&=\sum_{m=0}^{\infty}\Big(\sum_{\substack{k+2\ell=m \\ k,\ell\geq 0}}a_{k}b_{\ell}\Big)z^{m}.
\end{align*}
But then I don't know how to proceed, as then if I sum over $n$, the coefficients are still not clear enough to calculate the radius of convergence.
Did I head to a wrong direction?
Since this question is related to complex analysis and power series, after searching around the forum, I am still not sure if I've asked a duplicated question. If so, please point it out and I will close the question.
Thank you!
Edit 1:
Given the discussions under my post and two answers, here is some editions here.
(1) I am sorry for forgetting to mention that $z\in\mathbb{C}$. Thus, it seems not sufficient to argue only for $z\in\mathbb{R}$.
(2) This problem has a follow-up part (b) asking me to argue if $f(z)$ can be extended analytically to a larger domain. If so, I need to find the maximal domain of the extension and classify its singularities. Therefore, I think we need to find a power series expansion of $f(z)$ and then "return" it to a function, just like what Viktor Glombik suggested.
I am currently trying to show what Viktor Glombik could not prove, and I would post my proof here if I came up one.
Thank all of you so much for your discussion and answers!
Edit 2:
Following the idea of Viktor Glombik, I think I prove the whole problem now. In this edition, I will first post the whole problem and then post my proof. The proof greatly follows Viktor Glombik.

Consider the function $f(z)$ defined by the series $$f(z):=\sum_{n=0}^{\infty}e^{-nz}\cos(nz).$$
(1) Find the domain of $f$ defined by the convergence of the series.
(2) Can $f$ be extended analytically to a larger domain? If so, find the maximal domain of the extension and classify its singularities.

Proof (1):
Note that $$\cos (nz)=\dfrac{e^{inz}+e^{-inz}}{2},$$ so that we have $$\sum_{n=0}^{\infty}e^{-nz}\cos(nz)=\dfrac{1}{2}\sum_{n=0}^{\infty}e^{(i-1)nz}+\dfrac{1}{2}\sum_{n=0}^{\infty}e^{-(i+1)nz}.$$
Both sums are geometric sum with $$r_{1}=e^{(i-1)z},\ r_{2}=e^{-(i+1)z},$$ which converges if and only if $$|r_{1}|<1,\ \text{and}\ |r_{2}|<1.$$
Write $z:=x+iy$ for $x,y\in\mathbb{R}$, then we have $$|r_{1}|=\Big|e^{i(x-y)}e^{-y-x}\Big|=\Big|e^{-(y+x)}\Big|=e^{-(y+x)},$$ and $$|r_{2}|=\Big|e^{i(-x-y)}e^{y-x}\Big|=\Big|e^{y-x}\Big|=e^{y-x}.$$
Then, we have $$|r_{1}|<1\implies e^{y+x}>1\implies y+x>0\implies y>-x,$$ $$|r_{2}|<1\implies e^{y-x}<1\implies y-x<0\implies y<x.$$
Thus, the domain of the convergence is the set $$\mathcal{A}:=\{z\in\mathbb{C}:-\Re(z)<\Im(z)<\Re(z)\}.$$
Proof (2):
Now, define the partial sums $$S_{1,k}:=\dfrac{1}{2}\sum_{n=0}^{k}r_{1}^{n},\ S_{2,k}:=\dfrac{1}{2}\sum_{n=0}^{k}r_{2}^{n}.$$
Then, by the summation formula of geometric series, we have $$S_{1,k}=\dfrac{1}{2}\times\dfrac{1-r_{1}^{k+1}}{1-r_{1}},\ S_{2,k}=\dfrac{1}{2}\times\dfrac{1-r_{2}^{k+1}}{1-r_{2}}.$$
Now, for all $z\in\mathcal{A}$, taking $k\rightarrow\infty$ yields us $$f(z)=\dfrac{1}{2}\Big(\dfrac{1}{1-e^{(i-1)z}}\Big)+\dfrac{1}{2}\Big(\dfrac{1}{1-e^{-(i+1)z}}\Big).$$
It is then clear that the singularities are those $z\in\mathbb{C}$ that make
\begin{align*}
&e^{(i-1)z}=1,\ \text{or}\ e^{-(i+1)z}=1 \\
\iff &(i-1)z=2k\pi i,\ \text{or}\ (i+1)z=-2k\pi i,\ k\in\mathbb{Z}.\\
\iff &z=(1-i)k\pi,\ \text{or}\ z=-(1+i)k\pi,\ k\in\mathbb{Z}.
\end{align*}
Therefore, for all $z\in\mathbb{C}\setminus\Big(\{z=(1-i)k\pi,\ k\in\mathbb{Z}\}\cup\{z=-(1+i)k\pi,\ k\in\mathbb{Z}\}\Big),$ $$f(z):=\dfrac{1}{2}\Big(\dfrac{1}{1-e^{(i-1)z}}\Big)+\dfrac{1}{2}\Big(\dfrac{1}{1-e^{-(i+1)z}}\Big)$$ is an analytic continuation of $f(z)$.
I think I did not understand the point of this question before because I thought it was asking me to give the radius of the convergence, but it was actually asking me to simply give a domain.
Also, the idea of using geometric series is brilliant, credit to Viktor.
 A: When $z > 0$ and $n \in \Bbb N$, 
$$
\left| e^{-nz} \cos(nz)\right| \leq \left| e^{-nz} \right| 
$$
so the series converges absolutely, and in fact
$$
\left| \sum_{n\in \Bbb N} e^{-nz} \cos(nz)\right| \leq \left| \sum_{n\in \Bbb N} e^{-nz} \right| = \frac1{1-e^{-z}}
$$
When $z=0$,
$$\sum_{n\in \Bbb N} e^{-nz} = \sum_{n\in \Bbb N} 1$$
which clearly diverges.
So the question is whether the series converges for any $z<0$.
Clearly it does not converge absolutely for any $z < 0$ if $z$ is not a multiple of $\pi$ because then there is an infinite set of $n$ values for which the fractional part of $nz/2\pi$ obeys
$$\left\{\frac{nz}{2\pi}\right\} > \frac16$$  and each such value contributes at least 
$\frac12(e^{-z})^n$ to the sum, so the sum of the absolute values of the terms is greater than that of a geometric series with increasing terms, which diverges.
Also the series does not converge absolutely for any $z = -k\pi$ with $k \in \Bbb Z^+$: For even $k$, this becomes simply the sum of $e^{-nz}$ while for odd $k$ you can pair each even term with its successor to get $(1-e^{k\pi}) \sum e^{2kn\pi}$ which again is the sum of a geometric series with increasing terms.  
So the domain of absolute convergence is simply $z>0$.  That answers the question that whoever posed this probably meant to be asking, since people generally don't talk about a radius or domain of conditional convergence.
We are left with the question of whether for any $z <0$ the series can converge conditionally; and I would modify the question to ask whether there is any $z \in \Bbb C$ with $\Re (z) < 0$ such that $\sum_{n\in \Bbb N} e^{-nz} \cos(nz)$ converges conditionally.
I believe it is a theorem that if $S_n$ is a series whose positive terms taken by themselves diverge, and whose negative terms summed by themselves converge, then the terms of $S_n$ can be rearranged and grouped such that the sums of the groups form a convergent series.  The argument above about absolute convergence can be applied to both the positive and negative terms.  Therefore, when $z <0$ but $z$ is not a multiple of $2\pi$, the series converges conditionally (but not absolutely).

EDIT After Clayton's comment
A further requirement in the statement about conditional convergence is "and both the positive terms and the negative terms go to zero as $n\to\infty$.  This sequence does not meet that requirement, so the rearrangement theorem cannot be used to prove it is conditionally convergent.
It is still plausible that for some values of $z$ with $\Re(z) < 0$ the terms can be rearranged (regrouped) to show conditional convergence but it seems unlikely since the absolute value of the typical term grows exponentially.
A: Because you asked how to find the series expansion of your function:
Since $\cos(nz) = \frac{e^{i n z} + e^{-i n z}}{2}$, we have
$$
\cos(nz) e^{-nz}
= \frac{e^{-(i + 1)nz} + e^{(i - 1)nz}}{2}.
$$
Now, we can just use those series definitions to get
\begin{align}
\cos(nz) e^{-nz}
& = \frac{1}{2} \left( \sum_{k = 0}^{\infty}\frac{(-(i + 1)n z)^k}{k!}
+ \sum_{k = 0}^{\infty}\frac{((i - 1)n z)^k}{k!}\right) \\
& = \frac{1}{2} \left( \sum_{k = 0}^{\infty}\frac{(nz)^k}{k!} \left((-(i + 1))^k + ((i - 1))^k\right)\right) \\
& = \frac{1}{2} \left( \sum_{k = 0}^{\infty}\frac{(nz)^k}{k!} 2^{\frac{k}{2} + 1} \cos\left(\frac{3 \pi k}{4}\right)\right) \\
& = \sum_{k = 0}^{\infty}\frac{\left(\sqrt{2}nz\right)^k}{k!} \cos\left(\frac{3 \pi k}{4}\right).
\end{align}
Now we know that $\cos\left(\frac{3 \pi k}{4}\right) \in \left\{ 0, \pm 1, \pm \frac{1}{\sqrt{2}}\right\}$ for $k \in \mathbb{N}$.
When summing over all $n$, we can split the sum use the properties of the geometric sum and obtain (for $e^{\Re(z) \pm \Im(z)} > 1$)
\begin{align}
\sum_{n = 0}^{\infty} \cos(nz) e^{-nz}
& = \frac{1}{2} \sum_{n = 0}^{\infty} \frac{e^{-(i + 1)nz} + e^{(i - 1)nz}}{2}
= \frac{1}{2} \left(\frac{e^{(1 + i) z}}{e^{(1 + i) z} - 1}\right) - \frac{1}{2} \frac{e^z}{e^{i z} -e^z}\\
& = \frac{e^z (e^{2 i z} - 2 e^{(1 + i) z} + 1)}{2 (e^{i z} - e^{z}) (e^{(1 + i) z} - 1)}
= \frac{1}{2 (e^{(1 + i) z} - 1)} + \frac{e^{i z}}{2 (e^z - e^{i z})} + 1.
\end{align}
