If in the expansion of (1+x)m(1−x)n the coefficient of x and x2 are 3 and -6 respectively, then m is
6
9
12
24
(1+x)m(1−x)n=1+mx+m(m−1)x22!+…1−nx+n(n−1)2!x2−… =1+(m−n)x+n2−n2−mn+m2−m2x2+…
Given, m−n=3⇒n=m−3 and n2−n2−mn+m2−m2=−6⇒ (m−3)(m−4)2−m(m−3)+m2−m2=−6⇒ m2−7m+12−2m2+6m+m2−m+12=0⇒ −2m+24=0⇒m=12