The charge flowing through a resistance R varies with time t as Q=at−bt2. The total heat produced in R by the time current ceases is