Prob. 3.12

Clear["`*"]

Integrate[ρ BesselJ[0, k ρ], {ρ, 0, a}]

f[ρ_, z_]  =  
      V a Integrate[
          BesselJ[1, k a] BesselJ[0,  k ρ] Exp[-k z], {k, 0, 
            Infinity}, 
          Assumptions ->  {a > 0,  
              z > 0, ρ ≥ 0}]

Simplify[f[0, z], Assumptions ->  {a > 0, z > 0}]

Expand[
      Simplify[f[a, z], Assumptions ->  {a > 0, z > 0}]]

Prob 3.13

Clear["`*"]

Evaluate  the first radial integral c1[k] =  \(TraditionalForm\`∫\((1 - 
                x\^\(\(2\)\(/\)\)/
                  d\^2)\)\ [\((\(r\_ < \))\)\^k/\((\(r\_ > \))\)\^\(k + 1\)] dx\)

F1  =  (1 - x^2/d^2) x^k/r^(k + 1)

Int1  =  
      Integrate[F1, {x, 0, r}, 
        Assumptions  ->  k ≥ 0]

F2 =  (1 - x^2/d^2) r^k/x^(k + 1)

Int2  =  
      Integrate[F2, {x, r, d}, 
        Assumptions -> {  d > r,  d > 0,  r >  0,  
            k ∈  Integers}]

q   = Expand[Int1  +  Int2]

p1  =  Together[q[[1]] + q[[2]]]

p2 =  Together[q[[3]] + q[[4]]]

p3  =  
      Together[q[[5]] + q[[6]]] /.  
        r^k ->  (r/d)^k d^k

q = (∫^r) dx ((d^2)-(x^2)) (x^k)/(r^(k + 1))

q[k_]  =  p1 + p2 + p3

Take care of the special case k=0

Int10  =  Int1 /.  k -> 0

f2  =  F2 /.  k -> 0

Int20  =  
      Integrate[f2, {x, r, d},  
        Assumptions ->  {d > r,  r ≥ 0}]

q0  =  Expand[Int10 + Int20]

Take care of the special case k = 2

Int12  =  Int1 /.  k -> 2

f2  =  F2 /.  k ->  2

Int22  =   Integrate[f2, {x, r, d},  
        Assumptions ->  {d > r,  r ≥ 0}]

q2  =  Expand[Int12 + Int22]

Evaluate the second radial integral in the Green function

Int3  =  (r^k/b^(2  k + 1)) 
        Integrate[(1 - x^2/d^2) x^k, {x, 0, d}, 
          Assumptions ->  k > 0]

t0 =  Int3 /.  k ->  0

c0  =  q0 - t0

t2  =  Int3 /.  k ->  2

c2  =  q2 - t2

c[k_]  = q - Int3

Nt  =  20

ϕ1[r_, μ_]  =  
      c0  +  c2 LegendreP[2, μ]  +  
        Sum[c[k] LegendreP[k, μ], {k, 4, Nt, 2}]

Now consider the case r > d

Int4  =  
      Integrate[F1, {x, 0, d}, Assumptions ->   k  >  0]

s[k_]  = Int4 - Int3

ϕ2[r_, μ_]  =  
      Sum[s[k] LegendreP[k, μ], {k, 0, Nt, 2}]

ϕ1[d, μ] - ϕ2[d, μ]

Φ[r_, μ_]  =  
      Piecewise[{{ϕ1[r, μ], r < d}, {ϕ2[r, μ], 
            r > d}}]

F[x_, z_]  =  Φ[Sqrt[x^2 + z^2], 
        z/Sqrt[x^2 + z^2]]

Plot3D[
      F[x, z] /. {b -> 2, d -> 1}, {x, -2, 2}, {z, -2, 
        2}]

σ  =  D[ϕ2[r, μ], r] /.  r ->  b

Plot[σ  /.  {d ->  1, b -> 2}, {μ, -1, 
        1}]

2 π b^2 Integrate[σ, {μ, -1, 1}]