We obtain the phase diagram of the half-filled two-dimensional Hubbard model on a square lattice in the presence of Einstein phonons. We find that the interplay between the instantaneous electron-electron repulsion and electron-phonon interaction leads to new phases. In particular, a d(x)(2)-y(2)-wave superconducting phase emerges when both anisotropic phonons and repulsive Hubbard interaction are present. For large electron-phonon couplings, charge-density-wave and s-wave superconducting regions also appear in the phase diagram, and the widths of these regions are strongly dependent on the phonon frequency, indicating that retardation effects play an important role. Since at half filling the Fermi surface is nested, a spin-density wave is recovered when the repulsive interaction dominates. We employ a functional multiscale renormalization-group method [Tsai , Phys. Rev. B 72, 054531 (2005)] that includes both electron-electron and electron-phonon interactions, and take retardation effects fully into account.