We know the identity a3+b3=(a+b)(a2+b2−ab)
Using the above identity, the equation (1−a)3+(3a)3 can be factorised as follows:
(1−a)3+(3a)3=(1−a+3a)[(1−a)2+(3a)2−((1−a)×3a)]=(1+2a)(1+a2−2a+9a2−3a+3a2)
=(1+2a)(13a2−5a+1)
Hence, (1−a)3+(3a)3=(1+2a)(13a2−5a+1)