This article aims to obtain a new analytical solution of a specific form of the Grad-Shafranov (GS) equation using Walker’s formula. The new solution has magnetic field lines with X-type neutral points, magnetic islands and singular points. The singular points are located on the x-axis. The X-points and the center of the magnetic islands do not appear on the x-axis an island appears at $z>0$ and the other two at $z<0$. The aforementioned property allows us to use this solution as an initial condition at $t=0$ s in an magnetohydrodynamic (MHD) numerical simulation by excluding the singular points of the solution, i.e., the x-axis, and maintaining the magnetic structure of the islands, as well as the X-type neutral points. For this, we numerically solve the equations of the classical ideal MHD in two dimensions using the Newtonian CAFE code. The code is based on high resolution shock capturing methods using the Harten-Lax-van Leer-Einfeldt (HLLE) flux formula combined with MINMOD reconstructor. The MHD simulation shows a very fast dissipation in less than one second of the magnetic islands present in the initial configuration. Almost all structures left the integration region at $13.2$ s, and the magnetic field vector reverses its polarity very quickly. In addition, our simulation allows us to observe the fast temporal evolution of the magnetic islands turning into elongated current sheets. As a limitation of the model, the difficulty in relating it to a physical system because of fast temporal evolution is considered.