For the function itself

The general formulas

Case of simple poles

Case of double poles

Case of canceled double poles

Generic formulas for main term