summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file2_differentialEqSimplification.py
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/calculus/series-and-transformations/Laplace Transformations/file2_differentialEqSimplification.py')
-rw-r--r--FSF-2020/calculus/series-and-transformations/Laplace Transformations/file2_differentialEqSimplification.py78
1 files changed, 78 insertions, 0 deletions
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file2_differentialEqSimplification.py b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file2_differentialEqSimplification.py
new file mode 100644
index 0000000..33e9173
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file2_differentialEqSimplification.py
@@ -0,0 +1,78 @@
+from manimlib.imports import *
+import pylatex
+
+class scene(Scene):
+ def construct(self):
+ normalSq=Square(side_length=2,fill_color=BLUE,fill_opacity=0.6)
+ normalSqText=TextMobject("$\mathscr{L}$")
+ inputText=TextMobject("$f($","$y'(t)$","$)$")
+ outputText=TextMobject("$F($","$s$","$)$")
+
+ inputText.scale(0.7)
+ outputText.scale(0.7)
+ inputText.shift(2.5*LEFT)
+ outputText.shift(1.7*RIGHT)
+ normalSq.scale(1.2)
+
+ inputText.set_color_by_tex_to_color_map({"$y'(t)$":RED})
+ outputText.set_color_by_tex_to_color_map({"$s$":RED})
+
+ self.play(ShowCreation(normalSq))
+ self.play(FadeIn(normalSqText))
+ self.add(inputText)
+ self.wait(0.5)
+ self.play(ApplyMethod(inputText.shift,0.7*RIGHT))
+ self.play(FadeOut(inputText),FadeIn(outputText))
+ self.play(ApplyMethod(outputText.shift,RIGHT))
+ self.wait(1)
+
+ group1=VGroup(outputText,normalSq,normalSqText)
+ self.play(ApplyMethod(group1.scale,0.6))
+ self.play(ApplyMethod(group1.shift,4.7*LEFT))
+ self.wait(0.6)
+
+ inverseSq=Square(side_length=3,fill_color=GREEN,fill_opacity=0.6)
+ inverseSqText=TextMobject("$\mathscr{L}^{ -1 }$")
+ outText=TextMobject("$f($","$y(t)$","$)$")
+ inverseSqText.scale(0.7)
+ outText.scale(0.7)
+ outText.set_color_by_tex_to_color_map({"$y(t)$":RED})
+ self.play(ShowCreation(inverseSq))
+ self.play(FadeIn(inverseSqText))
+ self.wait(0.5)
+ outText.shift(2*RIGHT)
+ self.play(ApplyMethod(outputText.shift,RIGHT))
+ self.play(FadeOut(outputText),FadeIn(outText))
+ self.play(ApplyMethod(outText.shift,2*RIGHT))
+ self.wait(1)
+
+ updatedOutputText=TextMobject("$F($","$s$","$)$")
+ updatedOutputText.shift(2.5*LEFT)
+ updatedInputText=TextMobject("$f($","$y'(t)$","$)$")
+ updatedInputText.shift(6*LEFT)
+ updatedInputText.scale(0.7)
+ updatedOutputText.scale(0.7)
+ updatedOutputText.set_color_by_tex_to_color_map({"$s$":RED})
+ updatedInputText.set_color_by_tex_to_color_map({"$y'(t)$":RED})
+
+ self.play(FadeIn(updatedInputText),FadeIn(updatedOutputText))
+ self.wait(0.5)
+
+ deText=TextMobject("Differential Equation")
+ deinterTexta=TextMobject("Transformed D.E")
+ deinterTextb=TextMobject("(Easy to simplify)!")
+ deOutText=TextMobject("Solution of D.E")
+ deText.set_color(RED)
+ deinterTexta.set_color(RED)
+ deOutText.set_color(RED)
+ deinterTextb.set_color(PURPLE_C)
+ deText.scale(0.35)
+ deinterTexta.scale(0.35)
+ deinterTextb.scale(0.35)
+ deOutText.scale(0.35)
+ deText.shift(6*LEFT+0.5*DOWN)
+ deinterTexta.shift(2.6*LEFT+0.5*DOWN)
+ deinterTextb.shift(2.6*LEFT+0.8*DOWN)
+ deOutText.shift(4*RIGHT+0.5*DOWN)
+ self.play(Write(deText),Write(deinterTexta),Write(deinterTextb),Write(deOutText))
+ self.wait(2)