def drag_right_endpoint_to_zero(self):
    zero_integral = self.get_integral('0', '0')
    zero_integral[1].set_color(YELLOW)
    zero_int_bounds = list(reversed(zero_integral.get_parts_by_tex('0')))
    for bound in zero_int_bounds:
        circle = Circle(color=YELLOW)
        circle.replace(bound)
        circle.scale_in_place(3)
        bound.circle = circle
    self.integral.save_state()
    equals_zero = TexMobject('=0')
    equals_zero.next_to(zero_integral, RIGHT)
    equals_zero.set_color(GREEN)
    self.change_area_bounds(0, 0, run_time=3)
    self.play(ReplacementTransform(self.zero_label.copy(), equals_zero))
    self.play(Transform(self.integral, zero_integral))
    self.wait(2)
    for bound in zero_int_bounds:
        self.play(ShowCreation(bound.circle))
        self.play(FadeOut(bound.circle))
    self.play(*[ReplacementTransform(bound.copy(), VGroup(equals_zero[1])) for bound in zero_int_bounds])
    self.wait(2)
    self.change_area_bounds(0, 5)
    self.play(self.integral.restore, FadeOut(equals_zero))
    self.zero_integral = zero_integral
def drag_right_endpoint_to_zero(self):
    zero_integral = self.get_integral('0', '0')
    zero_integral[1].set_color(YELLOW)
    zero_int_bounds = list(reversed(zero_integral.get_parts_by_tex('0')))
    for bound in zero_int_bounds:
        circle = Circle(color=YELLOW)
        circle.replace(bound)
        circle.scale_in_place(3)
        bound.circle = circle
    self.integral.save_state()
    equals_zero = TexMobject('=0')
    equals_zero.next_to(zero_integral, RIGHT)
    equals_zero.set_color(GREEN)
    self.change_area_bounds(0, 0, run_time=3)
    self.play(ReplacementTransform(self.zero_label.copy(), equals_zero))
    self.play(Transform(self.integral, zero_integral))
    self.wait(2)
    for bound in zero_int_bounds:
        self.play(ShowCreation(bound.circle))
        self.play(FadeOut(bound.circle))
    self.play(*[ReplacementTransform(bound.copy(), VGroup(equals_zero[1])) for bound in zero_int_bounds])
    self.wait(2)
    self.change_area_bounds(0, 5)
    self.play(self.integral.restore, FadeOut(equals_zero))
    self.zero_integral = zero_integral