One of the simplest ways to analyze these two is to compare and contrast them. First, they are brothers and caught up in a bit of a struggle for power. Duke Frederick is the younger, but holds the power at the opening of the play, having banished his elder brother Duke Senior.
For similarities, both are fathers: Duke Frederick is the father of Celia and Duke Senior of Rosalind. Both are also actually rulers of their dominions: Duke Frederick at court and Duke Senior in the Forest of Arden.
But they are very different men. Duke Senior is the rightful Duke, but as he has been banished by his brother, he sets up a Utopian society in the forest which he rules, sort of like Robin Hood (without the stealing). He is good and virtuous.
Duke Frederick is sneaky, full of intrigues and a bit devoid of motivation for his actions. He represents all the power plays and back-stabbings of a political life. We can recognize the potential for this even in our politicians today when we observe that "power" can corrupt.
This being a Comedy in which a world turned topsy-turvey is made right at the end of the play, Duke Senior is restored to his rightful place of power. And Duke Frederick repents and relents, restoring balance and harmony to the world of the play.