The portrait investigators have begun to piece together of the two brothers suspected of the Boston Marathon bombings suggests that they were motivated by extremist Islamic beliefs but were not acting with known terrorist groups — and that they may have learned to build bombs simply by logging onto the online English-language magazine of the affiliate of Al Qaeda in Yemen, law enforcement officials said Tuesday.