s22caf calculates real-valued periodic angular Mathieu functions ( or ) and/or their first derivatives, where and are solutions to the Mathieu differential equation .
The routine may be called by the names s22caf or nagf_specfun_mathieu_ang_periodic_real.
3Description
s22caf calculates an approximation to and/or , or and/or , where and are respectively the even and odd parity real-valued periodic angular Mathieu functions, for an array of values of , and for integer order value , where for even parity, and for odd parity. The routine also returns values of for these periodic Mathieu functions, this is known as the characteristic value or eigenvalue.
The solutions are computed by approximating Mathieu functions as Fourier series, where expansion coefficients are obtained by solving the eigenvalue problem generated from the relevant recurrence relation, see Chapter 28 in NIST Digital Library of Mathematical Functions.
On entry: , the order number of the Mathieu function to be computed.
Constraints:
if (even Mathieu function), ;
if (odd Mathieu function), .
2: – Real (Kind=nag_wp)Input
On entry: , the Mathieu function parameter.
3: – IntegerInput
On entry: specifies whether to compute even or odd Mathieu function.
Compute even Mathieu function, .
Compute odd Mathieu function, .
Constraint:
or .
4: – IntegerInput
On entry: specifies whether the Mathieu function or its derivative is required.
Compute Mathieu function values.
Compute derivative values of Mathieu function.
Compute both Mathieu function and derivative values.
Compute neither Mathieu functions nor derivative values, returns only a (the characteristic value).
Constraint:
, , or .
5: – IntegerInput
On entry: , the number of values to compute.
Constraint:
.
6: – Real (Kind=nag_wp) arrayInput
On entry: the values of at which to compute Mathieu function or derivative values.
7: – Real (Kind=nag_wp) arrayOutput
On exit: if or , the Mathieu function values or . If or , f is not used.
8: – Real (Kind=nag_wp) arrayOutput
On exit: if or , the Mathieu function derivative values or . If or , f_deriv is not used.
9: – Real (Kind=nag_wp)Output
On exit: , the characteristic value for the Mathieu function.
10: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, and . Constraint: if , or if , .
On entry, . Constraint: or .
On entry, . Constraint: , , or .
On entry, .
Constraint: .
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
Not applicable.
8Parallelism and Performance
s22caf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
s22caf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
None.
10Example
This example calculates the first four even and odd function and derivative values at for .