Q:  What is the mass of the little piece?

        Mass of piece     =  (length) * (linear density)

                          =  (  dx  ) * (  a + b*x    )

                          =   (a + b*x) * dx

        

  Q:  What is the total mass of this ruler?

        Mass  =   ( sum of all the little pieces from x = 0 to x = L )


                               /
              =            int |  ( a + b*x )  dx  
                               /


                          (            1     2  )  x=L
              =           (   a x  +  --- b x   )              
                          (            2        )  x=0


                    (           1     2  )       (         1     2  )
              =     (  a L  +  --- b L   )   -   (  0  +  --- b 0   )
                    (           2        )       (         2        )


                                1     2    
              =        a L  +  --- b L     
                                2