First let us calculate the potential for a ring of radius $a$ at a distance $x$ from the center along the axis
Potential due to an infinitesimal mass element $dm$ will be $$\frac{-Gdm}{\sqrt{a^2+x^2}}$$
Potential due to the ring is then $$\int{\frac{-Gdm}{\sqrt{a^2+x^2}}}=\frac{-G}{\sqrt{a^2+x^2}}\int{dm}=\frac{-Gm}{\sqrt{a^2+x^2}}$$
Since $G, a, x$ are constant
Now let us break the disc into infinitesimal rings of mass $dm=2\pi rdr\frac{M}{\pi a^2} (=area * density)$
The potential due to a ring of radius $r$ and mass $dm$ as given above is $$\frac{-Gdm}{\sqrt{r^2+x^2}}=\frac{-2GMrdr}{a^2\sqrt{r^2+x^2}}$$
Integrating this from $0$ to $a$
$$\int{\frac{-2GMrdr}{a^2\sqrt{r^2+x^2}}}$$
$$=\frac{-GM}{a^2}\int{\frac{2rdr}{\sqrt{r^2+x^2}}}$$
putting $t^2=r^2+a^2$ and $2rdr=2tdt$
$$=\frac{-GM}{a^2}\int{\frac{2tdt}{\sqrt{t^2}}}$$
$$=\frac{-GM}{a^2}[2t]^{\sqrt{a^2+x^2}}_{x}$$
$$=\frac{-2GM}{a^2}({\sqrt{a^2+x^2}}-{x})$$
For intensity, it can be seen by symmetry that it is along the axis thus we work only with axial components
So, for ring
$$\int\frac{-Gdmcos\theta}{a^2+x^2}$$
where $\theta$ is half of the angle subtented by the point on the ring
$$cos\theta=\frac{x}{\sqrt{a^2+x^2}}$$
$$K=\int\frac{-Gxdm}{(a^2+x^2)^{3/2}}=\frac{-Gxm}{(a^2+x^2)^{3/2}}$$
For a disc, based on the same reasoning as in potential, it is
$$K=\int\frac{-Gxdm}{(r^2+x^2)^{3/2}}$$
$$=\int\frac{-2GMxrdr}{a^2(r^2+x^2)^{3/2}}$$
$$=\int\frac{-2GMxtdt}{a^2(t^2)^{3/2}}$$
$$=\int\frac{-2GMxdt}{a^2t^2}$$
$$=\frac{-2GMx}{a^2}[\frac{-1}{t}]^{\sqrt{a^2+x^2}}_x$$
$$K=\frac {2 G M}{a^2} \left( \frac{x}{\sqrt{a^2+x^2}}-1 \right)$$