how to find complimentary functions