The charge through a conductor of resistance R varies with time as q=at−bt2 where a and b are constant. Total heat produced in R is