  For a given simple graph $G$, the energy of $G$, denoted by $E(G)$, is
defined as the sum of the absolute values of all eigenvalues of its adjacency
matrix. Let $P_n^{\ell}$ be the unicyclic graph obtained by connecting a vertex
of $C_\ell$ with a leaf of $P_{n-\ell}$\,. In [G. Caporossi, D. Cvetkovi\'c, I.
Gutman, P. Hansen, Variable neighborhood search for extremal graphs. 2. Finding
graphs with extremal energy, {\it J. Chem. Inf. Comput. Sci.} {\bf 39}(1999)
984--996], Caporossi et al. conjectured that the unicyclic graph with maximal
energy is $C_n$ if $n\leq 7$ and $n=9,10,11,13,15$\,, and $P_n^6$ for all other
values of $n$. In this paper, by employing the Coulson integral formula and
some knowledge of real analysis, especially by using certain combinatorial
technique, we completely solve this conjecture. However, it turns out that for
$n=4$ the conjecture is not true, and $P_4^3$ should be the unicyclic graph
with maximal energy.
