4. Elliptic Cylinder Harmonic Expansion and On-Axis Gradients The stage is now set to describe the expansion of any harmonic function ψ in terms of Mathieu functions. The general harmonic function that is analytic in x and y near the origin can be written in the coordinates (24) in the form Upon dividing both sides by P Q , (36) becomes from which it follows that Therefore, there is a common separation constant a such that and Correspondingly, P and Q must satisfy the ordinary lin- ear differential equations where where the functions c$_{n}$ ( k ) and s$_{n}$ ( k ) are arbitrary. We will call (42) an elliptic cylinder harmonic expansion. To exploit this expansion, suppose the magnetic field B ( x, y, z ) is interpolated onto the surface u = U of an elliptic cylinder using values at the grid points near the surface. See Fig. 5. Let us employ the notation B ( x, y, z ) = B ( u, v, z ) so that the magnetic field on the surface can be written as B ( U, v, z ). Next, from the values on the surface, compute B$_{u}$ ( U, v, z ), the compo- nent of B ( x, y, z ) normal to the surface. Our aim will be to determine the on-axis gradients from a knowledge of B$_{u}$ ( U, v, z ). At this point we note that the functions exp( ikz )se$_{n}$( v, q ) and exp( ikz )ce$_{n}$( v, q ) form a complete set over the surface of the elliptical cylinder. Let us begin by solving (32a) for ( ∂ψ/∂u ). We find, using (26), the result, Equation (40b) for Q is called the Mathieu equation, and Equation (40a) for P is called the modified Mathieu equation. For our purposes, we will need solutions Q ( v ) of (40b) that are periodic with period 2 π . Such solutions exist only for certain characteristic values of the sepa- ration constant a . These values are denoted a$_{n}$ ( q ) for n = 0 , 1 , 2 , 3 , · · · and b$_{n}$ ( q ) for n = 1 , 2 , 3 , · · · . The solu- tions associated with the separation constants a = a$_{n}$ ( q ) are denoted ce$_{n}$( v, q ). They are even functions of v and, in the small q limit, are proportional to the functions cos( nv ). The solutions associated with the separation constants a = b$_{n}$ ( q ) are denoted se$_{n}$( v, q ). They are odd functions of v and, in the small q limit, are proportional to the functions sin( nv ). The functions ce$_{n}$( v, q ) and se$_{n}$( v, q ) form a complete orthogonal set over the interval v ∈ [0 , 2 π ] and are normalized so that With regard to the solutions of the modified Mathieu equation, note that (40b) is transformed into (40a) under v → iu . As a result, corresponding (real-valued) solu- tions to (40a) are defined by Ce$_{n}$( u, q ) = ce$_{n}$( iu, q ) and Se$_{n}$( u, q ) = − i se$_{m}$( iu, q ). We refer the reader to [3, 4] and [8] for a detailed treatment of the Mathieu functions and their properties. Next multiply both sides of (45) by exp( − ik $^{′}$z ) and inte- grate over z . So doing gives the result Moreover, using the representation (42) in (43) and (44), we may also write We see that the right side of (43) is a well-behaved func- tion F ( u, v, z ) whose values are known for u = U , 1 2 π ∫ ∞ −∞ dz e − $^{ikz}$F ( U, v, z ) = ∞ ∑ n =0 c$_{n}$ ( k )Ce ′ $_{n}$( U, q ) ce$_{n}$( v, q ) + ∞ ∑ n =1 s$_{n}$ ( k )Se ′ $_{n}$( U, q ) se$_{n}$( v, q ) . (46) ∫ 2 π 0 dv ce$_{m}$( v, q ) ce$_{n}$( v, q ) = πδ$_{mn}$, (41a) ∫ 2 π 0 dv se$_{m}$( v, q ) se$_{n}$( v, q ) = πδ$_{mn}$, (41b) ∫ 2 π 0 dv ce$_{m}$( v, q ) se$_{n}$( v, q ) = 0 . (41c) F ( U, v, z ) = ∞ ∑ n =0 ∫ ∞ −∞ dk c$_{n}$ ( k ) e $^{ikz}$Ce ′ $_{n}$( U, q ) ce$_{n}$( v, q ) + ∞ ∑ n =1 ∫ ∞ −∞ dk s$_{n}$ ( k ) e $^{ikz}$Se ′ $_{n}$( U, q ) se$_{n}$( v, q ) . (45) F ( U, v, z ) = f (sinh U cos v ) B$_{x}$ ( U, v, z ) + f (cosh U sin v ) B$_{y}$ ( U, v, z ) . (44) ( ∂ψ/∂u ) = f [cosh $^{2}$( u ) − cos $^{2}$( v )] 1 / $^{2}$B$_{u}$ (43) = f (sinh u cos v ) B$_{x}$ + f (cosh u sin v ) B$_{y}$. q = − k $^{2}$f$^{2}$/ 4 . (40c) d $^{2}$Q/dv2 + [ a − 2 q cos(2 v )] Q = 0 , (40b) d $^{2}$P/du2 − [ a − 2 q cosh(2 u )] P = 0 , (40a) − (1 /Q )( ∂$_{v}$ ) $^{2}$Q − ( k $^{2}$f$^{2}$/ 4)[2 cos(2 v )] = a. (39b) (1 /P )( ∂$_{u}$ ) $^{2}$P − ( k $^{2}$f$^{2}$/ 4)[2 cosh(2 u )] = a (39a) ψ ( u, v, z ) = ∞ ∑ n =0 ∫ ∞ −∞ dk c$_{n}$ ( k ) e $^{ikz}$Ce$_{n}$ ( u, q ) ce$_{n}$( v, q ) + ∞ ∑ n =1 ∫ ∞ −∞ dk s$_{n}$ ( k ) e $^{ikz}$Se$_{n}$ ( u, q ) se$_{n}$( v, q ) (42) (1 /P )( ∂$_{u}$ ) $^{2}$P − ( k $^{2}$f$^{2}$/ 4)[2 cosh(2 u )] = (38) − (1 /Q )( ∂$_{v}$ ) $^{2}$Q − ( k $^{2}$f$^{2}$/ 4)[2 cos(2 v )] . (1 /P )( ∂$_{u}$ ) $^{2}$P + (1 /Q )( ∂$_{v}$ ) $^{2}$Q = ( k $^{2}$f$^{2}$/ 4)[2 cosh(2 u ) − 2 cos(2 v )] , (37) 8