Preparation for Lab Exercise 9. This is a calculationally-intensive problem; I would recommend the use of Maple or other symbolic processor if you are so-inclined.
Use HRW Eq. 30-28 with an arbitrary distance between coils s; superimpose result of two coils. Generalize to a distance x on-axis away from the point in the center. This will correspond to setting z = x for one coil and z = s-x for the other coil.
Now evaluate the derivative of B with respect to x and demonstrate that at the midpoint, x = s/2, the derivative is zero.
Evaluate the second derivative of B with respect to x. Show that at x = s/2, the second derivative is also zero if s = R.
Go to a point P located a distance x away from the center; choose infinitesimally thin bands of the solenoid and treat as circular current loops. Span the solenoid with bands from z = -(L+x) to +L-x and thereby integrate the contributions to B at a distance z away from the center of each infinitesimal current ring.