S= ∑r*40Cr*30Cr from r=0 to 40
now note that 30Cr is only defined as long as r is less than equal to 30. so our sum is equivalent to
S= ∑r*40Cr*30Cr from r=0 to 30
now, we use the formula: r*nCr= n*n-1Cr-1 (note that this formula is extremely easy to prove)
so, S= ∑4039Cr-1*30Cr from r=0 to 30
S= 40*∑39Cr-1*30Cr from r=1 to 30
= 40*∑39Ck*30Ck+1 from k=0 to 29
S=40*∑39C29-k*30Ck from k=0 to 29 (here we have replaced f(k) by f(0+29–k) due to property of ∑ and used nCk= nCn-k)
now, ∑39C29-k*30Ck= coefficient of x^29 in (30C0*x^0+30C1*x^1+....+30C30*x^30)*(39C0*x^0+39C1*x^1+.....+39C39*x^39)
= coefficient of x^29 in (1+x)^30*(1+x)^39= (1+x)^69
= 69C29
hence, S= 40*69C29
note that the above ques is quite hard and if you need some more solved examples of these types, kindly refer TMH advanced book and you will find plenty of them along with complete solutions