The word "metaphor" comes from ancient Greek and is defined, etymologically speaking, as "a carrying over." What is being transferred is the meaning of one word to another. When doing a literary analysis of a poem, a metaphor is defined as the implicit comparison of two distinctly different words or concepts. There are four significant metaphors in Paul Laurence Dunbar's poem "Sympathy," and you can study them in order to gain insightful observations that will strengthen your reading and interpretation of the poem.
You will find this comparison in the first stanza: "When the first bird sings and the first bud opes, / And the faint perfume from its chalice steals." This comparison is a metaphor. The cup of a flower is being compared to a chalice, a drinking vessel, filled with perfume. This is when it comes in handy to have a broad knowledge base or a good dictionary that will show you the etymology or history of a word. In order to try to make sense of why Dunbar would make this comparison, it might help to know that the word "nectar" -- the sweet liquid inside a flower -- derives from ancient Greek and was originally the drink of the gods, literally meaning "to overcome death." This meaning echoes a general theme of the poem: the desire to be free.
Sometimes metaphors can be more difficult to detect as the things that are being compared are not always seen in their noun form. For instance, in the second stanza of the poem the bird beats his wings against the "cruel bars." You can figure out that the bars of a cage don't actually have feelings or intentions as they are inanimate objects. Here, you can say that the bars are being anthropomorphized, given a quality that pertains specifically to humans. In this case, the anthropomorphism also acts as a metaphor: The bars are being compared to cruel jailers. You can then ask yourself why Dunbar would choose this particular adjective and who these cruel jailers might be.
As metaphors can be found in adjectives, they can also be found in verbs. For instance, in the third stanza, Dunbar describes the bird praying: "But a plea, that upward to Heaven he flings." Now, usually people -- or in this case anthropomorphized birds -- do not "fling" their prayers around in the same matter that they would toss, for example, a ball. The comparison being made here is between "directing a prayer" and "flinging an object" -- a rather aggressive or at least more physical action. Perhaps Dunbar is trying to draw attention to the idea that one who prays does not always have the luxury of gentle contemplation.
One thing that is easy to overlook when doing poetry analysis is the larger picture -- the poem as a whole. In fact, this entire poem is one large, sustained metaphor. The poet-speaker is comparing himself to a bird in a cage: Like the bird that he feels sympathy for, he has been mistreated, feels trapped and longs to be free. Here, it may help to have a bit of historical context: Paul Laurence Dunbar, born in 1872, was one of the first African-American writers to be nationally accepted. Now it may be easier to understand why the poet-speaker may feel like a bird in a cage.