Let's consider a disk of charge with total charge \(q\) uniformly distributed in the disk. We find the electric potential at distance \(x\) from the center of the disk on the x-axis of our coordinate system at point \(p\). The plane of the disk is perpendicular to the x-axis (see Figure 1).
We use the electric potential of a ring of charge. In this example we can divide the disk of charge into infinitesimal ring elements of charge \(dq\) and thickness \(dr\) where we consider that \(r\) is the radius of a ring element and \(a\) is the radius of the disk of charge. You can find the electric potential of the disk of charge by integrating the electric potential due to one ring element within limits \(0\) to \(a\). The area of the ring element is \(2\pi r dr\) and the area of the disk of charge is \(\pi a^2\). The ratio of the small charge \(dq\) to the total charge \(q\) is the same as the ratio of the small area \(2\pi rdr\) to the total area \(\pi a^2\) and therefore,
\[\begin{align*} \frac{{dq}}{q} &= \frac{{2\pi rdr}}{{\pi {a^2}}}\\ {\rm{or,}}\quad dq &= \frac{{2qrdr}}{{{a^2}}} \end{align*}\]
The electric potential of the disk of charge is determined by integration:
\[\begin{align*} V &= k\int_0^a {\frac{{dq}}{{\sqrt {{x^2} + {r^2}} }}} \\ {\rm{or,}}\quad V &= \frac{{2kq}}{{{a^2}}}\int_0^a {\frac{{rdr}}{{\sqrt {{x^2} + {r^2}} }}} \\ {\rm{or,}}\quad V &= \frac{{2kq}}{{{a^2}}}(\sqrt {{x^2} + {a^2}} - \left| x \right|) \end{align*}\]