-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvelocities.html
More file actions
483 lines (448 loc) · 37.1 KB
/
velocities.html
File metadata and controls
483 lines (448 loc) · 37.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<!DOCTYPE html>
<!--********************************************-->
<!--* Generated from PreTeXt source *-->
<!--* on 2022-04-24T15:13:16-03:00 *-->
<!--* A recent stable commit (2020-08-09): *-->
<!--* 98f21740783f166a773df4dc83cab5293ab63a4a *-->
<!--* *-->
<!--* https://pretextbook.org *-->
<!--* *-->
<!--********************************************-->
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Derivatives and integrals of vector functions.</title>
<meta name="Keywords" content="Authored in PreTeXt">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://sagecell.sagemath.org/embedded_sagecell.js"></script><script>window.MathJax = {
tex: {
inlineMath: [['\\(','\\)']],
tags: "none",
useLabelIds: true,
tagSide: "right",
tagIndent: ".8em",
packages: {'[+]': ['base', 'extpfeil', 'ams', 'amscd', 'newcommand', 'knowl']}
},
options: {
ignoreHtmlClass: "tex2jax_ignore",
processHtmlClass: "has_am",
renderActions: {
findScript: [10, function (doc) {
document.querySelectorAll('script[type^="math/tex"]').forEach(function(node) {
var display = !!node.type.match(/; *mode=display/);
var math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
var text = document.createTextNode('');
node.parentNode.replaceChild(text, node);
math.start = {node: text, delim: '', n: 0};
math.end = {node: text, delim: '', n: 0};
doc.math.push(math);
});
}, '']
},
},
chtml: {
scale: 0.88,
mtextInheritFont: true
},
loader: {
load: ['input/asciimath', '[tex]/extpfeil', '[tex]/amscd', '[tex]/newcommand', '[pretext]/mathjaxknowl3.js'],
paths: {pretext: "https://pretextbook.org/js/lib"},
},
};
</script><script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script><script>$(function () {
// Make *any* div with class 'sagecell-sage' an executable Sage cell
// Their results will be linked, only within language type
sagecell.makeSagecell({inputLocation: 'div.sagecell-sage',
linked: true,
languages: ['sage'],
evalButtonText: 'Evaluate (Sage)'});
});
</script><script xmlns:svg="http://www.w3.org/2000/svg" src="https://pretextbook.org/js/lib/jquery.min.js"></script><script xmlns:svg="http://www.w3.org/2000/svg" src="https://pretextbook.org/js/lib/jquery.sticky.js"></script><script xmlns:svg="http://www.w3.org/2000/svg" src="https://pretextbook.org/js/lib/jquery.espy.min.js"></script><script xmlns:svg="http://www.w3.org/2000/svg" src="https://pretextbook.org/js/0.13/pretext.js"></script><script xmlns:svg="http://www.w3.org/2000/svg" src="https://pretextbook.org/js/0.13/pretext_add_on.js"></script><script xmlns:svg="http://www.w3.org/2000/svg" src="https://pretextbook.org/js/lib/knowl.js"></script><!--knowl.js code controls Sage Cells within knowls--><script xmlns:svg="http://www.w3.org/2000/svg">sagecellEvalName='Evaluate (Sage)';
</script><link xmlns:svg="http://www.w3.org/2000/svg" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/pretext.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/pretext_add_on.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/banner_default.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/toc_default.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/knowls_default.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/style_soundwriting.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/colors_blue_grey.css" rel="stylesheet" type="text/css">
<link xmlns:svg="http://www.w3.org/2000/svg" href="https://pretextbook.org/css/0.31/setcolors.css" rel="stylesheet" type="text/css">
<!-- 2019-10-12: Temporary - CSS file for experiments with styling --><link xmlns:svg="http://www.w3.org/2000/svg" href="developer.css" rel="stylesheet" type="text/css">
</head>
<body class="pretext-article has-toc has-sidebar-left">
<a class="assistive" href="#content">Skip to main content</a><div xmlns:svg="http://www.w3.org/2000/svg" id="latex-macros" class="hidden-content" style="display:none">\(\newcommand{\doubler}[1]{1#1}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\)</div>
<header id="masthead" class="smallbuttons"><div class="banner"><div class="container">
<a id="logo-link" href="https://www.youtube.com/channel/UCefWUvmsltrMPYeJ2ONqrbw" target="_blank"><img src="Logo.png" alt="Logo image"></a><div class="title-container">
<h1 class="heading"><a href="vector_calculus.html"><span class="title">Vector Calculus with Python</span></a></h1>
<p class="byline">Calculus with Python</p>
</div>
</div></div>
<nav xmlns:svg="http://www.w3.org/2000/svg" id="primary-navbar" class="navbar"><div class="container">
<div class="navbar-top-buttons">
<button class="sidebar-left-toggle-button button active" aria-label="Show or hide table of contents sidebar">Contents</button><div class="tree-nav toolbar toolbar-divisor-3"><span class="threebuttons"><a id="previousbutton" class="previous-button toolbar-item button" href="VectorFunctions.html" title="Previous">Prev</a><a id="upbutton" class="up-button button toolbar-item" href="vector_calculus.html" title="Up">Up</a><a id="nextbutton" class="next-button button toolbar-item" href="ArcLength.html" title="Next">Next</a></span></div>
</div>
<div class="navbar-bottom-buttons toolbar toolbar-divisor-4">
<button class="sidebar-left-toggle-button button toolbar-item active">Contents</button><a class="previous-button toolbar-item button" href="VectorFunctions.html" title="Previous">Prev</a><a class="up-button button toolbar-item" href="vector_calculus.html" title="Up">Up</a><a class="next-button button toolbar-item" href="ArcLength.html" title="Next">Next</a>
</div>
</div></nav></header><div class="page">
<div xmlns:svg="http://www.w3.org/2000/svg" id="sidebar-left" class="sidebar" role="navigation"><div class="sidebar-content">
<nav id="toc"><ul>
<li class="link frontmatter"><a href="frontmatter-1.html" data-scroll="frontmatter-1"><span class="title">Front Matter</span></a></li>
<li class="link"><a href="VectorFunctions.html" data-scroll="VectorFunctions"><span class="codenumber">1</span> <span class="title">Vector Functions: Curves and Trajectories</span></a></li>
<li class="link active">
<a href="velocities.html" data-scroll="velocities"><span class="codenumber">2</span> <span class="title">Derivatives and integrals of vector functions.</span></a><ul>
<li><a href="velocities.html#subsection-1" data-scroll="subsection-1">Derivatives of vector functions.</a></li>
<li><a href="velocities.html#subsection-2" data-scroll="subsection-2">Integrals of vector functions.</a></li>
</ul>
</li>
<li class="link"><a href="ArcLength.html" data-scroll="ArcLength"><span class="codenumber">3</span> <span class="title">Arc lenght: Curve properties.</span></a></li>
</ul></nav><div class="extras"><nav><a class="pretext-link" href="https://pretextbook.org">Authored in PreTeXt</a><a href="https://www.mathjax.org"><img title="Powered by MathJax" src="https://www.mathjax.org/badge/badge.gif" alt="Powered by MathJax"></a></nav></div>
</div></div>
<main class="main"><div id="content" class="pretext-content"><section xmlns:svg="http://www.w3.org/2000/svg" class="section" id="velocities"><h2 class="heading hide-type">
<span class="type">Section</span> <span class="codenumber">2</span> <span class="title">Derivatives and integrals of vector functions.</span>
</h2>
<div class="video-box" style="width: 100%;padding-top: 56.25%; margin-left: 0%; margin-right: 0%;"><iframe id="video-6" class="video" allowfullscreen="" src="https://www.youtube-nocookie.com/embed/LBvX7biPGSk?&modestbranding=1&rel=0"></iframe></div>
<section class="subsection" id="subsection-1"><h3 class="heading hide-type">
<span class="type">Subsection</span> <span class="codenumber">2.1</span> <span class="title">Derivatives of vector functions.</span>
</h3>
<p id="p-18">Derivatives of vector functions can be interpreted as tangent vectors (if not zero) for curves or as velocity vectors for trajectories.</p>
<article class="definition definition-like" id="definition-3"><h6 class="heading">
<span class="type">Definition</span><span class="space"> </span><span class="codenumber">2.1</span><span class="period">.</span>
</h6>
<p id="p-19">The <em class="emphasis">derivative</em>, \(\vec{r}'\text{,}\) of a vector function \(\vec{r}:I \to \mathbb{R}^3\text{,}\) at \(t \in I\text{,}\) is defined as:</p>
<div class="displaymath">
\begin{equation*}
\vec{r}'(t) = \frac{d\vec{r}}{dt}(t) = \lim_{\Delta t \to 0} \frac{\vec{r}(t+\Delta t)-r(t)}{\Delta t},
\end{equation*}
</div>
<p class="continuation">if this limit exists.</p></article><p id="p-20">If \(\vec{r}(t)\) represents the position of a point, in meters, at the instant \(t\text{,}\) in seconds; then the quotient,</p>
<div class="displaymath">
\begin{equation*}
\frac{\vec{r}(t+\Delta t)-\vec{r}(t)}{\Delta t},
\end{equation*}
</div>
<p id="p-21">is vector joining the point \(\vec{r}(t)\) to the point \(\vec{r}(t+\Delta t)\) divided by the time it takes to get from one point to the other, \(\Delta t\text{,}\) thus giving an average vector velocity for the trajectory in this interval in meters per second. The graph below shows the curve parametrized by the vector function \(\vec{r}\) and the vectors from \(\vec{r}(t)\) to \(\vec{r}(t+\Delta t)\) re-scaled by \(\frac{1}{\Delta t}\text{,}\) for \(\Delta t\) equal to 1; 0.5 and 0.1. The smaller \(\Delta t\) is, the closer the resultant vector is to the instant variation of position rate (also known as velocity).</p>
<div class="sagecell-sage" id="sage-4"><script type="text/x-sage">import matplotlib.pyplot as plt #for plotting
import numpy as np #for extended math
# Parameter of the tangency point
t0=0.5
# Choices of Delta T
DeltaT_1 = 1
DeltaT_2 = 0.5
DeltaT_3 = 0.1
# Parameter of the curve
t = np.linspace(-1,1,100)
# Defining the component functions
r= lambda u:np.array([(u^2),(u^2),np.sin(np.pi*(u))])
# Tangency Point
Tan = r(t0)
# Vectors - end points
V1_e = (r(t0+DeltaT_1)-Tan)/DeltaT_1
V2_e = (r(t0+DeltaT_2)-Tan)/DeltaT_2
V3_e = (r(t0+DeltaT_3)-Tan)/DeltaT_3
# Plotting the Graph
ax = plt.figure().add_subplot(projection='3d')
ax.axis([-0.6, 3,-0.6, 2.6])
plt.plot(r(t)[0],r(t)[1],r(t)[2], label='parametric curve')
plt.quiver(Tan[0],Tan[1],Tan[2],V1_e[0],V1_e[1],V1_e[2],color=hue(0.3),arrow_length_ratio=0.1)
plt.quiver(Tan[0],Tan[1],Tan[2],V2_e[0],V2_e[1],V2_e[2],color=hue(0.7),arrow_length_ratio=0.1)
plt.quiver(Tan[0],Tan[1],Tan[2],V3_e[0],V3_e[1],V3_e[2],color=hue(0.9),arrow_length_ratio=0.2)
ax.legend()
plt.show()
#plt.savefig('parametric.png', dpi=80) #download a plot of a given size
</script></div>
<p id="p-22">If \(\vec{r}(t)\) describes the trajectory of a moving point-like object, we say that \(\vec{r}'(t)\) is the <em class="emphasis">velocity</em> (vector). The size of this vector \(\|\vec{r}'(t)\|\) is the <em class="emphasis">speed</em> of the object at instant \(t\text{.}\)</p>
<article class="theorem theorem-like" id="Teorema_Derivada_Vetorial"><h6 class="heading">
<span class="type">Theorem</span><span class="space"> </span><span class="codenumber">2.2</span><span class="period">.</span>
</h6>
<p id="p-23">If \(f\text{,}\) \(g\) and \(h\) are differentiable functions at \(t\) and \(\vec{r}(t) = (f(t),g(t),h(t))\text{,}\) than \(\vec{r}\) is differentiable<a data-knowl="" class="id-ref fn-knowl original" data-refid="hk-fn-4" id="fn-4"><sup> 1 </sup></a> at \(t\) and</p>
<div class="displaymath">
\begin{equation*}
\vec{r}'(t) = (f'(t),g'(t),h'(t)).
\end{equation*}
</div>
<div class="hidden-content tex2jax_ignore" id="hk-fn-4"><div class="fn">meaning that the derivative exists at this point</div></div></article><article class="hiddenproof" id="proof-2"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-2"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-2"><article class="hiddenproof"><p id="p-24">This can be calculated directly from the definition of derivative:</p>
<div class="displaymath">
\begin{align*}
\frac{d\vec{r}}{dt}=\amp \lim_{\Delta t\to 0} \frac{\vec{r}(t+\Delta t)-\vec{r}(t)}{\Delta t} \\
=\amp \lim_{\Delta t\to 0} \frac{1}{\Delta t} \left((f(t+\Delta t), g(t+\Delta t), h(t+\Delta t))-(f(t), g(t), h(t) ) \right) \\
=\amp \lim_{\Delta t\to 0} \frac{1}{\Delta t} \left(f(t+\Delta t)-f(t), g(t+\Delta t)-g(t), h(t+\Delta t)-h(t) \right) \\
=\amp \lim_{\Delta t\to 0} \left(\frac{f(t+\Delta t)-f(t)}{\Delta t}, \frac{g(t+\Delta t)-g(t)}{\Delta t}, \frac{h(t+\Delta t)-h(t)}{\Delta t} \right) \\
=\amp \left( \lim_{\Delta t\to 0}\frac{f(t+\Delta t)-f(t)}{\Delta t}, \lim_{\Delta t\to 0}\frac{g(t+\Delta t)-g(t)}{\Delta t}, \lim_{\Delta t\to 0}\frac{h(t+\Delta t)-h(t)}{\Delta t} \right) \\
=\amp \left(f'(t), g'(t), h'(t) \right)
\end{align*}
</div></article></div>
<article class="example example-like" id="example-3"><a data-knowl="" class="id-ref example-knowl original" data-refid="hk-example-3"><h6 class="heading">
<span class="type">Example</span><span class="space"> </span><span class="codenumber">2.3</span><span class="period">.</span>
</h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-example-3"><article class="example example-like"><p id="p-25">Let \(\vec{r}(t)=\cos 3t\vec{i}+(te^{-t})\vec{j}+(7+3t^2)\vec{k}\) be a vector function. We can calculate its derivative by calculating derivatives to each of the component functions (that are one variable real functions):</p>
<div class="displaymath">
\begin{equation*}
\vec{r'}(t)=-3\sin 3t\vec{i}+(e^{-t}-te^{-t})\vec{j}+(6t)\vec{k}.
\end{equation*}
</div></article></div>
<p id="p-26">The code below can be used to calculate derivatives of vector functions.</p>
<div class="sagecell-sage" id="sage-5"><script type="text/x-sage">import sympy as sym #For symbolic calculations with Python
t= sym.Symbol('t')
r(t)=((t/4)^2, (t/4)^4, sym.sin(sym.pi*(t/4)))
r1=diff(r,t,1)
r1
</script></div>
<p id="p-27">If \(\vec{r}'(t) \neq 0\text{,}\) we can define the <em class="emphasis">unit tangent vector</em>, that indicates the tangent direction, but with lenght equal to 1:</p>
<div class="displaymath">
\begin{equation*}
\vec{T}(t)=\frac{\vec{r}'(t)}{\|\vec{r}'(t)\|}=\frac{\vec{r}'(t)}{\sqrt{\langle\vec{r}'(t), \vec{r}'(t)\rangle}}
\end{equation*}
</div>
<p id="p-28">The existence of a derivative \(\vec{r}'(t)\) does not guarantee that the curve parametrized by \(\vec{r}(t)\) has a tangent line. If \(\vec{r}'(t) = 0\text{,}\) it is possible that no tangent direction exists, for example "sharp corners" might be hidden. To illustrate this, consider the vector function \(\vec{r}(t)=t^3\vec{i}+t^2\vec{j}\text{,}\) that is differentiable, with \(\vec{r}'(t)=3t^2\vec{i}+2t\vec{j}\text{,}\) but the curve it parametrizes, has a sharp corner at \(\vec{r}(0) = (0, 0)\text{,}\) in which \(\vec{r}'(0) = 0\text{.}\)</p>
<figure class="figure figure-like" id="figure-1"><div class="image-box" style="width: 60%; margin-left: 20%; margin-right: 20%;"><img src="images/CurvaComBico.png" class="contained" alt=""></div>
<figcaption><span class="type">Figure</span><span class="space"> </span><span class="codenumber">2.4<span class="period">.</span></span><span class="space"> </span>A plane curve with a sharp corner, parametrized by the differentiable vector function \(\vec{r}(t)=t^3\vec{i}+t^2\vec{j}.\)</figcaption></figure><article class="remark remark-like" id="remark-7"><h6 class="heading">
<span class="type">Remark</span><span class="space"> </span><span class="codenumber">2.5</span><span class="period">.</span>
</h6>A curve \(C\) is said to be <em class="alert">smooth</em> if it can be parametrized by a vector function \(\vec{r}:I \to \mathbb{R}^n\text{,}\) which is differentiable and such that \(\vec{r}'(t)\) is continuous and \(\vec{r}'(t) \neq 0\) for all \(t \in I\text{.}\) Smooth curves have tangents at all points!</article><p id="p-29">If \(\vec{r}'(t) \neq 0\text{,}\) we say that \(\vec{r}'(t)\) is a <em class="emphasis">tangent vector</em> to the curve \(C\text{,}\) parametrized by the function \(\vec{r}\text{,}\) at the point \(\vec{r}(t)\text{.}\) The <em class="emphasis">tangent line</em> to \(C\text{,}\) denoted \(\vec{s}(u)\text{,}\) at the point \(P=\vec{r}(t)\text{,}\) is the line that passes through \(P\) and points in the direction of \(\vec{r}'(t)\text{.}\) So, given a fixed value \(t \in I\text{,}\) the tangent line can be parametrized by</p>
<div class="displaymath">
\begin{align*}
\amp \vec{l}:\mathbb{R} \to \mathbb{R}^3\\
\amp \vec{l}(u) = u\vec{r}'(t)+\vec{r}(t)
\end{align*}
</div>
<p id="p-30">The code bellow plots a spacial curve, the tangent vector at a point and the tangent line.</p>
<div class="sagecell-sage" id="sage-6"><script type="text/x-sage">import numpy as np #for extended math
import sympy as sym #For symbolic calculations with Python
from sympy.plotting import plot3d_parametric_line # Plot Symbolic VF
# Parameter for the Curve
t= sym.Symbol('t')
u= sym.Symbol('u')
# Defining the vector function
r(t)=(np.cos(np.pi*(t/4)), np.sin(np.pi*(t/4)), t)
# Parameter of the Tangency Point
t0=0.5
# Tangent Vector
r1 = diff(r,t,1)
# Tangent Line
l0(u) =sym.Add(u*r1(t0),(r(t0)))[0]
l1(u) =sym.Add(u*r1(t0),(r(t0)))[1]
l2(u) =sym.Add(u*r1(t0),(r(t0)))[2]
# Plot with sympy
plot=plot3d_parametric_line((r(t)[0],r(t)[1],r(t)[2], (t, -8, 8)),(l0(u), l1(u), l2(u), (u, -3, 3)),(l0(u), l1(u), l2(u), (u, 0, 1)),show=False)
plot[0].line_color= 'b'
plot[1].line_color='y'
plot[2].line_color='r'
plot.show()
#plot.save('curve and tangent.png') #download a plot of a given size
</script></div>
<article class="exercise exercise-like" id="exercise-5"><a data-knowl="" class="id-ref exercise-knowl original" data-refid="hk-exercise-5"><h6 class="heading">
<span class="type">Exercise</span><span class="space"> </span><span class="codenumber">2.6</span><span class="period">.</span>
</h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-exercise-5"><article class="exercise exercise-like"><p id="p-31">For every of the vector functions, use the code above to plot a spacial curve, the tangent vector at the given point and the tangent line (at this point):</p>
<ol class="lower-alpha">
<li id="li-8"><p id="p-derived-li-8">\(\vec{r}(t) = (t^2-4,\sin (\pi t), 2\cos (\pi t))\text{,}\) with \(t \in [0,2]\text{,}\) \(t_0 = 1/4\text{.}\)</p></li>
<li id="li-9"><p id="p-derived-li-9">\(\vec{r}(t) = (t,e^t,e^{-t})\text{,}\) with \(t \in [0,1.5]\text{,}\) \(t_0=1\text{.}\)</p></li>
</ol>
<a data-knowl="" class="id-ref solution-knowl original" data-refid="hk-solution-5" id="solution-5"><span class="type">Solution.</span> </a><div class="hidden-content tex2jax_ignore" id="hk-solution-5"><div class="solution solution-like">
<p id="p-32">We need change the functions, their domains and the parameter of the tangent point in code above.</p>
<div class="video-box" style="width: 100%;padding-top: 56.25%; margin-left: 0%; margin-right: 0%;"><iframe id="video-7" class="video" allowfullscreen="" src="https://www.youtube-nocookie.com/embed/ZMyBVWjQcsk?&modestbranding=1&rel=0&start=0&end=71"></iframe></div>
</div></div></article></div>
<article class="remark remark-like" id="remark-8"><h6 class="heading">
<span class="type">Remark</span><span class="space"> </span><span class="codenumber">2.7</span><span class="period">.</span>
</h6>
<p id="p-33">The <em class="emphasis">second derivative</em> of a vector function \(\vec{r}(t)\) is the derivative of its derivative, \(\vec{r}''(t)=(\vec{r}')'(t)\text{,}\) and, if \(\vec{r}(t)\) describes the trajectory of a point-like object, than it can be interpreted as the acceleration the particle is subject to.</p></article><article class="remark remark-like" id="remark-9"><h6 class="heading">
<span class="type">Remark</span><span class="space"> </span><span class="codenumber">2.8</span><span class="period">.</span>
</h6>
<p id="p-34">A smooth curve \(C\) is said to be parametrized by arc length by \(\vec{r}:I \to \mathbb{R}^n\) iff \(\|\vec{r}'(t)\|=1\) for all \(t \in I\text{.}\) For such parametrization, \(\|\vec{r}''(t)\|\) is the <em class="emphasis">curvature</em> and it measures how much the curve is changing direction.<a data-knowl="" class="id-ref fn-knowl original" data-refid="hk-fn-5" id="fn-5"><sup> 2 </sup></a></p>
<div class="hidden-content tex2jax_ignore" id="hk-fn-5"><div class="fn">See XXX for an example of how to parametrize a curve by arc length and calculate its curvature.</div></div></article><article class="theorem theorem-like" id="Derivation_rules"><h6 class="heading">
<span class="type">Theorem</span><span class="space"> </span><span class="codenumber">2.9</span><span class="period">.</span>
</h6>
<p id="p-35">Let \(\vec{u}(t)=(f_u(t), g_u(t), h_u(t))\) and \(\vec{v}(t)=(f_v(t), g_v(t), h_v(t))\) be differentiable vector functions, \(f(t)\) be a differentiable real function and \(c\in \mathbb{R}\) a scalar. Then, if the functions below are defined for \(t\text{,}\) it holds:</p>
<ol class="decimal">
<li id="li-10"><p id="p-derived-li-10">\(\frac{d}{dt}[\vec{u}(t)\pm\vec{v}(t)] = \vec{u}'(t)\pm\vec{v}'(t)\text{.}\) <article class="hiddenproof" id="proof-3"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-3"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-3"><article class="hiddenproof"><div class="displaymath" id="p-36">
\begin{align*}
\frac{d}{dt}[\vec{u}(t)\pm\vec{v}(t)]=\amp\frac{d}{dt}[(f_u(t)\pm f_v(t), g_u(t) \pm g_v(t), h_u(t) \pm h_v(t))] \\
=\amp [(f_u'(t)\pm f_v'(t), g_u'(t) \pm g_v'(t), h_u'(t) \pm h_v'(t))] \\
=\amp (f_u'(t), g_u'(t), h_u'(t)) \pm (f_v'(t), g_v'(t), h_v'(t)) = \vec{u}'(t) \pm \vec{v}'(t).
\end{align*}
</div></article></div></p></li>
<li id="li-11"><p id="p-derived-li-11">\(\frac{d}{dt}[c\vec{u}(t)] = c\vec{u}'(t)\text{.}\) <article class="hiddenproof" id="proof-4"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-4"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-4"><article class="hiddenproof"><div class="displaymath" id="p-37">
\begin{align*}
\frac{d}{dt}[c\vec{u}(t)]=\amp\frac{d}{dt}(cf_u(t), cg_u(t), ch_u(t)) \\
=\amp (cf_u'(t), cg_u'(t), ch_u'(t)) \\
=\amp c(f_u'(t), g_u'(t), h_u'(t)) = c\vec{u}'(t).
\end{align*}
</div></article></div></p></li>
<li id="li-12"><p id="p-derived-li-12">\(\frac{d}{dt}[f(t)\vec{u}(t)] = f'(t)\vec{u}(t) + f(t)\vec{u}'(t)\text{.}\) <article class="hiddenproof" id="proof-5"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-5"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-5"><article class="hiddenproof"><div class="displaymath" id="p-38">
\begin{align*}
\amp\frac{d}{dt}[f(t)\vec{u}(t)] \\
\amp=\frac{d}{dt}[(f(t) f_u(t),f(t) g_u(t), f(t) h_u(t))] \\
\amp= (f'(t) f_u(t)+f(t) f_u'(t),f'(t) g_u(t)+f(t) g_u'(t), f'(t) h_u(t)+f(t) h_u'(t)) \\
\amp= (f'(t) f_u(t),f'(t) g_u(t), f'(t) h_u(t)) + (f(t) f_u'(t), f(t) g_u'(t), f(t) h_u'(t))\\
\amp= f'(t)\vec{u}(t)+f(t)\vec{u}'(t) .
\end{align*}
</div></article></div></p></li>
<li id="li-13"><p id="p-derived-li-13">\(\frac{d}{dt}[\vec{u}(t)\cdot\vec{v}(t)] =\vec{u}'(t)\cdot\vec{v}(t)+\vec{u}(t)\cdot\vec{v}'(t)\text{.}\) <article class="hiddenproof" id="proof-6"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-6"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-6"><article class="hiddenproof"><div class="displaymath" id="p-39">
\begin{align*}
\amp\frac{d}{dt}[\vec{u}(t)\cdot\vec{v}(t)]\\
\amp=\frac{d}{dt}(f_u(t)f_v(t)+g_u(t)g_v(t)+ h_u(t)h_v(t)) \\
\amp = (f_u'(t)f_v(t)+f_u(t)f_v'(t)+g_u'(t)g_v(t)+g_u(t)g_v'(t)+ h_u'(t)h_v(t)+h_u(t)h_v'(t)) \\
\amp = (f_u'(t)f_v(t)+g_u'(t)g_v(t)+ h_u'(t)h_v(t)) +(f_u(t)f_v'(t)+g_u(t)g_v'(t)+ h_u(t)h_v'(t)) \\
\amp = \vec{u}'(t)\cdot\vec{v}(t)+\vec{u}(t)\cdot\vec{v}'(t) .
\end{align*}
</div></article></div></p></li>
<li id="li-14"><p id="p-derived-li-14">\(\frac{d}{dt}[\vec{u}(t)\times\vec{v}(t)] =\vec{u}'(t)\times\vec{v}(t)+\vec{u}(t)\times\vec{v}'(t)\text{.}\) <article class="hiddenproof" id="proof-7"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-7"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-7"><article class="hiddenproof"><div class="displaymath" id="p-40">
\begin{align*}
\frac{d}{dt}\amp[\vec{u}(t)\times\vec{v}(t)]\\
=\amp \frac{d}{dt}(g_u(t)h_v(t) - h_u(t)g_v(t), f_u(t)h_v(t) - h_u(t)f_v(t), f_u(t)g_v(t) - g_u(t)f_v(t)) \\
=\amp (g_u'(t)h_v(t) - h_u'(t)g_v(t), f_u'(t)h_v(t) - h_u'(t)f_v(t), f_u'(t)g_v(t) - g_u'(t)f_v(t)) \\
\amp +(g_u(t)h_v'(t) - h_u(t)g_v'(t), f_u(t)h_v'(t) - h_u(t)f_v'(t), f_u(t)g_v'(t) - g_u(t)f_v'(t)) \\
=\amp \vec{u}'(t)\times\vec{v}(t)+\vec{u}(t)\times\vec{v}'(t) .
\end{align*}
</div></article></div></p></li>
<li id="li-15"><p id="p-derived-li-15">\(\frac{d}{dt}[\vec{u}(f(t))] = f'(t)\vec{u}'(f(t))\text{.}\) <article class="hiddenproof" id="proof-8"><a data-knowl="" class="id-ref proof-knowl original" data-refid="hk-proof-8"><h6 class="heading"><span class="type">Proof<span class="period">.</span></span></h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-proof-8"><article class="hiddenproof"><div class="displaymath" id="p-41">
\begin{align*}
\frac{d}{dt}[\vec{u}(f(t))] \amp = ((f_u(f(t)))',(g_u(f(t)))', (h_u(f(t)))')\\
\amp=(f'(t)f_u'(f(t)),f'(t)g_u'(f(t)), f'(t)h_u'(f(t))) \\
\amp=f'(t)(f_u'(f(t)),g_u'(f(t)), h_u'(f(t))) \\
\amp= f'(t)\vec{u}'(f(t)) .
\end{align*}
</div></article></div></p></li>
</ol></article><article class="exercise exercise-like" id="exercise-6"><a data-knowl="" class="id-ref exercise-knowl original" data-refid="hk-exercise-6"><h6 class="heading">
<span class="type">Exercise</span><span class="space"> </span><span class="codenumber">2.10</span><span class="period">.</span>
</h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-exercise-6"><article class="exercise exercise-like"><p id="p-42">What is the curve parmetrized by \(\vec{r}(t) = (t, \sin (t))\text{,}\) \(t \in [0,8]\text{?}\) For each of the functions defined below, calculate \(\vec{r}(f(t))\text{,}\) animate a point moving by \(\vec{r}(f(t))\) with the code and calculate the speed \(\|(\vec{r}(f(t)))'\|\) to explain the differences in the trajectories:</p>
<ol class="lower-alpha">
<li id="li-16"><p id="p-derived-li-16">\(f: [0,1.6] \to \mathbb{R}, \,\,\, f(t)=5t\text{;}\)</p></li>
<li id="li-17"><p id="p-derived-li-17">\(f: [0,2] \to \mathbb{R}, \,\,\, f(t)=t^3\text{;}\)</p></li>
<li id="li-18"><p id="p-derived-li-18">\(f: [-8,0] \to \mathbb{R}, \,\,\, f(t)=-t\text{.}\)</p></li>
</ol>
<a data-knowl="" class="id-ref solution-knowl original" data-refid="hk-solution-6" id="solution-6"><span class="type">Solution.</span> </a><div class="hidden-content tex2jax_ignore" id="hk-solution-6"><div class="solution solution-like">
<p id="p-43">The curve parmetrized by \(\vec{r}(t) = (t, \sin (t))\) is the part of the graph of \(y=\sin(x)\) over the interval \([0,8]\text{,}\) the speed of the movement is \(\|\vec{r}'(t)\| = \sqrt{1+\cos^2(t)}\text{.}\) The compositions \(\vec{r}(f(t))\) parametrize sections of the graph of \(y=\sin(x)\text{.}\) The domains were adjusted for all of them to plot the same section of the curve. Animating it is clear that the firs two parametrizations change the speed the point moves over the curve and the last one reverses the direction of the movement. We find the following composed functions, tangent vector and speeds:</p>
<ol class="lower-alpha">
<li id="li-19"><p id="p-derived-li-19">\(\vec{r}(f(t)) = (5t, \sin(5t)), \,\, (\vec{r}(f(t)))' = (5, 5\cos(5t)),\) \(\|(\vec{r}(f(t)))'\| = \sqrt{25+25\cos^2(t)} = 5\sqrt{1+\cos^2(t)}\text{;}\)</p></li>
<li id="li-20"><p id="p-derived-li-20">\(\vec{r}(f(t)) = (t^3, \sin(t^3)), \,\, (\vec{r}(f(t)))' = (3t^2, 3t^2\cos(t^3)),\) \(\|(\vec{r}(f(t)))'\| = \sqrt{9t^4+9t^4\cos^2(t^3)} = 3t^2\sqrt{1+\cos^2(t^3)}\text{;}\)</p></li>
<li id="li-21"><p id="p-derived-li-21">\(\vec{r}(f(t)) = (-t, \sin(-t)), \,\, (\vec{r}(f(t)))' = (-1, -\cos(t)),\) \(\|(\vec{r}(f(t)))'\| = \sqrt{1+\cos^2(-t)}\text{.}\)</p></li>
</ol>
<div class="video-box" style="width: 100%;padding-top: 56.25%; margin-left: 0%; margin-right: 0%;"><iframe id="video-8" class="video" allowfullscreen="" src="https://www.youtube-nocookie.com/embed/ZMyBVWjQcsk?&modestbranding=1&rel=0&start=72&end=213"></iframe></div>
</div></div></article></div>
<div class="sagecell-sage" id="sage-7"><script type="text/x-sage">import numpy as np
import matplotlib.pyplot as plt
#defines the size of the image (inches)
plt.rcParams["figure.figsize"] = 4,3
from matplotlib.animation import FuncAnimation
# vector function2
def vector_function(t):
return np.array([np.cos(2*t), np.sin(t)])
# create a figure with an axes
fig, ax = plt.subplots()
# set the axes limits
ax.axis([-1.4,1.4,-1.4,1.4])
# set same scale to x and y axes
ax.set_aspect(1)
# create a point in the axes
point, = ax.plot(0,1, marker="o")
# Updating function, to be repeatedly called by the animation
def update(t):
# obtain point coordinates
x,y = vector_function(t)
# set point's coordinates
point.set_data([x],[y])
return point,
# vector function domain I = [a,b]
a = 0
b= 2*np.pi
# number of points the intervall is divided
n=360
# create animation with 10ms interval, which is repeated,
ani = FuncAnimation(fig, update, interval=10, blit=True, repeat=True,
frames=np.linspace(a,b,n, endpoint=False))
ani.save('ani.mp4')
</script></div></section><section class="subsection" id="subsection-2"><h3 class="heading hide-type">
<span class="type">Subsection</span> <span class="codenumber">2.2</span> <span class="title">Integrals of vector functions.</span>
</h3>
<p id="p-44">The integrals of the component functions can be used to obtain primitives of vector functions. An important application is related to Newton's second law \(\vec{F} = m \vec{a}\text{.}\) If we know the force that is being applied to an object (together with its mass, starting position and starting velocity), we can obtain its position by applying these integrals successively.</p>
<article class="definition definition-like" id="definition-4"><h6 class="heading">
<span class="type">Definition</span><span class="space"> </span><span class="codenumber">2.11</span><span class="period">.</span>
</h6>
<p id="p-45">The <em class="emphasis">definite integral</em> of a vector function<a data-knowl="" class="id-ref fn-knowl original" data-refid="hk-fn-6" id="fn-6"><sup> 3 </sup></a> \(\vec{r}:I \to \mathbb{R}^3\) of \(a\) to \(b\text{,}\) with \(a,b \in \overline{I}\text{,}\) \(\vec{r}(t) = f(t) \vec{i}+ g(t) \vec{j} + h(t) \vec{k}\) is defined as:</p>
<div class="displaymath">
\begin{equation*}
\int_a^b \vec{r}(t) dt = \int_a^b f(t) dt\vec{i}+\int_a^b g(t) dt\vec{j}+\int_a^b h(t) dt\vec{k},
\end{equation*}
</div>
<p class="continuation">if these (real) integrals exist.</p>
<div class="hidden-content tex2jax_ignore" id="hk-fn-6"><div class="fn">Analogous to \(\vec{r}:I \to \mathbb{R}^2\text{.}\)</div></div></article><article class="remark remark-like" id="remark-10"><h6 class="heading">
<span class="type">Remark</span><span class="space"> </span><span class="codenumber">2.12</span><span class="period">.</span>
</h6>
<p id="p-46">In general, the set \(I \subset \mathbb{R}\) has not to be an interval. If there is a finite number of points in which the vector function in not defined or in which there are discontinuities, it is necessary to divide the domain to have these singular points at the extremes of the intervals and take lateral limits.</p></article><p id="p-47">The Fundamental Theorem of Calculus can be extended to continuous vector functions<a data-knowl="" class="id-ref fn-knowl original" data-refid="hk-fn-7" id="fn-7"><sup> 4 </sup></a>, so that if the component functions of \(\vec{r}(t) = f(t) \vec{i}+ g(t) \vec{j} + h(t) \vec{k}\) have primitives \(F(t)\text{,}\) \(G(t)\) and \(H(t)\text{:}\)</p>
<div class="displaymath">
\begin{align*}
\int_a^b \vec{r}(t)dt = \amp \int_a^b f(t) dt \vec{i} + \int_a^b g(t) dt \vec{j} + \int_a^b h(t) dt \vec{k}\\
= \amp (F(b)-F(a)) \vec{i} + (G(b)-G(a))\vec{j} + (H(b)-H(a))\vec{k}\\
= \amp (F(b)\vec{i} + G(b)\vec{j} + H(b)\vec{k}) - (F(a)) \vec{i} + G(a) \vec{j} + H(a)\vec{k})\\
=\amp \vec{R}(b) - \vec{R}(a),
\end{align*}
</div>
<p class="continuation">where \(\vec{R}(t)= F(t) \vec{i}+ G(t) \vec{j} + H(t) \vec{k}\) is a primitive of \(\vec{r}(t)\text{,}\) which means that \(\vec{R}'(t)= \vec{r}(t)\text{.}\)</p>
<div class="hidden-content tex2jax_ignore" id="hk-fn-7"><div class="fn">if \(\vec{r}\) is not continuous, we need to divide the interval to have \(\vec{r}(t)\) continuous inside each sub-interval and apply the theorem to each of the sub-intervals.</div></div>
<p id="p-48">We write the <em class="emphasis">indefinite integrals</em> as</p>
<div class="displaymath">
\begin{equation*}
\vec{R}(t) = \int r(t) dt.
\end{equation*}
</div>
<p id="p-49">Python can calculate definite integrals (numerical) of vector functions</p>
<div class="sagecell-sage" id="sage-8"><script type="text/x-sage">import numpy as np
from scipy import integrate
#Integration interval
a=1
b=5
#Component Functions
x=lambda t: t^2
y=lambda t: np.sinh(t)
z=lambda t: t*np.cos(t)
# Approx. Values
X=integrate.quad(x, a, b)
print('X~',X[0])
print('error smaller than',X[1])
Y=integrate.quad(y, a, b)
print('Y~',Y[0])
print('error smaller than',Y[1])
Z=integrate.quad(z, a, b)
print('Z~',Z[0])
print('error smaller than',Z[1])
</script></div>
<p id="p-50">or indefinite integrals (symbolic, with sympy).</p>
<div class="sagecell-sage" id="sage-9"><script type="text/x-sage">import sympy as sym
t = sym.Symbol('t')
#Component Functions
x=t^2
y=sym.sinh(t)
z=t*sym.cos(t)
# Primitives
X=sym.integrate(x, t)
print('X(t)=',X-X.evalf(subs={t: 0})) #optional - choosing the primitive with value zero at t=0
Y=sym.integrate(y, t)
print('Y(t)=',Y-Y.evalf(subs={t: 0})) #optional - choosing the primitive with value zero at t=0
Z=sym.integrate(z, t)
print('Z(t)=',Z-Z.evalf(subs={t: 0})) #optional - choosing the primitive with value zero at t=0
</script></div>
<em class="alert">Watch out!!! There are several kinds of integrals in vector calculus, each in a different context, and this is the first of them. To distinguish among them is very important.</em><article class="exercise exercise-like" id="exercise-7"><a data-knowl="" class="id-ref exercise-knowl original" data-refid="hk-exercise-7"><h6 class="heading">
<span class="type">Exercise</span><span class="space"> </span><span class="codenumber">2.13</span><span class="period">.</span>
</h6></a></article><div class="hidden-content tex2jax_ignore" id="hk-exercise-7"><article class="exercise exercise-like"><p id="p-51">Suppose that a 1Kg rocket is in the origin of space \((0,0,0)\text{,}\) at rest, and starts moving by the action a force (from its motor) that changes in time and is given by the function \(\vec{r}(t) = (t\cos (t),t\sin (t), 1)\text{,}\) with \(t \in [0, \infty)\text{.}\) Use Newton's Second Law (\(\vec{F}=m\vec{a} \)) to determine the position of the rocket at instant \(t\text{,}\) using the codes above.</p>
<a data-knowl="" class="id-ref solution-knowl original" data-refid="hk-solution-7" id="solution-7"><span class="type">Solution.</span> </a><div class="hidden-content tex2jax_ignore" id="hk-solution-7"><div class="solution solution-like">
<p id="p-52">Using Newton's second law, we find the the acceleration is \(\vec{a}(t)=\vec{r}(t)\text{,}\) so that its speed is</p>
<div class="displaymath">
\begin{equation*}
\vec{v}(t)=\int_0^t \vec{a}(u) du = (t\sin(t) + \cos(t) - 1,-t\cos(t) + \sin(t),t).
\end{equation*}
</div>
<p id="p-53">Then we integrate once more to obtain the position:</p>
<div class="displaymath">
\begin{equation*}
\vec{p}(t)=\int_0^t \vec{v}(u) du = (-t\cos(t) - t + 2\sin(t),-t\sin(t) - 2\cos(t) + 2, t^2/2).
\end{equation*}
</div>
<div class="video-box" style="width: 100%;padding-top: 56.25%; margin-left: 0%; margin-right: 0%;"><iframe id="video-9" class="video" allowfullscreen="" src="https://www.youtube-nocookie.com/embed/ZMyBVWjQcsk?&modestbranding=1&rel=0&start=214"></iframe></div>
</div></div></article></div></section></section></div></main>
</div>
</body>
</html>