Due to the absence of a transverse expansion with respect to the beam direction, the Bjorken flow is unable to describe certain observables in heavy ion collisions. This caveat has motivated the introduction of analytical relativistic hydrodynamics (RH) solutions with transverse expansion, in particular, the 3+1 self-similar (SSF) and Gubser flows. Inspired by recent generalizations of the Bjorken flow to the relativistic magnetohydrodynamics (RMHD), we present a procedure for a generalization of RH solutions to RMHD. Our method is mainly based on symmetry arguments. Using this method, we find the relation between RH degrees of freedom and the magnetic field evolution in the ideal limit for an infinitely conductive fluid, and determine the proper time dependence of the magnetic field in aforementioned flows. In the case of SSF, a family of solutions are found that are related through a certain differential equation. To find the magnetic field evolution in the Gubser flow, we solve RMHD equations for a stationary fluid in a conformally flat
$dS^3\times E^1$ spacetime. The result is then Weyl transformed back into the Minkowski spacetime. In this case, the temporal evolution of the magnetic field exhibits a transmission between $1/t$ to $1/t3$ near the center of the collision. The longitudinal component of the magnetic field is found to be sensitive to the transverse size of the fluid. We also find the radial evolution of the magnetic field for both flows. The radial domain of validity in the case of SSF is highly restricted, in contrast to the Gubser flow. A comparison of the results suggests that the Gubser RMHD may give a more appropriate qualitative picture of the magnetic field decay in the quark-gluon plasma (QGP).