Skip to content

Commit 16a9b26

Browse files
committed
adding in information on Taylor Series Expansions
1 parent 28fa404 commit 16a9b26

File tree

5 files changed

+39
-3
lines changed

5 files changed

+39
-3
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* [Thomas Algorithm](chapters/computational_mathematics/matrix_methods/thomas.md)
1818
* [FFT](chapters/computational_mathematics/cooley_tukey.md)
1919
* [Computational Physics](chapters/computational_physics/computational_physics.md)
20+
* [Euler Methods](chapters/computational_physics/euler.md)
2021
* [Computational Biology](chapters/computational_biology/computational_biology.md)
2122
* [Computational Creativity](chapters/computational_creativity/computational_creativity.md)
2223
* [Miscellaneous Algorithms](chapters/miscellaneous_algorithms/miscellaneous_algorithms.md)

chapters/computational_mathematics/matrix_methods/thomas.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
##### Dependencies
2+
* [Gaussian Elimination](gaussian_elimination.md)
3+
14
# Thomas Algorithm
25

36
As alluded to in the Gaussian Elimination Chapter, the Thomas Algorithm (or TDMA -- Tri-Diagonal Matrix Algorithm) allows for programmers to **massively** cut the computational cost of their code from $$\sim O(n^3) \rightarrow \sim O(n)$$! This is done by exploiting a particular case of Gaussian Elimination, particularly the case where our matrix looks like:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##### Dependencies
2+
* [Taylor Series Expansions](../mathematical_background/taylor_series.md)
3+
* [Thomas Algorithm](../computational_mathematics/matrix_methods/thomas.md)
4+
* [Gaussian Elimination](../computational_mathematics/matrix_methods/gaussian_elimination.md)
5+
6+
# Euler Method
7+
8+
COMING SOON TO AN ARCHIVE NEAR YOU!
Loading

chapters/mathematical_background/taylor_series.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,34 @@ $$
77
f(x) \simeq \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n
88
$$
99

10-
It looks like it is just a bunch of derivatives strung together! Where's the physics? Well, let's expand this series for the first few derivatives
10+
where $$f(x)$$ is some function along real or complex space, $$a$$ is the point that we are expanding from, and $$f^{(n)}(x)$$ denotes the $$n^{\text{th}}$$ derivative of $$f(x)$$.
11+
From this perspective, the expansion just looks like a bunch of derivatives strung together! Where's the physics? Well, let's expand this series for the first few derivatives:
1112

1213
$$
13-
f(x) \simeq a + \frac{df(a)}{da} + \frac{1}{2}\frac{d^2f(a)}{da^2}
14+
f(x) \simeq f(a) + \frac{df(a)}{da}(x-a)
15+
+ \frac{1}{2}\frac{d^2f(a)}{da^2}(x-a)^2
1416
$$
1517

16-
If we substitute
18+
If we substitute the derivatives for their physical quantities with $$f(a) \rightarrow x(t)$$ and measure from 0, we find that
19+
20+
$$
21+
\begin{align}
22+
\frac{dx(t)}{dt} &= \text{velocity} = v \\
23+
\frac{d^2x(t)}{dt^2} &= \text{acceleration} = a \\
24+
\end{align}
25+
$$
26+
27+
and the above expansion turns into one of the most common formulas in classical physics, the *kinematic equation*!
28+
29+
$$
30+
x(t) = \simeq x(t) + \frac{dx(t)}{dt}(t)
31+
+ \frac{1}{2}\frac{d^2x(t)}{dt^2}(t)^2
32+
$$
33+
34+
In fact, it the Taylor Series Expansion can be found in the most unusual places and is used as the foundation of many different algorithms throughout this book. At first, it might not seem obvious why, but we can approximate almost any smooth function with a Taylor Series Expansion, and the more terms we include, the better our approximation becomes! For example, take Figure 1. Any function can be approximated as a sum of all the derivatives for that function. If we evaluate these derivatives at any point, we closely approximate the actual function.
35+
36+
![Function sum][function_sum]
37+
38+
This shows the true power of the Taylor Series Expansion. It allows us to more easily tackle complicated functions by approximating them as functions we can actually use and imagine!
39+
40+
[function_sum]: function_sum.png

0 commit comments

Comments
 (0)