We design fast protocols to separate or recombine two ions in a segmented Paul trap. By inverse engineering the time evolution of the trapping potential composed of a harmonic and a quartic term, it is possible to perform these processes in a few microseconds without final excitation. These times are much shorter than the ones reported so far experimentally. The design is based on dynamical invariants and dynamical normal modes. Anharmonicities beyond the harmonic approximation at potential minima are taken into account perturbatively. The stability versus an unknown potential bias is also studied.