Skip to content

Commit d9d9f2c

Browse files
author
StephenElston
committed
Spell checked
1 parent 2c207c4 commit d9d9f2c

6 files changed

Lines changed: 21 additions & 35 deletions

Module02/02-01-Rate of Change.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"\n",
1010
"## Linear Rate of Change\n",
1111
"\n",
12-
"For example, imagine a function that returns the number of meters travelled by a cyclist based on the number of seconds that the cyclist has been cycling.\n",
12+
"For example, imagine a function that returns the number of meters traveled by a cyclist based on the number of seconds that the cyclist has been cycling.\n",
1313
"\n",
1414
"Here is such a function:\n",
1515
"\n",
@@ -60,11 +60,11 @@
6060
"cell_type": "markdown",
6161
"metadata": {},
6262
"source": [
63-
"It's clear from the graph that ***q*** is a *linear* function that describes a slope in which distance increases at a constant rate over time. In other words, the cyclist is travelling at a constant speed.\n",
63+
"It's clear from the graph that ***q*** is a *linear* function that describes a slope in which distance increases at a constant rate over time. In other words, the cyclist is traveling at a constant speed.\n",
6464
"\n",
6565
"But what speed?\n",
6666
"\n",
67-
"Speed, or more technically, velocity is a measure of change - it measures how the distance travelled changes over time (which is why we typically express it as a unit of distance per a unit of time, like *miles-per-hour* or *meters-per-second*). So we're looking for a way to measure the change in the line created by the function.\n",
67+
"Speed, or more technically, velocity is a measure of change - it measures how the distance traveled changes over time (which is why we typically express it as a unit of distance per a unit of time, like *miles-per-hour* or *meters-per-second*). So we're looking for a way to measure the change in the line created by the function.\n",
6868
"\n",
6969
"The change in values along the line define its *slope*, which we know from a previous lesson is represented like this:\n",
7070
"\n",
@@ -79,7 +79,7 @@
7979
"- After 1 second, ***x*** is 1 and ***q***(1) = **3**.\n",
8080
"- After 10 seconds, ***x*** is 10 and ***q***(10) = 21.\n",
8181
"\n",
82-
"So we can meassure the rate of change like this:\n",
82+
"So we can measure the rate of change like this:\n",
8383
"\n",
8484
"\\begin{equation}m = \\frac{21 - 3}{10 - 1} \\end{equation}\n",
8585
"\n",
@@ -91,15 +91,15 @@
9191
"\n",
9292
"\\begin{equation}m = \\frac{2}{1} \\end{equation}\n",
9393
"\n",
94-
"So our rate of change is <sup>2</sup>/<sub>1</sub> or put another way, the cyclist is travelling at 2 meters-per-second."
94+
"So our rate of change is <sup>2</sup>/<sub>1</sub> or put another way, the cyclist is traveling at 2 meters-per-second."
9595
]
9696
},
9797
{
9898
"cell_type": "markdown",
9999
"metadata": {},
100100
"source": [
101101
"## Average Rate of Change\n",
102-
"OK, let's look at another function that calculates distance travelled for a given number of seconds:\n",
102+
"OK, let's look at another function that calculates distance traveled for a given number of seconds:\n",
103103
"\n",
104104
"\\begin{equation}r(x) = x^{2} + x\\end{equation}\n",
105105
"\n",
@@ -150,7 +150,7 @@
150150
"source": [
151151
"This time, the function is not linear. It's actually a quadratic function, and the line from 0 seconds to 10 seconds shows an exponential increase; in other words, the cyclist is *accelerating*.\n",
152152
"\n",
153-
"Technically, acceleration itself is a measure of change in velocity over time; and velocity, as we've already discussed, is a measure of change in distance over time. So measuring accelleration is pretty complex, and requires *differential calculus*, which we're going to cover shortly. In fact, even just measuring the velocity at a single point in time requires differential calculus; but we can use algebraic methods to calculate an *average* rate of velocity for a given period shown in the graph.\n",
153+
"Technically, acceleration itself is a measure of change in velocity over time; and velocity, as we've already discussed, is a measure of change in distance over time. So measuring acceleration is pretty complex, and requires *differential calculus*, which we're going to cover shortly. In fact, even just measuring the velocity at a single point in time requires differential calculus; but we can use algebraic methods to calculate an *average* rate of velocity for a given period shown in the graph.\n",
154154
"\n",
155155
"First, we need to define a *secant* line that joins two points in our exponential arc to create a straight slope. For example, a secant line for the entire 10 second time span would join the following two points:\n",
156156
"\n",
@@ -164,7 +164,7 @@
164164
"cell_type": "code",
165165
"execution_count": 12,
166166
"metadata": {
167-
"scrolled": true
167+
"scrolled": false
168168
},
169169
"outputs": [
170170
{
@@ -215,7 +215,7 @@
215215
"- At 0 seconds, ***x*** is 0 and ***r***(0) = **0**.\n",
216216
"- At 10 seconds, ***x*** is 10 and ***r***(10) = 110.\n",
217217
"\n",
218-
"So we can meassure the rate of change like this:\n",
218+
"So we can measure the rate of change like this:\n",
219219
"\n",
220220
"\\begin{equation}m = \\frac{110 - 0}{10 - 0} \\end{equation}\n",
221221
"\n",
@@ -227,7 +227,7 @@
227227
"\n",
228228
"\\begin{equation}m = \\frac{11}{1} \\end{equation}\n",
229229
"\n",
230-
"So our rate of change is <sup>11</sup>/<sub>1</sub> or put another way, the cyclist is travelling at an average velocity of 11 meters-per-second over the 10-second period.\n",
230+
"So our rate of change is <sup>11</sup>/<sub>1</sub> or put another way, the cyclist is traveling at an average velocity of 11 meters-per-second over the 10-second period.\n",
231231
"\n",
232232
"Of course, we can measure the average velocity between any two points on the exponential line. Use the following R code to show the secant line for the period between 2 and 7 seconds, and calculate the average velocity for that period"
233233
]

Module02/02-02-Limits.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metadata": {},
66
"source": [
77
"# Limits\n",
8-
"You can use algebraeic methods to calculate the rate of change over a function interval by joining two points on the function with a secant line and measuring its slope. For example, a function might return the distance travelled by a cyclist in a period of time, and you can use a secant line to measure the average velocity between two points in time. However, this doesn't tell you the cyclist's vecolcity at any single point in time - just the average speed over an interval.\n",
8+
"You can use algebraic methods to calculate the rate of change over a function interval by joining two points on the function with a secant line and measuring its slope. For example, a function might return the distance traveled by a cyclist in a period of time, and you can use a secant line to measure the average velocity between two points in time. However, this doesn't tell you the cyclist's velocity at any single point in time - just the average speed over an interval.\n",
99
"\n",
1010
"To find the cyclist's velocity at a specific point in time, you need the ability to find the slope of a curve at a given point. *Differential Calculus* enables us to do through the use of *derivatives*. We can use derivatives to find the slope at a specific *x* value by calculating a delta for *x<sub>1</sub>* and *x<sub>2</sub>* values that are infinitesimally close together - so you can think of it as measuring the slope of a tiny straight line that comprises part of the curve.\n",
1111
"\n",
@@ -960,7 +960,7 @@
960960
"source": [
961961
"From these plotted values, we can see that as *x* approaches 25 from the negative side, *d(x)* is decreasing, and as *x* approaches 25 from the positive side, *d(x)* is increasing. As *x* gets closer to 25, *d(x)* increases or decreases more significantly.\n",
962962
"\n",
963-
"If we were to plot every fractional value of *d(x)* for *x* values between 24.9 and 25, we'd see a line that decreases indefintely, getting closer and closer to the x = 25 vertical line, but never actually reaching it. Similarly, plotting every *x* value between 25 and 25.1 would result in a line going up indefinitely, but always staying to the right of the vertical x = 25 line.\n",
963+
"If we were to plot every fractional value of *d(x)* for *x* values between 24.9 and 25, we'd see a line that decreases indefinitely, getting closer and closer to the x = 25 vertical line, but never actually reaching it. Similarly, plotting every *x* value between 25 and 25.1 would result in a line going up indefinitely, but always staying to the right of the vertical x = 25 line.\n",
964964
"\n",
965965
"The x = 25 line in this case is an *asymptote* - a line to which a curve moves ever closer but never actually reaches. The positive limit for x = 25 in this case in not a real numbered value, but *infinity*:\n",
966966
"\n",

Module02/02-03-Differentiation and Derivatives.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"\n",
112112
"So far, this is just basic algebra; but what if instead of the average rate of change over an interval, we want to calculate the rate of change at a single point, say, where x = 4.5?\n",
113113
"\n",
114-
"One approach we could take is to create a secant line between the point at which we want the slope and another point on the function line that is infintesimally close to it. So close in fact that the secant line is actually a tangent that goes through both points. We can then calculate the slope for the secant line as before. This would look something like the graph produced by the following code:"
114+
"One approach we could take is to create a secant line between the point at which we want the slope and another point on the function line that is infinitesimally close to it. So close in fact that the secant line is actually a tangent that goes through both points. We can then calculate the slope for the secant line as before. This would look something like the graph produced by the following code:"
115115
]
116116
},
117117
{
@@ -249,7 +249,7 @@
249249
"metadata": {},
250250
"source": [
251251
"### Finding the Derivative for a Specific Point\n",
252-
"It's easier to understand differentiation by seeing it in action, so let's use it to find the derivitive for a specific point in the function ***f***.\n",
252+
"It's easier to understand differentiation by seeing it in action, so let's use it to find the derivative for a specific point in the function ***f***.\n",
253253
"\n",
254254
"Here's the definition of function ***f***:\n",
255255
"\n",
@@ -549,7 +549,7 @@
549549
"source": [
550550
"## Derivatives of Equations\n",
551551
"\n",
552-
"We've been talking about derivatves of *functions*, but it's important to remember that functions are just named operations that return a value. We can apply what we know about calculating derivatives to any equation, for example:\n",
552+
"We've been talking about derivatives of *functions*, but it's important to remember that functions are just named operations that return a value. We can apply what we know about calculating derivatives to any equation, for example:\n",
553553
"\n",
554554
"\\begin{equation}\\frac{d}{dx}(2x + 6)\\end{equation}\n",
555555
"\n",
@@ -614,7 +614,7 @@
614614
"\n",
615615
"- If *f(x)* = *C* (where *C* is a constant), then *f'(x)* = 0\n",
616616
"\n",
617-
" This makes sense if you think about it for a second. No matter what value you use for *x*, the function returns the same constant value; so the graph of the function will be a horizontal line. There's no rate of change in a horiziontal line, so its slope is 0 at all points. This is true of any constant, including symbolic constants like *&pi;* (pi).\n",
617+
" This makes sense if you think about it for a second. No matter what value you use for *x*, the function returns the same constant value; so the graph of the function will be a horizontal line. There's no rate of change in a horizontal line, so its slope is 0 at all points. This is true of any constant, including symbolic constants like *&pi;* (pi).\n",
618618
" \n",
619619
" So, for example:\n",
620620
" \n",

Module02/02-04-Critical Points and Optimization.ipynb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@
5555
" xlab('x (time in seconds)')"
5656
]
5757
},
58-
{
59-
"cell_type": "code",
60-
"execution_count": null,
61-
"metadata": {},
62-
"outputs": [],
63-
"source": []
64-
},
6558
{
6659
"cell_type": "markdown",
6760
"metadata": {},

Module02/02-05-Multivariate Functions and Partial Derivatives.ipynb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,6 @@
144144
"\n",
145145
"The algorithm outlined above is called the **gradient decent method**. It is the basis of many real-world minimization algorithms. "
146146
]
147-
},
148-
{
149-
"cell_type": "code",
150-
"execution_count": null,
151-
"metadata": {},
152-
"outputs": [],
153-
"source": []
154147
}
155148
],
156149
"metadata": {

Module02/02-06-Integration.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Introduction to Integration\n",
88
"\n",
9-
"Integrals are the inverses of derivatives. More importantly, using integration provides a way to compute the area under the curve of most any function. There are many applications for integration. For example, if you need to compute a probability of some occurance between limits (which we'll discuss later in this course), then you will use an integral.\n",
9+
"Integrals are the inverses of derivatives. More importantly, using integration provides a way to compute the area under the curve of most any function. There are many applications for integration. For example, if you need to compute a probability of some occurrence between limits (which we'll discuss later in this course), then you will use an integral.\n",
1010
"\n",
1111
"Let's start with a simple function:\n",
1212
"\n",
@@ -67,7 +67,7 @@
6767
"\n",
6868
"The $\\int$ symbol shows that this formula is an integral. The $dx$ indicates that the integration is with respect to the $x$ variable. Note that since $f(x) = x$, we could also write this integral formula as $\\int x\\;dx$\n",
6969
"\n",
70-
"So, what is the integral of $x\\ dx$? To answer this question, we need the *antiderivative* of ***f*** - in other words we need to find a function which has a derivative matching the output of $f$, which is just $x$. Using the power rule in reverse, a function that has the derivative $x$ would be $\\frac{1}{2} x^2$\n",
70+
"So, what is the integral of $x\\ dx$? To answer this question, we need the *anti-derivative* of ***f*** - in other words we need to find a function which has a derivative matching the output of $f$, which is just $x$. Using the power rule in reverse, a function that has the derivative $x$ would be $\\frac{1}{2} x^2$\n",
7171
"\n",
7272
"So, the *unbound* integral formula for $f$ with respect to $x$ can be written as:\n",
7373
"\n",
@@ -125,7 +125,7 @@
125125
"\n",
126126
"$$\\int_0^2 f(x)\\;dx$$\n",
127127
"\n",
128-
"The integral is evaluated by subtracting the value of the integrand at the lower limit from the integrand at the upper limit; and since we know the formula based on our antiderivative function, the integral can be evaluated in the following manner.\n",
128+
"The integral is evaluated by subtracting the value of the integrand at the lower limit from the integrand at the upper limit; and since we know the formula based on our anti-derivative function, the integral can be evaluated in the following manner.\n",
129129
"\n",
130130
"$$\\int_0^2 f(x)\\;dx\\\\ = \\frac{1}{2} x^2\\ \\big|_0^2\\\\\n",
131131
"= \\frac{1}{2} 2^2 - \\frac{1}{2} 0^2\\\\\n",
@@ -226,7 +226,7 @@
226226
"\n",
227227
"$$\\int_0^3 3x^2 + 2x + 1\\;dx$$ \n",
228228
"\n",
229-
"We can calculate the antiderivative of $3x^2 + 2x + 1\\;dx$ as $\\frac{3}{3} x^3 + \\frac{2}{2} x^2 + x$, so:\n",
229+
"We can calculate the anti-derivative of $3x^2 + 2x + 1\\;dx$ as $\\frac{3}{3} x^3 + \\frac{2}{2} x^2 + x$, so:\n",
230230
"\n",
231231
"$$\\int_0^3= \\frac{3}{3} x^3 + \\frac{2}{2} x^2 + x\\ \\big|_0^3\\\\\n",
232232
"= \\frac{3}{3} 3^3 + \\frac{2}{2} 3^2 + 3 - \\frac{3}{3} 0^3 - \\frac{2}{2} 0^2 + 0\\\\\n",
@@ -348,7 +348,7 @@
348348
"\n",
349349
"$$\\frac{1}{\\sqrt{2 \\pi}} e^{\\frac{-x^2}{2}}$$\n",
350350
"\n",
351-
"It makes sense that the integral of this probability density function from $-\\infty$ to $\\infty$ must be $1.0$. In other words the probability of a Normally distributed event ocurring at all possible values must be $1.0$. \n",
351+
"It makes sense that the integral of this probability density function from $-\\infty$ to $\\infty$ must be $1.0$. In other words the probability of a Normally distributed event occurring at all possible values must be $1.0$. \n",
352352
"\n",
353353
"The code in the cell below computes the following integral:\n",
354354
"\n",

0 commit comments

Comments
 (0)