"With the image charge the potential is given by";

q'/(4 Pi ϵ)/Sqrt[x^2+y^2+(z-xi')^2]-q'/(4 Pi ϵ)/Sqrt[xi'^2/a^2 (x^2+y^2+(z-a^2/xi')^2)]

phi[x_, y_, 
        z_] = q'/(4 Pi ϵ)/
          Sqrt[Expand[
              x^2 + y^2 + (z - xi')^2]] - q'/(4 Pi ϵ)/
          Sqrt[Expand[
              xi'^2/a^2 (x^2 + y^2 + (z - a^2/xi')^2)]]

%  /.  z^2 -> a^2 - x^2 - y^2

Simplify[%]

\(\(\*""σ=ϵ E .\!\(\(\(\(\\ \)\(n\)\)\&^\)\)= -ϵ grad Φ.\!\(\(n\&^\)\)  "";\)\)
\(\(\*"" Here \!\(\(\(\(\\ \)\(n\)\)\&^\)\) is pointing in "";\)\)

chargedensity = ϵ ((x D[
                    phi[x, y, z], x]  + y D[phi[x, y, z], y] + 
                z D[phi[x, y, z], z])/
            Sqrt[x^2 + y^2 + z^2])

Simplify[
      chargedensity  /.  z^2 -> a^2 - x^2 - y^2]

sigma=-((q' ((a^2)-(((xi'))^2)))/(4 a π ((((a^2)-2 a Cos[theta] xi'+(((xi'))^2)))^(3/2))))

2 Pi a^2 FullSimplify[
        Integrate[
          sigma Sin[theta], {theta, 0, Pi}]]
FullSimplify[% /. {(Sqrt[(((a-xi'))^2)])->a - xi',(Sqrt[(((a+xi'))^2)])->a + xi'}]

\(
\("The potential due to the image charge is ";\)\)
phimage = -q'/(4 Pi ϵ)/
        Sqrt[Expand[
            xi'^2/a^2 (x^2 + y^2 + (z - a^2/xi')^2)]]

Electric field

\(grad = \(-i\&^\)\ D[phimage, x] - j\&^\ D[phimage, y] - \ 
        k\&^\ D[phimage, z]\)

Simplify[
      grad  /.  {y -> 0, z -> xi', x -> 0}]

" To get V to be a constant we simply add a charge q'=V a 
at the origin";