def write_antiderivative_difference(self):
    antideriv_diff = self.get_antiderivative_difference('0', 'T')
    (equals, at_T, minus, at_zero) = antideriv_diff
    antideriv_diff_at_eight = self.get_antiderivative_difference('0', '8')
    at_eight = antideriv_diff_at_eight.left_part
    integral_at_eight = self.get_integral('0', '8')
    for part in (at_T, at_zero, at_eight):
        part.brace = Brace(part, DOWN, buff=SMALL_BUFF)
        part.brace.save_state()
    antideriv_text = at_T.brace.get_text('Antiderivative', buff=SMALL_BUFF)
    antideriv_text.set_color(MAROON_B)
    value_at_eight = at_eight.brace.get_text(('%.2f' % s_func(8)))
    happens_to_be_zero = at_zero.brace.get_text('\n            Happens to\n            equal 0\n        ')
    big_brace = Brace(VGroup(at_T, at_zero))
    cancel_text = big_brace.get_text('Cancels when $T=0$')
    self.play(*list(map(Write, [equals, at_T])))
    self.play(GrowFromCenter(at_T.brace), Write(antideriv_text, run_time=2))
    self.change_area_bounds(0, 5.5, rate_func=there_and_back)
    self.wait()
    self.play(ReplacementTransform(at_T.copy(), at_zero), Write(minus))
    self.wait()
    self.play(ReplacementTransform(at_T.brace, big_brace), ReplacementTransform(antideriv_text, cancel_text))
    self.change_area_bounds(0, 0, run_time=4)
    self.wait()
    self.play(ReplacementTransform(big_brace, at_zero.brace), ReplacementTransform(cancel_text, happens_to_be_zero))
    self.wait(2)
    self.change_area_bounds(0, 8, run_time=2)
    self.play(Transform(self.integral, integral_at_eight), Transform(antideriv_diff, antideriv_diff_at_eight), MaintainPositionRelativeTo(at_zero.brace, at_zero), MaintainPositionRelativeTo(happens_to_be_zero, at_zero.brace))
    self.play(GrowFromCenter(at_eight.brace), Write(value_at_eight))
    self.wait(2)
    self.play(*list(map(FadeOut, [at_eight.brace, value_at_eight, at_zero.brace, happens_to_be_zero])))
    self.antideriv_diff = antideriv_diff
def write_antiderivative_difference(self):
    antideriv_diff = self.get_antiderivative_difference('0', 'T')
    (equals, at_T, minus, at_zero) = antideriv_diff
    antideriv_diff_at_eight = self.get_antiderivative_difference('0', '8')
    at_eight = antideriv_diff_at_eight.left_part
    integral_at_eight = self.get_integral('0', '8')
    for part in (at_T, at_zero, at_eight):
        part.brace = Brace(part, DOWN, buff=SMALL_BUFF)
        part.brace.save_state()
    antideriv_text = at_T.brace.get_text('Antiderivative', buff=SMALL_BUFF)
    antideriv_text.set_color(MAROON_B)
    value_at_eight = at_eight.brace.get_text(('%.2f' % s_func(8)))
    happens_to_be_zero = at_zero.brace.get_text('\n            Happens to\n            equal 0\n        ')
    big_brace = Brace(VGroup(at_T, at_zero))
    cancel_text = big_brace.get_text('Cancels when $T=0$')
    self.play(*list(map(Write, [equals, at_T])))
    self.play(GrowFromCenter(at_T.brace), Write(antideriv_text, run_time=2))
    self.change_area_bounds(0, 5.5, rate_func=there_and_back)
    self.wait()
    self.play(ReplacementTransform(at_T.copy(), at_zero), Write(minus))
    self.wait()
    self.play(ReplacementTransform(at_T.brace, big_brace), ReplacementTransform(antideriv_text, cancel_text))
    self.change_area_bounds(0, 0, run_time=4)
    self.wait()
    self.play(ReplacementTransform(big_brace, at_zero.brace), ReplacementTransform(cancel_text, happens_to_be_zero))
    self.wait(2)
    self.change_area_bounds(0, 8, run_time=2)
    self.play(Transform(self.integral, integral_at_eight), Transform(antideriv_diff, antideriv_diff_at_eight), MaintainPositionRelativeTo(at_zero.brace, at_zero), MaintainPositionRelativeTo(happens_to_be_zero, at_zero.brace))
    self.play(GrowFromCenter(at_eight.brace), Write(value_at_eight))
    self.wait(2)
    self.play(*list(map(FadeOut, [at_eight.brace, value_at_eight, at_zero.brace, happens_to_be_zero])))
    self.antideriv_diff = antideriv_diff