In the book, the Battle of Five Armies is a direct consequence of Smaug's death. The dragon's death sets off a chain reaction:
* The dwarves become the target of the humans and elves: They want the treasure that Smaug guarded, and the dwarves are seen as the rightful owners.
* The goblins and wargs emerge from the mountains: They were attracted by the commotion and saw an opportunity to plunder.
* Azog and Bolg, the Orc leaders, join the fray: They were already at war with the dwarves and saw a chance for revenge.
Therefore, in Tolkien's original story, the Battle of Five Armies is not a separate event from the dragon's demise. It's a direct and immediate consequence of Smaug's death, bringing all the surrounding forces into conflict.
In the film, the Battle of Five Armies is more separate:
* The dragon's death is depicted as a separate event from the battle, though it serves as a catalyst.
* The film emphasizes the strategic reasons for the battle: The humans and elves, seeing the dwarves weakened, attempt to seize their treasure.
* The goblins and wargs are shown to be involved in a separate plot to attack Lake-town, with the battle happening when they encounter the other forces.
This change in the film creates a more dramatic narrative, with the battle serving as a separate, epic climax to the story. However, it diverges from the book's more direct cause and effect relationship between Smaug's death and the battle.