The fact Vader never tries to take the Emperor out when he has the chance is a little annoying, but I justify it with 2 factors: 1. The Emperor is quite simply superior to Vader and he knows it. 2. Vader's somewhat loyal to him for a time, shortly after his defeat on Mustafar, as he feels some kinship with him for their previous "friendship" as Jedi Knight and Chancellor, and due to both being physically scarred. Now, Vader's loyalty to the Emperor slowly fades with time, as he becomes more comfortable in his shell, experiences the return of his lust for power, and Palpatine continues to undermine him with numerous tests. Honestly, as far as Vader knows whenever Palpatine appears to be weak, it could just be another test. Then there's the issue that Palpatine's not happy with Vader as an Apprentice, and is constantly seeking someone stronger in the latter half of their partnership. Instances like the one on the Death Star with Galen, where Palpatine actively urges Galen to kill Vader (Vader probably had a flashback to the Invisible Hand where Palpatine urged him to kill Dooku) shows Vader just how expendable he is, and that he's basically living on borrowed time. He therefore has make a plan to kill Palpatine at some point, or risk being killed himself. There's also the fact that in the early days, Palpatine still believed Vader could surpass him, and wasn't trying to replace him. So there wasn't as much friction between the two. But you know, familiarity breeds contempt. This too. Vader quite simply fears Palpatine on some level.