Tierce de Picardie
In the 16th to 17th centuries this was a very common way to end a piece in a minor key. This is because music in the minor sounds melancholy or disturbed in comparison to the major because the third note of the scale is flattened (lowered by a semitone). In the harmonic series this minor third is the 7th harmonic which sounds dissonant against the fundamental (first note of the scale). This means that ending in the major gives a sense of relief after the tension of the minor. In a piece in A minor, for example, where the third note of the scale is C natural, in a Tierce de Picardie the final chord will include a C sharp, changing the chord from A minor to A major.
Beethoven’s "Fifth Symphony" is in C minor but the last movement is in the major. This is not a Tierce de Picardie in this case, as the term applies only when just the last chord alters. The term was introduced in 1767 by Rousseau in his "Dictionnaire de musique" (Dictionary of Music). “Tierce” means “third”, but no one knows why he called it “Picardie” (Picardy is an area in the north of France).
Bach used it fairly often in his music. The first movement of the "Concerto for Two Violins and Orchestra" is a good example. In his "Fantasia and Fugue in G minor BWV542" the fugue ends with a Tierce de Picardie and, in some editions, the Fantasie as well. It is possible that Bach would have finished the Fantasie with a major chord only if he was playing it on its own (without the fugue), but we cannot be sure of this. Another good example of the Tierce de Picardie is the end of Cantata No. 82 "Ich Habe Genug", which is extremely effective. Another famous piece that ends in a Tierce de Picardie is Greensleeves.