# how to write cluster integral with latex?

How can generate the following equations with latex?

• Which part of the equation are you asking about specifically? If it is the graphs then you can try using TikZ, see for example the TikZ manual section 5 "Tutorial: Diagrams as Simple Graphs" on page 69. You can use TikZ inside of an equation with the \tikz command, see Section 2.3 of the manual on page 32. – Marijn Apr 16 at 8:44

Using TikZ to draw the clusters:

\documentclass[preview,border=3.14]{standalone}

\usepackage{tikz}
\usepackage[]{amsmath}

\tikzset
{%
,cluster dif/.store in=\clusterDif
,cluster dif=.5
,cluster color/.store in=\clusterColor
,cluster color=blue
,cluster node/.style=%
{%
,draw
,circle
,execute at begin node=$\scriptstyle ,execute at end node=$
,inner sep=1pt
}%
}

\newcommand\cluster[2][]
{%
\mathord
{%
\vcenter
{%
\hbox
{%
\tikz\draw[\clusterColor,#1] node[cluster node](1){1}
++(\clusterDif,0) node[cluster node](2){2}
++(-120:\clusterDif) node[cluster node](3){3}
\foreach\x/\y in {#2}{(\x)--(\y)}
;%
}%
}%
}%
}

\begin{document}
$$b_3(V,T) = \frac{1}{3!\,V}\int [\, \cluster{1/2,3/1} + \cluster{2/3} + \cluster{2/3,3/1} + \cluster{1/2,2/3,3/1} \,]$$
\end{document}


• @egreg good idea, will do. – Skillmon Apr 16 at 11:16