# Discrete and continuous Centroid equations in LaTeX

I would like to write the following equations in LaTeX: and The first one (with the integrals) I managed to make similarly using the following code:

\begin{equation}
COG = \frac{\int_a^b\!ua(x)x\, \mathrm{d}x}{\int_a^b\!ua(x)\, \mathrm{d}x}
\label{eq:cogCont}
\end{equation}


However, I am using a u instead of a μ and have no idea how to do it another way, as well, I do not know how to make the "A" next to it.

For the second equation, I have no idea where to start. Any ideas?

Thanks!

An exemplary solution. The second label commented.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\def\dint{\displaystyle\int}
\def\dsum{\displaystyle\sum}

\begin{equation}
\mathrm{COG} = \frac{\dint_a^b\!\mu_{A}(x)x\, {d}x}{\dint_a^b\!\mu_{A}(x)\, {d}x}
\label{eq:cogCont}
\end{equation}

\begin{equation}
\mathrm{COG} = \frac{\dsum_{x=a}^b\!\mu_{A}(x)x}{\dsum_{x=a}^b\!\mu_{A}(x)}
%\label{eq:cogCont}
\end{equation}

\end{document} 