Upvote:4
In the title to your question you asked about what happens to countries that split up, but in the body of the question you ask also about countries that got united (or reunited) and specifically about Germany. Perhaps I can answer this part.
After the second World War West Germany retained the old nationalist Deutschlandlied (“Deutschland, Deutschland über alles”), which had been the German National Anthem since 1922, with a text by Hoffmann von Fallersleben (1841), reusing a melody composed by Josef Hayden for the Austrian Imperial anthem in 1797. However, in West Germany usually only the last of the three stanzas was publicly performed.
The German Democratic Republic (East Germany) had a new national anthem, “Auferstanden aus Ruinen”, with a melody by the famous composer Hanns Eisler (1949).
When East Germany was reunited with (or rather: annexed by) West Germany in 1990 the Deutschlandlied became the anthem of the whole country.
Upvote:4
Often enough, when a nation wants to separate there is enough animus to stop much yearning for the old anthems. In the American Civil War, the South quickly enough adopted songs like "Dixie" and "The Bonnie Blue Flag" as anthems.
At the war's end, Lincoln said in public that we could now play Dixie as an anthem too because we had captured it.
Upvote:6
When Bangladesh became a separate country from Pakistan (transforming from East Pakistan into Bangladesh) they adopted a Bengali song written by Rabindranath Tagore in 1905, called "Shonar Bangala" (Golden Bengal). Since one of the reasons for the aspiration of a new nation was the Bengali language itself, this seemed to be the right thing to do.
However, what is interesting is that even prior to Bangladesh becoming an independent nation, they never really adopted the national anthem sung in West Pakistan, the Qaumi Taranah. Instead they had their own alternate Bengali anthem, "Pakistan Zindabad".
In this case, it was therefore practical to have a new anthem to prove your independence and break from the former nation, creation of a new national identity. An important political requirement of any nation is that it have its own sovereign identity, so a national anthem proclaiming uniqueness and h*m*geneity (in this case the Bengali language being an underlining factor), becomes a good practical fit. However, it is important to remember that the aspiration itself, for a new national identity, is often fuelled by passion, and therefore its role cannot be neglected. In the case of Bangladesh there were passionate reasons for the demand for a new country, besides political ones.
Upvote:8
During its entire history, Czechoslovakia had two anthems (or one anthem composed from two songs): the Czech song Kde domov můj and the Slovak song Nad Tatrou sa blýská.
So, when Czechoslovakia broke up, the solution was simple: Czech Republic adopted Kde domov můj and Slovakia Nad Tatrou sa blýská as their anthems.