I am building a solenoid electromagnet with a core of known permeability $\mu$. The core needs to stick out slightly beyond the ends of the coils. Let's assume that the magnet is oriented with its core axis aligned to the z-axis. I can easily calculate the B-field of that solenoid anywhere along the z-axis so long as I'm within the core, and I'm assuming that the B-field at the very ends of the core is the same as in the center.
The problem is, that the parameter I need to be able to calculate and optimize is the B-field 4.5 mm away from the end of the core along the z-axis. (i.e. 4.5 mm beyond the end of the electromagnet).
For the air-cored case, this is very simple (see, for example, Griffith's E&M problem 5.11 from 4e). I think my case is a lot harder though. I don't think I can just replace $\mu_0$ with $\mu$, since the magnetic medium does not extend all the way to the point in question. (There are 4.5 mm of air between the end of the core medium and the point of interest. Does anyone have any ideas on how to determine the B-field at this point?