Joesph was Jacob's favorite because he was from Rachael who he loved and wanted to be married to from the start. This of course made all Joesph's other brothers jealous, then to make matters worse Joesph wearing the special robe from his father tells the brothers about dreams he had. These basically were interrupted that they would bow down to him. I don't feel like Joesph was bragging or trying to cause jealousy. He was excited about what God showed him and wanted to share it with his family.
Fratricide to me is a depraved and heartbreaking act since the fall. I don't always get along with my sister but I don't want her dead let alone want to kill her by my own hand. But that's exactly where jealousy drove them to want to do. If it wasn't for the first born Reuben stepping in which his motives are unclear why, they would have killed him.
God had different plans though and if you look at this whole story you can see repeatedly where something that was meant for evil against him God used to bless him. God still does this today for His children because He loves us so much!
Judah either by greed or trying to show mercy without letting his brothers realize it suggests making a profit for selling Joesph versus killing him.
Jacob's grief was so much for the loss of Joesph he says he would grieve till he died basically. "Sheol" is the proper name for the place people go after death. Having had three miscarriages, two after the eighteenth week mark I can sympathize with him. There are still days I grief for them.
Chapter 38 seems so random interrupting the story of Joesph to tell about Judah and his sons, especially the unusual birth of a set of twins, but nothing is really random with God. It's actually a very important part because it tells of about how the bloodline of Judah continued. The significance of the birth of Perez is that Jesus came through that bloodline. God sees the complete picture always!
In chapter 39, Joesph's pureness is a big contrast to what happened in chapter 38. Refusing to commit adultery he end up falsely accused and imprisoned.