Observations are reported of different sources of CP violation from an amplitude analysis of B+ -> pi(+)pi(+)pi(-) decays, based on a data sample corresponding to an integrated luminosity of 3 fb(-1) of pp collisions recorded with the LHCb detector. A large CP asymmetry is observed in the decay amplitude involving the tensor f(2)(1270) resonance, and in addition significant CP violation is found in the pi(+)pi S- wave at low invariant mass. The presence of CP violation related to interference between the pi(+)pi S- wave and the P wave B+ -> rho(770)(0)pi(+) amplitude is also established; this causes large local asymmetries but cancels when integrated over the phase space of the decay. The results provide both qualitative and quantitative new insights into CP -violation effects in hadronic B decays.