Generic Imitrex is used for the treatment of migraine headaches with or without aura (eg, flashing lights, wavy lines, dark spots). An aura is a strange feeling or visual disturbance that warns you of an attack. It is not used to prevent migraines.
Generic Motrin is used to reduce fever and treat pain or inflammation caused by many conditions such as headache, toothache, back pain, arthritis, menstrual cramps or minor injury.