176
14 Mathieu Functions
n: 5
scale: [4.1253e-06 4.8621]
info: {2x1 cell}
>> objfe.info
2x1 cell array
{’fn and dfn, computation based on’}
{’wII, negative parity’
}
The first column in objfe.value are the function values, and the second column
are the values of the first derivative. “obj.scale” has two values. The first one
is S n (q) and the second one the scaling factor c, which is for f e n equal to
objfe.value(1,2).
Functions w I (z, q), w I I (z, q), W I (z, q), and W I I (z, q)
The syntax is, e.g., obj = mathieuFun(’W2hyp’, a, q, ‘zend’,
2) for the modified basis solution W I I (z, q). Here, “a” could be an arbitrary
value. In case “a” is an eigenvalue, the function value will be proportional to the
corresponding (modified) Mathieu function. Example: Computation of an integer
periodic Mathieu function and its derivative, see Eq. (14.20):
>> n = 3;
% 3rd eigenvalue
>> q = 1.75;
% parameter of the differential equation
% computing the corresponding eigenvalue and scaling
% factor ce_n(0, q)
>> obj = mathieuFun(’ce’, n, q, 0, ’eigen’, 1);
% computing the non-scaled function value and its
% 1st derivative
>> objdce=mathieuFun(’w1’, obj.eigen(2), q, ’zend’,pi);
>> cedce=objdce.value * obj.value(1,2);%scaling result
>> plot(objdce.z,cedce), grid on, shg % visualization
The functions se n are negative parity functions. Thus, we need as scaling factor
the first derivative for z = 0 or the function value at a position z = 0.
>> n = 3;
% 3rd eigenvalue
>> q = 1.75;
% parameter differential equation
% for the first derivative we need the eigenvector
>> obj = mathieuFun(’se’, n, q, 0, ’eigen’, 2);
>> eigenvector = obj.eigen{2}(:,2);
>> rsum = 0:length(eigenvector)-1; % see Fourier
>> if mod(n,2) == 0
% expansion of se_n
rs = 2 * rsum+2;
else
rs = 2 * rsum+1;
end
>> rs = rs(:);
% need column
>> dse0 = sum(rs. * eigenvector) % first derivative
% evaluation wII
dse_n(0,q)
>> objdse=mathieuFun(’w2’,obj.eigen{1}(4),q,’zend’,pi);
>> sedse = objdse.value * dse0; % function se_n
%
and its 1st derivative
14 Mathieu Functions
n: 5
scale: [4.1253e-06 4.8621]
info: {2x1 cell}
>> objfe.info
2x1 cell array
{’fn and dfn, computation based on’}
{’wII, negative parity’
}
The first column in objfe.value are the function values, and the second column
are the values of the first derivative. “obj.scale” has two values. The first one
is S n (q) and the second one the scaling factor c, which is for f e n equal to
objfe.value(1,2).
Functions w I (z, q), w I I (z, q), W I (z, q), and W I I (z, q)
The syntax is, e.g., obj = mathieuFun(’W2hyp’, a, q, ‘zend’,
2) for the modified basis solution W I I (z, q). Here, “a” could be an arbitrary
value. In case “a” is an eigenvalue, the function value will be proportional to the
corresponding (modified) Mathieu function. Example: Computation of an integer
periodic Mathieu function and its derivative, see Eq. (14.20):
>> n = 3;
% 3rd eigenvalue
>> q = 1.75;
% parameter of the differential equation
% computing the corresponding eigenvalue and scaling
% factor ce_n(0, q)
>> obj = mathieuFun(’ce’, n, q, 0, ’eigen’, 1);
% computing the non-scaled function value and its
% 1st derivative
>> objdce=mathieuFun(’w1’, obj.eigen(2), q, ’zend’,pi);
>> cedce=objdce.value * obj.value(1,2);%scaling result
>> plot(objdce.z,cedce), grid on, shg % visualization
The functions se n are negative parity functions. Thus, we need as scaling factor
the first derivative for z = 0 or the function value at a position z = 0.
>> n = 3;
% 3rd eigenvalue
>> q = 1.75;
% parameter differential equation
% for the first derivative we need the eigenvector
>> obj = mathieuFun(’se’, n, q, 0, ’eigen’, 2);
>> eigenvector = obj.eigen{2}(:,2);
>> rsum = 0:length(eigenvector)-1; % see Fourier
>> if mod(n,2) == 0
% expansion of se_n
rs = 2 * rsum+2;
else
rs = 2 * rsum+1;
end
>> rs = rs(:);
% need column
>> dse0 = sum(rs. * eigenvector) % first derivative
% evaluation wII
dse_n(0,q)
>> objdse=mathieuFun(’w2’,obj.eigen{1}(4),q,’zend’,pi);
>> sedse = objdse.value * dse0; % function se_n
%
and its 1st derivative
