summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential
diff options
context:
space:
mode:
authorPurusharth Saxena2020-06-30 02:25:46 +0530
committerGitHub2020-06-30 02:25:46 +0530
commit95b35efe6166fe145e44314e11e0a7d3ac638874 (patch)
tree200eb34921deaae1ba440420d852ad3e82c0b839 /FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential
parent8ad6529190a9ee7e3324b71b555c6807c2a8cf15 (diff)
parent6eaafd2b199661ba0b2221ed8f75bfc4c5e18514 (diff)
downloadFSF-mathematics-python-code-archive-95b35efe6166fe145e44314e11e0a7d3ac638874.tar.gz
FSF-mathematics-python-code-archive-95b35efe6166fe145e44314e11e0a7d3ac638874.tar.bz2
FSF-mathematics-python-code-archive-95b35efe6166fe145e44314e11e0a7d3ac638874.zip
Merge pull request #43 from vnb09/fsf_tasks
Updated animations
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential')
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md34
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gifbin558983 -> 565199 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py18
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gifbin576535 -> 729982 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py31
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gifbin732678 -> 1444924 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py23
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gifbin423652 -> 423246 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py14
9 files changed, 89 insertions, 31 deletions
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
new file mode 100644
index 0000000..ce4da11
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
@@ -0,0 +1,34 @@
+<h1><div align=”center”><b>SubTopic: Total Differential</b></h1></div>
+<br/></br>
+
+<tab>file1_Visualization_of_dz
+
+![file1_Visualization_of_dz](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif?raw=true)
+<br/></br>
+<br/></br>
+
+<tab>file2_Differentials
+
+![file2_Differentials](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif?raw=true)
+
+<br/></br>
+<br/></br>
+
+<tab>file3_Total_differential_of_z
+
+![file3_Total_differential_of_z](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif?raw=true)
+<br/></br>
+<br/></br>
+
+<tab>file4_total_differential_change
+
+![file4_total_differential_change](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.gif?raw=true)
+<br/></br>
+<br/></br>
+
+<tab>file5_Total_differential_approximation
+
+ ![file5_Total_differential_approximation](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif?raw=true)
+
+<br/></br>
+<br/></br>
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
index e00a946..2e148af 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
index a097a96..1fdd0b9 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
@@ -1,11 +1,15 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
+#---- visualization of total differential dz between two points lying on the surface of the function
+class differentialdz(ThreeDScene):
def construct(self):
- axes = ThreeDAxes().rotate(1.571)
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
+
+ #---- surface of the funtion f(x,y)
surface = ParametricSurface(
lambda u, v: np.array([
u,
@@ -13,8 +17,8 @@ class firstScene(ThreeDScene):
u**2+v**2
]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#FF69B4").fade(0.6).scale(2).shift(3*UP+1*LEFT)
- d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP)
- d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP)
+ d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP) #---- point on the surface
+ d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP) #---- point on the surface
p1 = TextMobject("$P_1$",color ='#ADFF2F').scale(0.6).shift(2*RIGHT+1*UP)
p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.9*UP)
@@ -33,8 +37,10 @@ class firstScene(ThreeDScene):
label = TextMobject("$z = f(x,y)$").scale(0.6).shift(3.5*RIGHT+1.8*UP)
- self.add(axes)
self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.wait(1)
self.play(Write(plane))
self.play(Write(surface))
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
index 620b49e..6baf271 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
index b40be70..1025210 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
@@ -1,16 +1,21 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
-
+#---- visualization of the differentials along the axes
+class differentials(ThreeDScene):
def construct(self):
- axes = ThreeDAxes()
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
- s = Rectangle(color = '#00FF7F',fill_opacity=0.3).shift(2.3*UP+3.9*LEFT).scale(1).rotate(0.2,UP) #----surface z = f(x,y)
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2+v**2
+ ]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#FF69B4").shift([0,2.5,0.3]).scale(1.2) #----surface z = f(x,y)
- label_y = TextMobject("$y$").shift(5*RIGHT+0.4*DOWN).rotate(1.571)
- label_x = TextMobject("$x$").shift(-0.1*UP+5.6*RIGHT).scale(0.5)
+
plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9)
@@ -27,8 +32,8 @@ class firstScene(ThreeDScene):
label_dz= TextMobject("$dz$").scale(0.4).shift(5.3*RIGHT+0.4*UP)
- l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.7)
- l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.7)
+ l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.2)
+ l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.2)
line_y1 = DashedLine(color = '#00BFFF').scale(1.3).shift(0.82*UP+3.25*RIGHT).rotate(1.571)
line_y2 = DashedLine(color = '#00BFFF').scale(1.7).shift(1.2*UP+2.8*RIGHT).rotate(1.571)
@@ -43,12 +48,12 @@ class firstScene(ThreeDScene):
label = TextMobject("$f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
- self.add(axes)
self.set_camera_orientation(phi=75*DEGREES,theta=10*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.play(Write(plane))
- self.play(ShowCreation(label_y))
- self.add_fixed_in_frame_mobjects(label_x)
- self.play(Write(s))
+ self.play(Write(surface))
self.add_fixed_in_frame_mobjects(label)
self.wait(1)
self.play(Write(d),Write(d2))
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
index 5aae2a1..a54d2da 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
index b29a7a3..b8d6f96 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
@@ -1,8 +1,16 @@
from manimlib.imports import*
-class firstScene(ThreeDScene):
+#---- visualization of total differential definition
+class totaldifferential(ThreeDScene):
def construct(self):
axes = ThreeDAxes().fade(0.5)
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2+v**2
+ ]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#FF69B4").fade(0.6).shift([1,0.8,1.5]).scale(2)
+
plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9)
label_x = TextMobject("$x$").shift(5*RIGHT+0.4*DOWN).rotate(1.571)
label_y = TextMobject("$y$").shift(0.3*DOWN+5.6*RIGHT).scale(0.5)
@@ -57,17 +65,19 @@ class firstScene(ThreeDScene):
self.add_fixed_in_frame_mobjects(label_y)
self.add_fixed_in_frame_mobjects(label_z)
self.wait(1)
+ self.play(Write(surface))
+ self.play(ShowCreation(d1))
+ self.add_fixed_in_frame_mobjects(d1_text)
+ self.play(ShowCreation(d2))
+ self.add_fixed_in_frame_mobjects(d2_text)
+ self.wait(1)
self.play(Write(s2))
self.wait(1)
self.play(Write(l1),Write(l2),Write(l3))
self.wait(1)
self.play(Write(s1))
self.wait(1)
- self.play(ShowCreation(d1))
- self.add_fixed_in_frame_mobjects(d1_text)
- self.play(ShowCreation(d2))
- self.add_fixed_in_frame_mobjects(d2_text)
- self.wait(1)
+ self.play(FadeOut(surface))
self.play(ShowCreation(d3))
self.add_fixed_in_frame_mobjects(d3_text)
self.play(ShowCreation(m1_line))
@@ -88,4 +98,3 @@ class firstScene(ThreeDScene):
self.play(ShowCreation(delx))
self.add_fixed_in_frame_mobjects(delx_text)
self.wait(1)
-
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
index 4f4627d..ebbf240 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
index 83017ed..e7b39bb 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
@@ -1,11 +1,14 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
+#---- approximation value of function between two points using total differentials
+class approximation(ThreeDScene):
def construct(self):
- axes = ThreeDAxes().rotate(1.571)
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
+
surface = ParametricSurface(
lambda u, v: np.array([
np.sin(u),
@@ -29,9 +32,10 @@ class firstScene(ThreeDScene):
label = TextMobject("$z = f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
-
- self.add(axes)
self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.wait(1)
self.play(Write(plane))
self.wait(1)