summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus/intro-to-calculus/limit
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/calculus/intro-to-calculus/limit')
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/README.md18
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/Test1.py34
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/Test2.py26
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limit1.py105
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limit3.py95
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limitfin1.py76
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limitfin2.py70
7 files changed, 424 insertions, 0 deletions
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/README.md b/FSF-2020/calculus/intro-to-calculus/limit/README.md
new file mode 100644
index 0000000..d56950e
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/README.md
@@ -0,0 +1,18 @@
+Test1
+![Test1](https://user-images.githubusercontent.com/61246381/87964777-57065180-cad8-11ea-8938-8758481ea38f.gif)
+
+Test2
+![Test2](https://user-images.githubusercontent.com/61246381/87964839-6daca880-cad8-11ea-9b8e-9b60b3d162ae.gif)
+
+limit1
+![limit1](https://user-images.githubusercontent.com/61246381/87966913-9b472100-cadb-11ea-8d9b-ce469f8d1379.gif)
+
+limit3
+![limit3](https://user-images.githubusercontent.com/61246381/87967364-51ab0600-cadc-11ea-9e1e-fd89f6db8f9d.gif)
+
+limitfin1
+![limitfin1](https://user-images.githubusercontent.com/61246381/87964053-46091080-cad7-11ea-8bae-7affe799ffbf.gif)
+
+limitfin2
+![limitfin2](https://user-images.githubusercontent.com/61246381/87964169-7355be80-cad7-11ea-8682-2e8cdd403426.gif)
+
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/Test1.py b/FSF-2020/calculus/intro-to-calculus/limit/Test1.py
new file mode 100644
index 0000000..bd7d2a6
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/Test1.py
@@ -0,0 +1,34 @@
+from manimlib.imports import *
+class Test1(GraphScene):
+ CONFIG = {
+ "y_max" : 5,
+ "y_min" : -5,
+ "x_max" : 5,
+ "x_min" : -5,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : BLUE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN,
+ "x_labeled_nums": list(range(-5,6)),
+ "y_labeled_nums": list(range(-5,6)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"${ f }_{ 1 }(x)$"
+ }
+ def construct(self):
+ self.setup_axes()
+ cir1 = Circle(radius = 0.1, color = BLUE)
+ graph_1 = self.get_graph(lambda x : x+2,
+ color = GREEN,
+ x_min = -5, # Domain 1
+ x_max = +1.9
+ )
+ graph_2 =self.get_graph(lambda x : x+2,
+ color = GREEN,
+ x_min = 2.1, # Domain 2
+ x_max = 5
+ )
+ cir1.move_to(np.array([1,2,0]))
+ self.play(ShowCreation(graph_1))
+ self.play(ShowCreation(cir1))
+ self.play(ShowCreation(graph_2))
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/Test2.py b/FSF-2020/calculus/intro-to-calculus/limit/Test2.py
new file mode 100644
index 0000000..0efb565
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/Test2.py
@@ -0,0 +1,26 @@
+from manimlib.imports import *
+class Test2(GraphScene):
+ CONFIG = {
+ "y_max" : 5,
+ "y_min" : -5,
+ "x_max" : 5,
+ "x_min" : -5,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : BLUE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN,
+ "x_labeled_nums": list(range(-5,6)),
+ "y_labeled_nums": list(range(-5,6)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"${ f }_{ 1 }(x)$"
+ }
+ def construct(self):
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x : x+2,
+ color = GREEN,
+ x_min = -5, # Domain 1
+ x_max = +5
+ )
+ self.play(ShowCreation(graph_1))
+ self.wait()
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limit1.py b/FSF-2020/calculus/intro-to-calculus/limit/limit1.py
new file mode 100644
index 0000000..fe5cb1e
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limit1.py
@@ -0,0 +1,105 @@
+from manimlib.imports import *
+class limit1(GraphScene,MovingCameraScene):
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
+ CONFIG = {
+ "y_max" : 1,
+ "y_min" : 0,
+ "x_max" : 1,
+ "x_min" : -1,
+ "y_tick_frequency" : 0.2,
+ "x_tick_frequency" : 0.2,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+3*DOWN,
+ "x_labeled_nums": list(range(-1,2)),
+ "y_labeled_nums": list(range(0,2)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ XTD = self.x_axis_width/(self.x_max - self.x_min)
+ YTD = self.y_axis_height/(self.y_max - self.y_min)
+
+ dot1 = SmallDot(np.array([0.025,-2.975,0]))
+ dot2 = SmallDot(np.array([-0.025,-2.975,0]))
+ sqr = Square(side_length = 15.0).move_to(np.array([0,-3,0]))
+ brline1 = DashedVMobject(Line(np.array([0.15,-3,0]), np.array([0.15,-2.85,0])))
+ brline2 = DashedVMobject(Line(np.array([0.025,-3,0]), np.array([0.025,-2.975,0])))
+ brline3 = DashedVMobject(Line(np.array([-0.15,-3,0]), np.array([-0.15,-2.85,0])))
+ brline4 = DashedVMobject(Line(np.array([-0.025,-3,0]), np.array([-0.025,-2.975,0])))
+ textdef = TextMobject("")
+ text003 = TextMobject("0.03").move_to(np.array([0.15,-3.05,0])).scale(0.1)
+ textazero1 = TexMobject(r"\approx 0").move_to(np.array([0.04,-3.05,0])).scale(0.1)
+ textazero2 = TexMobject(r"\approx 0").move_to(np.array([-0.04,-3.05,0])).scale(0.1)
+ textm003 = TextMobject("-0.03").move_to(np.array([-0.15,-3.05,0])).scale(0.1)
+ text2 = TextMobject("Let f(x) = |x|. We'll check neighbourhood of origin")
+ text3 = TextMobject("h has to be a very small number greater than 0").move_to(np.array([0,-3.3,0])).scale(0.2)
+ text4 = TextMobject("The point travels through range of neighbourhood").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text5 = TextMobject("let h be equal to 0.03").move_to(np.array([0,-3.3,0])).scale(0.25)
+ text6 = TextMobject("Notice how the point never touches the origin").move_to(np.array([0,-3.3,0])).scale(0.2)
+ text7 = TextMobject("Green line shows the Right hand neighbourhood of origin").move_to(np.array([0,-3.3,0])).scale(0.17)
+ text8 = TextMobject("The point is approaching (0,0) for the values of x which are positive").move_to(np.array([0,-3.3,0])).scale(0.1)
+ text9 = TextMobject("Values of x are tending to 0 from positive side").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text10 = TexMobject(r"\text {Notation for this is }",r"x\rightarrow { 0 }^{ + }").move_to(np.array([0,-3.3,0])).scale(0.25)
+ text11 = TextMobject("Similar case can be made for negative values of x").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text12 = TextMobject("The point is approaching (0,0) for the values of x which are negative").move_to(np.array([0,-3.3,0])).scale(0.1)
+ text13 = TextMobject("Values of x are tending to 0 from negative side").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text14 = TexMobject(r"\text {Notation for this is }",r"x\rightarrow { 0 }^{ - }").move_to(np.array([0,-3.3,0])).scale(0.25)
+
+
+ self.play(FadeIn(text2), run_time = 1.5)
+ self.wait(2.5)
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x : x, color = RED, x_min = 0, x_max = 1)
+ graph_2 = self.get_graph(lambda x : -x, color = RED, x_min = 0, x_max = -1)
+ graph_3 = self.get_graph(lambda x : x,color = RED, x_min = 0.005, x_max = 0.03)
+ graph_4 = self.get_graph(lambda x : x,color = GREEN_SCREEN, x_min = 0.03, x_max = 0.005)
+ graph_5 = self.get_graph(lambda x : -x,color = GREEN_SCREEN, x_min = -0.03, x_max = -0.005)
+ grp1 = VGroup(graph_1,graph_2)
+ grp2 = VGroup(brline2, textazero1)
+ grp3 = VGroup(textazero2, textm003, brline3, brline4)
+ self.play(ShowCreation(grp1))
+ self.add(sqr)
+ self.play(ReplacementTransform(text2, text3))
+ self.camera_frame.save_state()
+ self.play(self.camera_frame.set_width,2.25,self.camera_frame.move_to,sqr,run_time = 2)
+ self.wait(2.5)
+ self.play(ReplacementTransform(text3, text4), ShowCreation(dot1))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text4, text5), ShowCreation(brline1), ShowCreation(text003))
+ self.wait(2.5)
+ for i in range(0,3):
+ self.play(MoveAlongPath(dot1,graph_3), run_time = 0.5)
+ self.play(MoveAlongPath(dot1,graph_4), run_time = 0.5)
+ self.play(ReplacementTransform(text5, text6), ShowCreation(grp2))
+ self.wait(2)
+ self.play(FadeOut(dot1))
+ self.add(graph_4)
+ self.play(ReplacementTransform(text6, text7))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text7,text8))
+ for i in range(0,3):
+ self.play(MoveAlongPath(dot1,graph_4), run_time = 0.7)
+ self.play(ReplacementTransform(text8, text9))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text9, text10))
+ self.wait(2.5)
+ self.play(ShowCreation(grp3), ReplacementTransform(text10, text11), FadeOut(dot1))
+ self.add(graph_5)
+ for i in range(0,3):
+ self.play(MoveAlongPath(dot2, graph_5), run_time = 0.7)
+ self.play(ReplacementTransform(text11, text12))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text12, text13))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text13, text14))
+ self.wait(2)
+ self.play(FadeOut(dot2), ReplacementTransform(text14, textdef))
+ self.wait(2)
+ self.play(Restore(self.camera_frame))
+
+ self.wait(2.5)
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limit3.py b/FSF-2020/calculus/intro-to-calculus/limit/limit3.py
new file mode 100644
index 0000000..a4f07d7
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limit3.py
@@ -0,0 +1,95 @@
+from manimlib.imports import *
+class limit3(GraphScene, MovingCameraScene):
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
+ CONFIG = {
+ "y_max" : 10,
+ "y_min" : 0,
+ "x_max" : 100,
+ "x_min" : 0,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 10,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+3*DOWN+4*LEFT,
+ "x_labeled_nums": list(range(0,101))[::10],
+ "y_labeled_nums": list(range(0,11)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ XTD = self.x_axis_width/(self.x_max - self.x_min)
+ YTD = self.y_axis_height/(self.y_max - self.y_min)
+ sqr1 = Square(side_length = 15).move_to(np.array([1,0.5,0]))
+ sqr2 = Square(side_length = 15).move_to(np.array([-4,-3,0]))
+
+ textdef = TextMobject("")
+ text20 = TextMobject("f(x) is not defined at x=50").move_to(np.array([1,0.3,0])).scale(0.2)
+ text21 = TexMobject(r"\text {f(x) is not defined in interval }",r" (-\infty ,\quad 1]").move_to(np.array([-4,-3.2,0])).scale(0.18)
+ text22 = TextMobject("1").move_to(np.array([-3.9,-3.05,0])).scale(0.2)
+ text1 = TexMobject(r"\text {Let }" ,r"f\left( x \right) =\begin{cases} \sqrt { x-1 } ,x\in \quad (1,\infty )-50 \end{cases}")
+ text2 = TextMobject("Graph of f(x) is ")
+ text3 = TextMobject("Right hand neighbour of 50 will approximately be 50.000001").move_to(np.array([1,0.3,0])).scale(0.15)
+ text4 = TextMobject("Left hand neighbour of 50 will approximately be 49.999999").move_to(np.array([1,0.3,0])).scale(0.15)
+ text5 = TexMobject(r"\text {Hence R.H.L }", r"=\lim _{ x\rightarrow { 50 }^{ + } }{ \sqrt { 50.000001 - 1 } } \approx 7.000000071").move_to(np.array([1,0.3,0])).scale(0.13)
+ text6 = TexMobject(r"\text{Hence L.H.L }", r" = \lim _{ x\rightarrow { 50 }^{ - } }{ \sqrt { 49.999999-1 } }\approx 6.999999929").move_to(np.array([1,0.3,0])).scale(0.13)
+ text7 = TextMobject("7.000000071").move_to(np.array([1.9,0.25,0])).scale(0.1)
+ text8 = TextMobject("6.999999929").move_to(np.array([0.1,0.25,0])).scale(0.1)
+ text9 = TexMobject(r"6.999999929\quad \approx \quad 7.000000071 \quad \approx 7").move_to(np.array([1,0.25,0])).scale(0.2)
+ text10 = TexMobject(r"\text{Because LHL }" ,r"\approx" ,r"\text{ RHL, Limit exists at x=50 and equals 7").move_to(np.array([1,0.25,0])).scale(0.13)
+ text11 = TextMobject("There is no Left hand neighbour of x=1").move_to(np.array([-4,-3.2,0])).scale(0.22)
+ text12 = TexMobject(r"\therefore\quad \lim _{ x\rightarrow 0 }{ f(x) } \quad =\quad \lim _{ x\rightarrow { 0 }^{ + } }{ f(x) } ").move_to(np.array([-4,-3.2,0])).scale(0.25)
+ text13 = TexMobject(r"\text {R.H.L =}",r" \lim _{ x\rightarrow { 0 }^{ + } }{ \sqrt { 1.000000000001-1 } } \quad \approx 0").move_to(np.array([-4,-3.2,0])).scale(0.13)
+ text14 = TexMobject(r"\therefore \quad \lim _{ x\rightarrow 0 }{ f(x)\quad =\quad 0 }").move_to(np.array([-4,-3.2,0])).scale(0.13)
+ self.camera_frame.save_state()
+ self.play(ShowCreation(text1))
+ self.wait(3)
+ self.play(ReplacementTransform(text1, text2))
+ self.wait()
+ self.play(ReplacementTransform(text2, textdef))
+ self.setup_axes()
+ self.setup()
+ graph_1 = self.get_graph(lambda x : (x-1)**(1/2),color = PINK, x_min = 1, x_max = 49.9)
+ graph_2 = self.get_graph(lambda x : (x-1)**(1/2),color = PINK, x_min = 50.1, x_max = 100)
+ graph_3 = self.get_graph(lambda x : (x-1)**(1/2),color = PINK, x_min = 1.05, x_max = 1.001)
+ dot1 = SmallDot(color = PURPLE_A)
+ cir = Circle(radius = 0.01, color = GREEN_SCREEN).move_to(np.array([1,0.5,0]))
+ grp1 = VGroup(graph_1, graph_2, cir)
+ grp2 = VGroup(text7, text8)
+ self.play(ShowCreation(grp1))
+ self.wait(2)
+ self.play(self.camera_frame.set_width,2.25,self.camera_frame.move_to,sqr1,run_time = 2)
+ self.wait(1)
+ self.play(ShowCreation(text20))
+ self.wait(2)
+ self.play(ReplacementTransform(text20, text3))
+ self.wait(3)
+ self.play(ReplacementTransform(text3, text5))
+ self.wait(3)
+ self.play(ReplacementTransform(text5, text7), ShowCreation(text4))
+ self.wait(4)
+ self.play(ReplacementTransform(text4, text6))
+ self.wait(3)
+ self.play(ReplacementTransform(text6, text8))
+ self.wait(1.5)
+ self.play(ReplacementTransform(grp2, text9))
+ self.wait(1.5)
+ self.play(ReplacementTransform(text9, text10))
+ self.wait(3)
+ self.play(self.camera_frame.set_width,2.25,self.camera_frame.move_to,sqr2,run_time = 2)
+ self.play(ShowCreation(text21), ShowCreation(text22))
+ self.play(MoveAlongPath(dot1, graph_3), run_time = 3)
+ self.wait(3)
+ self.play(ReplacementTransform(text21, text11))
+ self.wait(3)
+ self.play(ReplacementTransform(text11, text12))
+ self.wait(3)
+ self.play(ReplacementTransform(text12, text13))
+ self.wait(2)
+ self.play(ReplacementTransform(text13, text14))
+ self.wait(3)
+ self.play(ReplacementTransform(text14, textdef))
+ self.wait(2)
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limitfin1.py b/FSF-2020/calculus/intro-to-calculus/limit/limitfin1.py
new file mode 100644
index 0000000..ba57a15
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limitfin1.py
@@ -0,0 +1,76 @@
+from manimlib.imports import *
+class limitfin1(GraphScene):
+ CONFIG = {
+ "x_min" : -8,
+ "x_max" : 8,
+ "x_labeled_nums" : list(range(-8, 10, 3)),
+ "x_axis_width" : FRAME_WIDTH - LARGE_BUFF,
+ "y_min" : -4,
+ "y_max" : 4,
+ "y_labeled_nums" : None,
+ "y_axis_height" : FRAME_HEIGHT+2*LARGE_BUFF,
+ "graph_origin" : DOWN,
+ "graph_color" : BLUE,
+ "x_axis_width":20,
+ "y_axis_height":10,
+ }
+ def construct(self):
+ self.setup_axes()
+ XTD = 10/(8 - (-8))
+ YTD = 10/(4 - (-4))
+ graph1 = self.get_graph(lambda x: x**3 +1.5, x_min = self.x_min, x_max = -0.1)
+ graph2 = self.get_graph(lambda x: x**3 +1.5, x_min = 0.1, x_max = self.x_max, color = self.graph_color)
+ dot2 = Circle(radius = 0.1).move_to(self.graph_origin+1.5*UP*YTD)
+ text0 = TextMobject("Let L be the value of f(x) at point denoted by circle").move_to(self.graph_origin+2*DOWN)
+ text1 = TexMobject(r"\text{As }", r"\delta",r"\text{ tends to zero }" ,r"\epsilon" r"\text{ tends to zero}").move_to(self.graph_origin+2*DOWN)
+ text2 = TexMobject(r"\text{For all values in }", r"(-\delta, +\delta)",r"\text{ you will always find a real and finite value of f(x) in }",r"(L-\epsilon, L+\epsilon)").move_to(self.graph_origin+2*DOWN).scale(0.6)
+ self.play(ShowCreation(graph1), ShowCreation(graph2), ShowCreation(text0), FadeIn(dot2))
+ line1 = DashedVMobject(Line(self.graph_origin+1*DOWN*YTD+1*LEFT*XTD, self.graph_origin+4*UP*YTD+1*LEFT*XTD), num_dashes = 50).set_color(PINK)
+ line2 = DashedVMobject(Line(self.graph_origin+1*DOWN*YTD+1*RIGHT*XTD, self.graph_origin+4*UP*YTD+1*RIGHT*XTD), num_dashes = 50).set_color(PINK)
+ line3 = DashedVMobject(Line(self.graph_origin+1.5*UP*YTD+5*LEFT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD), num_dashes = 50).set_color(GOLD)
+ line4 = DashedVMobject(Line(self.graph_origin+0.5*UP*YTD+5*LEFT*XTD, self.graph_origin+0.5*UP*YTD+4*RIGHT*XTD), num_dashes = 50).set_color(GOLD)
+ line5 = DashedVMobject(Line(self.graph_origin+2.5*UP*YTD+5*LEFT*XTD, self.graph_origin+2.5*UP*YTD+4*RIGHT*XTD), num_dashes = 50).set_color(GOLD)
+ self.play(ShowCreation(line1), ShowCreation(line2))
+ vec1 = Line(self.graph_origin, self.graph_origin+1*RIGHT*XTD)
+ vec2 = Line(self.graph_origin, self.graph_origin+1*LEFT*XTD)
+ vec5 = Line(self.graph_origin+2.5*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ vec6 = Line(self.graph_origin+0.5*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ brace1 = Brace(vec1, DOWN)
+ brace2 = Brace(vec2, DOWN)
+ br1text = brace1.get_text(r"$\delta$").next_to(brace1, DOWN)
+ br2text = brace2.get_text(r"$\delta$").next_to(brace2, DOWN)
+ brace5 = Brace(vec5, RIGHT)
+ brace6 = Brace(vec6, RIGHT)
+ br5text = brace5.get_text(r"$\epsilon$").next_to(brace5, RIGHT)
+ br6text = brace6.get_text(r"$\epsilon$").next_to(brace6, RIGHT)
+ self.wait(3)
+ self.play(ShowCreation(brace1), ShowCreation(brace2), ShowCreation(br1text), ShowCreation(br2text))
+ self.wait(3)
+ self.play(ReplacementTransform(text0, text1))
+ self.play(ShowCreation(line3), ShowCreation(line4), ShowCreation(line5), ShowCreation(brace5), ShowCreation(brace6), ShowCreation(br5text), ShowCreation(br6text))
+ vec3 = Line(self.graph_origin, self.graph_origin+0.1*RIGHT*XTD)
+ vec4 = Line(self.graph_origin, self.graph_origin+0.11*LEFT*XTD)
+ brace3 = Brace(vec3, DOWN)
+ brace4 = Brace(vec4, DOWN)
+ vec7 = Line(self.graph_origin+1.6*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ vec8 = Line(self.graph_origin+1.4*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ brace7 = Brace(vec7, RIGHT)
+ brace8 = Brace(vec8, RIGHT)
+ self.play(Transform(brace1, brace3), Transform(brace2, brace4), ApplyMethod(line2.shift, 0.8*LEFT*XTD),
+ ApplyMethod(line1.shift, 0.8*RIGHT*XTD), ApplyMethod(br1text.scale, 0.3), ApplyMethod(br2text.scale, 0.3),
+ Transform(brace5, brace7), Transform(brace6, brace8), ApplyMethod(line4.shift, 1.8*UP*XTD),
+ ApplyMethod(line5.shift, 1.8*DOWN*XTD))
+ self.wait(3)
+ self.play(ReplacementTransform(text1, text2))
+ self.play(FadeOut(brace5), FadeOut(brace6), FadeOut(brace1), FadeOut(brace2))
+ self.play(ApplyMethod(line2.shift, 0.8*RIGHT*XTD), ApplyMethod(line1.shift, 0.8*LEFT*XTD), ApplyMethod(br1text.scale, 10/3), ApplyMethod(br2text.scale, 10/3),
+ ApplyMethod(line5.shift, 1.8*UP*XTD), ApplyMethod(line4.shift, 1.8*DOWN*XTD))
+ for i in range(0,3):
+ self.play(ApplyMethod(line2.shift, 0.8*LEFT*XTD), ApplyMethod(line1.shift, 0.8*RIGHT*XTD), ApplyMethod(br1text.scale, 0.3), ApplyMethod(br2text.scale, 0.3),
+ ApplyMethod(line5.shift, 1.8*DOWN*XTD), ApplyMethod(line4.shift, 1.8*UP*XTD), ApplyMethod(br5text.scale, 0.3), ApplyMethod(br6text.scale, 0.3), run_time = 0.5)
+ self.play(ApplyMethod(line2.shift, 0.8*RIGHT*XTD), ApplyMethod(line1.shift, 0.8*LEFT*XTD), ApplyMethod(br1text.scale, 10/3), ApplyMethod(br2text.scale, 10/3),
+ ApplyMethod(line5.shift, 1.8*UP*XTD), ApplyMethod(line4.shift, 1.8*DOWN*XTD), ApplyMethod(br5text.scale, 10/3), ApplyMethod(br6text.scale ,10/3), run_time = 0.5)
+ self.play(ApplyMethod(line2.shift, 0.8*LEFT*XTD), ApplyMethod(line1.shift, 0.8*RIGHT*XTD), ApplyMethod(br1text.scale, 0.3), ApplyMethod(br2text.scale, 0.3),
+ ApplyMethod(line5.shift, 1.8*DOWN*XTD), ApplyMethod(line4.shift, 1.8*UP*XTD),ApplyMethod(br5text.scale, 0.3), ApplyMethod(br6text.scale, 0.3), run_time = 0.5)
+
+ self.wait(5) \ No newline at end of file
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limitfin2.py b/FSF-2020/calculus/intro-to-calculus/limit/limitfin2.py
new file mode 100644
index 0000000..36ca388
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limitfin2.py
@@ -0,0 +1,70 @@
+from manimlib.imports import *
+class limitfin2(GraphScene):
+ CONFIG = {
+ "x_min" : -8,
+ "x_max" : 8,
+ "x_labeled_nums" : list(range(-8, 10, 3)),
+ "x_axis_width" : FRAME_WIDTH - LARGE_BUFF,
+ "y_min" : -4,
+ "y_max" : 4,
+ "y_labeled_nums" : None,#list(range(3,,)),
+ "y_axis_height" : FRAME_HEIGHT+2*LARGE_BUFF,
+ "graph_origin" : DOWN,
+ "graph_color" : BLUE,
+ "x_axis_width":20,
+ "y_axis_height":10,
+ }
+ def construct(self):
+ self.setup_axes()
+ XTD = 10/(8 - (-8))
+ YTD = 10/(4 - (-4))
+ graph1 = self.get_graph(lambda x: -(-(0.25*x**2)-1), x_min = self.x_min, x_max = -0.1)
+ graph2 = self.get_graph(lambda x: ((0.25*x**2)+2), x_min = 0.1, x_max = self.x_max, color = self.graph_color)
+ dot1 = Circle(radius = 0.1).move_to(self.graph_origin+1*UP*YTD)
+ dot2 = Circle(radius = 0.1).move_to(self.graph_origin+2*UP*YTD)
+ text1 = TexMobject(r"\text{It doesn't matter how small }", r"\delta",r"\text{ gets, }" r"\epsilon" r"\text{ does not tend to zero}").move_to(self.graph_origin+2*DOWN)
+ self.play(ShowCreation(graph1), ShowCreation(graph2), ShowCreation(text1), FadeIn(dot1), FadeIn(dot2))
+ line1 = DashedVMobject(Line(self.graph_origin+1*DOWN*YTD+1*LEFT*XTD, self.graph_origin+4*UP*YTD+1*LEFT*XTD), num_dashes = 50).set_color(PINK)
+ line2 = DashedVMobject(Line(self.graph_origin+1*DOWN*YTD+1*RIGHT*XTD, self.graph_origin+4*UP*YTD+1*RIGHT*XTD), num_dashes = 50).set_color(PINK)
+ line3 = DashedVMobject(Line(self.graph_origin+1.5*UP*YTD+5*LEFT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD), num_dashes = 50).set_color(GOLD)
+ line4 = DashedVMobject(Line(self.graph_origin+0.5*UP*YTD+5*LEFT*XTD, self.graph_origin+0.5*UP*YTD+4*RIGHT*XTD), num_dashes = 50).set_color(GOLD)
+ line5 = DashedVMobject(Line(self.graph_origin+2.5*UP*YTD+5*LEFT*XTD, self.graph_origin+2.5*UP*YTD+4*RIGHT*XTD), num_dashes = 50).set_color(GOLD)
+ self.play(ShowCreation(line1), ShowCreation(line2))
+ vec1 = Line(self.graph_origin, self.graph_origin+1*RIGHT*XTD)
+ vec2 = Line(self.graph_origin, self.graph_origin+1*LEFT*XTD)
+ vec5 = Line(self.graph_origin+2.5*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ vec6 = Line(self.graph_origin+0.5*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ brace1 = Brace(vec1, DOWN)
+ brace2 = Brace(vec2, DOWN)
+ br1text = brace1.get_text(r"$\delta$").next_to(brace1, DOWN)
+ br2text = brace2.get_text(r"$\delta$").next_to(brace2, DOWN)
+ brace5 = Brace(vec5, RIGHT)
+ brace6 = Brace(vec6, RIGHT)
+ br5text = brace5.get_text(r"$\epsilon$").next_to(brace5, RIGHT)
+ br6text = brace6.get_text(r"$\epsilon$").next_to(brace6, RIGHT)
+ self.wait(3)
+ self.play(ShowCreation(brace1), ShowCreation(brace2), ShowCreation(br1text), ShowCreation(br2text))
+ self.wait(3)
+ self.play(ShowCreation(line3), ShowCreation(line4), ShowCreation(line5), ShowCreation(brace5), ShowCreation(brace6), ShowCreation(br5text), ShowCreation(br6text))
+ vec3 = Line(self.graph_origin, self.graph_origin+0.1*RIGHT*XTD)
+ vec4 = Line(self.graph_origin, self.graph_origin+0.11*LEFT*XTD)
+ brace3 = Brace(vec3, DOWN)
+ brace4 = Brace(vec4, DOWN)
+ vec7 = Line(self.graph_origin+2.1*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ vec8 = Line(self.graph_origin+0.9*UP*YTD+4*RIGHT*XTD, self.graph_origin+1.5*UP*YTD+4*RIGHT*XTD)
+ brace7 = Brace(vec7, RIGHT)
+ brace8 = Brace(vec8, RIGHT)
+ self.play(Transform(brace1, brace3), Transform(brace2, brace4), ApplyMethod(line2.shift, 0.8*LEFT*XTD),
+ ApplyMethod(line1.shift, 0.8*RIGHT*XTD), ApplyMethod(br1text.scale, 0.3), ApplyMethod(br2text.scale, 0.3),
+ Transform(brace5, brace7), Transform(brace6, brace8), ApplyMethod(line4.shift, 0.8*UP*XTD),
+ ApplyMethod(line5.shift, 0.8*DOWN*XTD))
+
+ self.play(FadeOut(brace3), FadeOut(brace4), FadeOut(brace1), FadeOut(brace2))
+ self.play(ApplyMethod(line2.shift, 0.8*RIGHT*XTD), ApplyMethod(line1.shift, 0.8*LEFT*XTD), ApplyMethod(br1text.scale, 10/3), ApplyMethod(br2text.scale, 10/3))
+ for i in range(0,3):
+ self.play(ApplyMethod(line2.shift, 0.8*LEFT*XTD), ApplyMethod(line1.shift, 0.8*RIGHT*XTD), ApplyMethod(br1text.scale, 0.3), ApplyMethod(br2text.scale, 0.3), run_time = 0.5)
+ self.play(ApplyMethod(line2.shift, 0.8*RIGHT*XTD), ApplyMethod(line1.shift, 0.8*LEFT*XTD), ApplyMethod(br1text.scale, 10/3), ApplyMethod(br2text.scale, 10/3), run_time = 0.5)
+
+ self.play(ApplyMethod(line2.shift, 0.8*LEFT*XTD), ApplyMethod(line1.shift, 0.8*RIGHT*XTD), ApplyMethod(br1text.scale, 0.3), ApplyMethod(br2text.scale, 0.3), run_time = 0.5)
+
+ self.wait(5) \ No newline at end of file