Give examples and formulas and full solutions for some complex problems that need casework. Draw from existing AIME problems and AMC problems