def get_antiderivative_difference(self, lower_bound, upper_bound):
    strings = []
    for bound in (upper_bound, lower_bound):
        try:
            d = int(bound)
            strings.append(('(%d)' % d))
        except:
            strings.append(bound)
    parts = []
    for s in strings:
        part = TexMobject('\\left(', '4', s, '^2', '-', '\\frac{1}{3}', s, '^3\\right))')
        part.set_color_by_tex(s, YELLOW, substring=False)
        parts.append(part)
    result = VGroup(TexMobject('='), parts[0], TexMobject('-'), parts[1])
    (result.left_part, result.right_part) = parts
    result.arrange(RIGHT)
    result.scale(0.9)
    result.next_to(self.integral, RIGHT)
    return result
def get_antiderivative_difference(self, lower_bound, upper_bound):
    strings = []
    for bound in (upper_bound, lower_bound):
        try:
            d = int(bound)
            strings.append(('(%d)' % d))
        except:
            strings.append(bound)
    parts = []
    for s in strings:
        part = TexMobject('\\left(', '4', s, '^2', '-', '\\frac{1}{3}', s, '^3\\right))')
        part.set_color_by_tex(s, YELLOW, substring=False)
        parts.append(part)
    result = VGroup(TexMobject('='), parts[0], TexMobject('-'), parts[1])
    (result.left_part, result.right_part) = parts
    result.arrange(RIGHT)
    result.scale(0.9)
    result.next_to(self.integral, RIGHT)
    return result