Over time, most FMs will outgrow a 40 gal tank.
And in nature FMs are a shoaling species (living in groups of their own kind).
To see this natural behavior the tank needs to also be large enough, if not, they will fight.
They also share natural waters with fish like swordtails and mollies, so as tlindsey suggested, in such small tank, a shoal these would be better choices than another territorial cichlid.