How do you beat Mirmulnir in The Elder Scrolls V: Skyrim?

Quick answer: Shoot Mirmulnir with arrows or spells while it flies, hit it hard when it lands, and stay out of its fire breath. Irileth and the guards help, so let them draw its attention.
Show walkthrough (quest spoilers)
Before the fight
Bring healing potions and a bow with plenty of arrows, or a ranged spell. Fire resistance helps a lot, because Mirmulnir’s breath is its main attack. Irileth and several Whiterun guards fight alongside you.
While it flies
Mirmulnir circles the Western Watchtower and breathes fire from the air. Hide behind the tower walls when it dives and shoot it when it turns away. Do not stand in the open where it can hit you again and again.
When it lands
Once it is hurt, it lands on the ground or the tower. Attack it from the side, away from its head, because it bites and breathes fire straight ahead. Back off if it turns to face you.
Finish it
Keep the pressure on until it collapses. Walk up to the body to absorb its soul, then go back to Balgruuf as described in Dragon Rising.
