Compare Medea and Jocasta.
Both Medea and Jocasta commit morally reprehensible acts in relation to their children, albeit for different reasons. Medea is traditionally presented as the epitome of evil for the murder of her children. Her rationale for carrying out such a heinous act is tenuous at best: she wants revenge upon Jason.
Jocasta is also party to a truly wicked act, one in which her baby son, Oedipus, has his legs pinned together before being left to die on a mountain. The difference here is that Jocasta (and her husband King Laius) are attempting to thwart a frightening prophecy (which tragically comes true in any case.) This is not said to justify her actions in any way, it simply shows that her motives are somewhat different from Medea's. Medea's murder of her children is a private act of revenge; Jocasta's exposure of Oedipus can be construed as an act of state carried out for the long-term benefit of Thebes.
Jocasta exposes Oedipus in order to avoid potential trouble; Medea is the instigator of trouble. It was prophesied that Oedipus would one day do great wrong and that he would kill his father. It is understandable why someone at that time would want to prevent this from happening, even if the method used was unacceptable.
However, there is no sense in which Medea's children were anything other than innocent; there was simply no reason for them to be killed. Medea's act of murder was a purely selfish act. At no point was she thinking about the good of the community as Jocasta was. Her children were nothing more to her than collateral damage caught in the middle of a bitter marital dispute.
As previously noted, both Medea and Jocasta commit terrible acts upon their children in a manner of ways, the most shocking of these acts being filicide and incest. They have some other interesting similarities though as well that seem to influence their unhappy endings.
The first might be that of a mystical element that does more to hinder than advance their happiness. For Medea, she is considered a sorceress and those same powers she used to help Jason find the fleece, are then later used to kill his bride. Likewise, Jocasta is offered some mystical aid by Tiresias who predicts the unhappy fall of Oedipus and his parents. His warning is meant to aid them from these events unfolding, but instead fall directly into the fate that they sought to avoid. These mystical elements that are meant to help these women really only end up bringing them unhappiness.
Perhaps the strongest similarity on these women is their complicated feelings for their children. Medea wants her revenge exceedingly, but when it comes time to kill them she hesitates, tore between her love for them and her hate for their father. Jocasta too struggles because while it appears to have been easy to abandon Oedipus as an infant, she unhappily loves him later as her husband –albeit unknowingly that he was her son.
Both women also accept what they’ve done as being terrible and arguably, punish themselves for it. Medea kills her children and then rides off, appearing to have escaped punishment. Yet, readers know she goes to Athens to live the rest of her life in unhappiness both for what she’s done and for what Jason’s done. In a sense then, Medea is punished. Jocasta too punishes herself; she sees the fault in her past of ignoring Tiresias and unable to cope with the sin she has committed by marrying Oedipus, she kills herself.