Theory and application of Mathieu functions