il try out subjectively:
code: let m be 'mew not'
field=B={m*n*i(cos@1-cos@2)}/2
where @ is the angle made between the pt of consideration(o) of the field wid the end pt of the solenoid..
so x=Rcot@ where x is dist along hor of endpts from O..
as the pt u r considering is midpt @1=@2 +90
now diff B wrt @ (or x) and chk up..il try to post the whole thing soon
did for solenoid so not applicable for the q