In Revenge of the Sith, Palpatine states to Anakin (when Anakin became Palpatine's apprentice):
To cheat death is a power only one has achieved but if we work together I know we can discover the secret.
So right there Anakin knows Palpatine doesn't know how to cheat death. Padme is a few months pregnant when this happens. So Anakin really thinks he can join the dark side, become Palpatine's apprentice, AND learn how to cheat death all before Padme gives birth in a few months? As Palpatine said, "cheating death is a power only one has achieved" so this means it could take YEARS to learn-- but Padme is giving birth in only a few months-- so what was Anakin's plan here?