def write_integral(self):
    integral = TexMobject('\\int', '^T', '_0', 'v(t)', '\\,dt')
    integral.to_corner((UP + RIGHT))
    integral.shift((2 * LEFT))
    top_T = integral.get_part_by_tex('T')
    moving_T = self.T_label_group[0]
    s_T = TexMobject('s(T)', '= ')
    s_T.set_color_by_tex('s', DISTANCE_COLOR)
    s_T.next_to(integral, LEFT)
    (int_arrow, s_arrow) = [Arrow(mob.get_left(), self.area.get_center(), color=WHITE) for mob in (integral, s_T)]
    distance_word = TextMobject('Distance')
    distance_word.move_to(self.area)
    self.play(Write(integral))
    self.play(ShowCreation(int_arrow))
    self.submobjects.append(int_arrow)
    self.wait()
    self.change_area_bounds(new_t_max=8, rate_func=there_and_back, run_time=3)
    self.play(Indicate(top_T))
    self.play(ReplacementTransform(top_T.copy(), moving_T))
    self.change_area_bounds(new_t_max=3, rate_func=there_and_back, run_time=3)
    self.wait()
    self.play(Write(distance_word, run_time=2))
    self.play(ReplacementTransform(int_arrow, s_arrow), FadeIn(s_T))
    self.wait()
    self.play(FadeOut(distance_word))
    self.change_area_bounds(new_t_max=0, run_time=2)
    self.change_area_bounds(new_t_max=8, rate_func=linear, run_time=7.9)
    self.wait()
    self.change_area_bounds(new_t_max=5)
    self.wait()
def write_integral(self):
    integral = TexMobject('\\int', '^T', '_0', 'v(t)', '\\,dt')
    integral.to_corner((UP + RIGHT))
    integral.shift((2 * LEFT))
    top_T = integral.get_part_by_tex('T')
    moving_T = self.T_label_group[0]
    s_T = TexMobject('s(T)', '= ')
    s_T.set_color_by_tex('s', DISTANCE_COLOR)
    s_T.next_to(integral, LEFT)
    (int_arrow, s_arrow) = [Arrow(mob.get_left(), self.area.get_center(), color=WHITE) for mob in (integral, s_T)]
    distance_word = TextMobject('Distance')
    distance_word.move_to(self.area)
    self.play(Write(integral))
    self.play(ShowCreation(int_arrow))
    self.submobjects.append(int_arrow)
    self.wait()
    self.change_area_bounds(new_t_max=8, rate_func=there_and_back, run_time=3)
    self.play(Indicate(top_T))
    self.play(ReplacementTransform(top_T.copy(), moving_T))
    self.change_area_bounds(new_t_max=3, rate_func=there_and_back, run_time=3)
    self.wait()
    self.play(Write(distance_word, run_time=2))
    self.play(ReplacementTransform(int_arrow, s_arrow), FadeIn(s_T))
    self.wait()
    self.play(FadeOut(distance_word))
    self.change_area_bounds(new_t_max=0, run_time=2)
    self.change_area_bounds(new_t_max=8, rate_func=linear, run_time=7.9)
    self.wait()
    self.change_area_bounds(new_t_max=5)
    self.wait()