Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor typos #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions General/Projectile-Motion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"source": [
"# Intro to Jupyter Notebooks\n",
"\n",
"Currently, we are using a jupyter notebook. This format can support either Julia, Python, or R. The setup is quite similar to that present in the propriety software Mathematica. \n",
"Currently, we are using a Jupyter notebook. This format can support either Julia, Python, or R. The setup is quite similar to that present in the propriety software Mathematica. \n",
"\n",
"We have two types of cells:\n",
"* Markdown cells\n",
Expand Down Expand Up @@ -113,7 +113,7 @@
"\\frac{d v_x}{dt} = 0 \\;\\;\\;\\; \\frac{d v_y}{dt}= g\n",
"\\end{equation}\n",
"\n",
"To put this into an equation, we take the derivative and break it into a courser-grained version\n",
"To put this into an equation, we take the derivative and break it into a coarser-grained version\n",
"\\begin{equation}\n",
"\\frac{dx}{dt} \\approx \\frac{ \\Delta x}{\\Delta t}.\n",
"\\end{equation}\n",
Expand All @@ -124,7 +124,7 @@
"y(t_{n+1})= y(t_n)+ v_y(t_n) \\Delta t\n",
"\\end{equation}\n",
"\n",
"We can also think of this as finding a small enough interval such that we can treat the y-velocity as if it's constant.\n",
"We can also think of this as finding a small enough interval such that we can treat the $y$-velocity as if it's constant.\n",
"\n",
"\n",
"Bonus note: Different types of algorithms, like symplectic, evaluate the velocity at different time points. "
Expand Down Expand Up @@ -280,7 +280,7 @@
"\n",
"We use [Plots.jl](http://docs.juliaplots.org/latest/) to display our results here.\n",
"\n",
"<b>Tips from Expierence</b>: Always include x and y labels, title, legends, and relevant units <b>on the graph</b>. \n",
"<b>Tips from Experience</b>: Always include $x$ and $y$ labels, title, legends, and relevant units <b>on the graph</b>. \n",
"\n",
"The graph might seem obvious to you now, but the labeling might not seem obvious to you next week, next month, or next year. And it probably won't seem obvious to someone else looking at your work.\n",
"\n",
Expand Down Expand Up @@ -3245,7 +3245,7 @@
}
],
"source": [
"# Lets choose our step sizes\n",
"# Let's choose our step sizes\n",
"dta=[.001,.01,.1,.2]"
]
},
Expand Down Expand Up @@ -4156,7 +4156,7 @@
"\n",
"Real objects encounter air resistance proportional to velocity. That effect can't be solved analytically, but our code can handle it easily.\n",
"\n",
"We include air resistence by adding a force against the direction motion and proportional to the velocity squared in strength. We then have to project it along the x and y directions.\n",
"We include air resistence by adding a force against the direction motion and proportional to the velocity squared in strength. We then have to project it along the $x$ and $y$ directions.\n",
"\\begin{equation}\n",
"\\vec{F}=-\\text{sign}(\\vec{v}) \\frac{1}{2}\\rho C_d A v^2 = -\\text{sign}( \\vec{v}) R v^2,\n",
"\\end{equation}\n",
Expand Down
4 changes: 2 additions & 2 deletions Graduate/1D-Spin-Chain-Prerequisites.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"# psi is an array of all our wavefunctions\n",
"psi=convert.(Int8,collect(0:(nstates-1)) )\n",
"\n",
"# Lets look at each state both in binary and base 10\n",
"# Let's look at each state both in binary and base 10\n",
"println(\"binary form \\t integer\")\n",
"for p in psi\n",
" println(bitstring(p)[end-n:end],\"\\t\\t \",p)\n",
Expand Down Expand Up @@ -401,7 +401,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"So now lets test how the first of our three masks behaves:\n",
"So now let's test how the first of our three masks behaves:\n",
"We know that if the mask changes a 01 for a 10 (or vice versa) that the overall magnetization will not be changed. So, we test is our mask is successful by comparing the remaining magnetization. The rows offset by two spaces have matching magnetizations."
]
},
Expand Down
8 changes: 4 additions & 4 deletions Graduate/Winding-Number.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# The Winding Number and the SSH model\n",
"\n",
"The Chern number isn't the only topological invariant. We have multiple invariants, each convenient in their own situations. The Chern number just happened to appear one of the biggest, early examples, the Integer Quantum Hall Effect, but the winding number actually occurs much more often in a wider variety of circumstances.\n",
"The Chern number isn't the only topological invariant. We have multiple invariants, each convenient in their own situations. The Chern number just happened to appear in one of the biggest, early examples, the Integer Quantum Hall Effect, but the winding number actually occurs much more often in a wider variety of circumstances.\n",
"\n",
"How many times does the phase wrap as we transverse a closed loop?\n",
"$$\n",
Expand Down Expand Up @@ -219,7 +219,7 @@
"$$\n",
"U H U^{-1} = -H \\qquad \\qquad U U^{\\dagger} =\\mathbb{1}.\n",
"$$\n",
"Finding $U$ if even exists and determining its form if it exists is a problem for another time. Today, multiple places said that $\\sigma_z$ works for the SSH model, and we can confirm that it does. \n",
"Finding if $U$ even exists and determining its form if it exists is a problem for another time. Today, multiple places said that $\\sigma_z$ works for the SSH model, and we can confirm that it does. \n",
"\n",
"A little less intellectually satisfying (at least for me), but it works.\n",
"\n",
Expand Down Expand Up @@ -284,7 +284,7 @@
"=\\pm \\sqrt{v^2+w^2 \\cos^2 k -2 vw \\cos k + w^2 \\sin^2 k} \n",
"= \\pm \\sqrt{v^2 - 2 vw \\cos k + w^2}\n",
"$$\n",
"The difference between the upper and lower band will be at it's minimum when $\\cos k$ is greatest,$k=0$.\n",
"The difference between the upper and lower band will be at its minimum when $\\cos k$ is greatest, $k=0$.\n",
"$$\n",
"=\\pm \\sqrt{(v-w)^2}\n",
"$$\n",
Expand Down Expand Up @@ -1059,7 +1059,7 @@
"$$\n",
"Here we have a 1-1 correspondence between the Hamiltonian and a <b>geometric</b> object, this $\\vec{R}$ vector. When we look at how it depends on $k$, we get insight into how $\\mathcal{H}$ depends on $k$ as well.\n",
"\n",
"The two different groups, purple and turquoise, will have two different behaviors. $\\vec{R}(k)$ for purple will circle the origin like $S^1$ the unit circle, whereas $\\vec{R}(k)$ for turquoise not circle the origin and will not be like $S^1$."
"The two different groups, purple and turquoise, will have two different behaviors. $\\vec{R}(k)$ for purple will circle the origin like $S^1$ the unit circle, whereas $\\vec{R}(k)$ for turquoise will not circle the origin and will not be like $S^1$."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Numerics_Prog/Jacobi-Transformation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"\\begin{equation}\n",
"A^{\\prime}= P^{T}_{pq} \\cdot A \\cdot P_{pq}\n",
"\\end{equation}\n",
"where each iteration brings A closer to diagonal form. Thus in our implementing our algorithm, we need to determine two things\n",
"where each iteration brings A closer to diagonal form. Thus in implementing our algorithm, we need to determine two things\n",
"<ul>\n",
"<li> The values of c and s\n",
"<li> The pattern of sweeping p and q\n",
Expand Down
8 changes: 4 additions & 4 deletions Numerics_Prog/Monte-Carlo-Markov-Chain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"### Intro\n",
"\n",
"If you didn't check it out already, take a look at the post that introduces using random numbers in calculations. Any such simulation is a <i>Monte Carlo</i> simulation. The most used kind of Monte Carlo simulation is a <i>Markov Chain</i>, also known as a random walk, or drunkard's walk. A Markov Chain is a series of steps where\n",
"* each new state is chosen probabilitically\n",
"* each new state is chosen probabilistically\n",
"* the probabilities only depend on the current state (no memory)\n",
"\n",
"Imagine a drunkard trying to walk. At any one point, they could progress either left or right rather randomly. Also, just because they had been traveling in a straight line so far does not guaruntee they will continue to do. They've just had extremely good luck. \n",
"Imagine a drunkard trying to walk. At any one point, they could progress either left or right rather randomly. Also, just because they had been traveling in a straight line so far does not guarantee they will continue to do. They've just had extremely good luck. \n",
"\n",
"We use Markov Chains to <b>approximate probability distributions</b>. \n",
"\n",
Expand All @@ -40,7 +40,7 @@
"\\pi_i p_{i j} = \\pi_j p_{j i}.\n",
"\\end{equation}\n",
"\n",
"Detailed Balance further constricts the transition probabilities we can assign and makes it easier to design an algorithm. Almost all MCMC algorithms out there use detailed balance, and only lately have certain applied mathematicians begun looking and breaking detailed balance to increase efficiency in certain classes of problems. \n",
"Detailed Balance further constricts the transition probabilities we can assign and makes it easier to design an algorithm. Almost all MCMC algorithms out there use detailed balance, and only lately have certain applied mathematicians begun looking at breaking detailed balance to increase efficiency in certain classes of problems. \n",
"\n",
"### Today's Test Problem\n",
"\n",
Expand Down Expand Up @@ -2938,7 +2938,7 @@
"\n",
"Monte Carlo simulations are as much of an art as a science. You need to live them, love them, and breathe them till you find out exactly why they are behaving like little kittens that can finally jump on top of your countertops, or open your bedroom door at 1am. \n",
"\n",
"For all their mishaving, you love the kittens anyway.\n"
"For all their misbehaving, you love the kittens anyway.\n"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions Numerics_Prog/Monte-Carlo-Pi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"## Buffon's Needle: Calculation of π\n",
"Even back in the 18th century, Georges-Louis Leclerc, Comte de Buffon posed a problem in geometric probability. Nowdays, we use a slightly different version of that problem to calculate π and illustrate Monte Carlo simulations. \n",
"\n",
"Suppose we have a square dartboard, and someone with really bad, completely random aim, even though he/she always at least hits inside the dartboard. We then inscribe a circle inside that dartboard. After an infinity number of hits, what is the ratio between hits in the circle, and hits in the square?\n",
"Suppose we have a square dartboard, and someone with really bad, completely random aim, even though he/she always at least hits inside the dartboard. We then inscribe a circle inside that dartboard. After an infinite number of hits, what is the ratio between hits in the circle, and hits in the square?\n",
"\n",
"![A dartboard](Images/MonteCarlo/dartboard.png)\n",
"![A dartboard](../images/MonteCarlo/dartboard.png)\n",
"\n",
"\\begin{equation}\n",
" f= \\frac{N_{circle}}{N_{square}} =\\frac{\\text{Area of circle}}{\\text{Area of square}} =\\frac{\\pi r^2}{4 r^2}= \\frac{\\pi}{4}\n",
Expand Down Expand Up @@ -77,7 +77,7 @@
"source": [
"We will generate our random numbers on the unit interval. Thus the radius in our circumstance is $.5$.\n",
"\n",
" Write a function `incircle(r2)` such that if `r2` is in the circle, it returns true, else, it returns false. We will use this with the julia function `filter`. Assume `r2` is the radius squared, and already centered around the middle of the unit circle"
"Write a function `incircle(r2)` such that if `r2` is in the circle, it returns true, else, it returns false. We will use this with the Julia function `filter`. Assume `r2` is the radius squared, and already centered around the middle of the unit circle"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions Numerics_Prog/Roots_1D.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@
"source": [
"## Interchangeability \n",
"\n",
"The first time I implement an algorithm, I usually don't wrap it up into a function at all. Once I do wrap it into a function, the function, I take just the inputs required for what I wrapped up in some random order and send back some large chunk of data. There is nothing wrong with just slapping things together till they work, but like in this post here when I have functions that achieve the same thing, a little editing can make things better. \n",
"The first time I implement an algorithm, I usually don't wrap it up into a function at all. Once I do wrap it into a function, I take just the inputs required for what I wrapped up in some random order and send back some large chunk of data. There is nothing wrong with just slapping things together till they work, but like in this post here when I have functions that achieve the same thing, a little editing can make things better. \n",
"\n",
"Some of the methods here require brackets, some points, some derivative functions, or just some other combination of all these. With this variability, how do we standardize the inputs? Fiddling till I find something that works. I wrapped inputs up into values that get interated and values that don't.\n",
"\n",
Expand Down Expand Up @@ -1368,7 +1368,7 @@
" print(\"midpoint is zero\")\n",
" return [c,c]\n",
" else \n",
" println(\"Mid point doesn't bracket a zero... somethign weird...\")\n",
" println(\"Mid point doesn't bracket a zero... something weird...\")\n",
" print(c,\"\\t\",f(c))\n",
" end\n",
"end"
Expand Down Expand Up @@ -1696,7 +1696,7 @@
"source": [
"## Newton-Raphson Method\n",
"\n",
"The Newton-Raphson Method uses the derivative at a point to extrapolate to where a zero would occur if the function was sufficiently well approximated by the derivative. Even curvature and higher expansion terms do largely influence the function, we at least get going in the right direction, so the next iteration will be better. We'll see that with $x^2$ near $0$.\n",
"The Newton-Raphson Method uses the derivative at a point to extrapolate to where a zero would occur if the function was sufficiently well approximated by the derivative. Even when curvature and higher expansion terms do largely influence the function, we at least get going in the right direction, so the next iteration will be better. We'll see that with $x^2$ near $0$.\n",
"\n",
"When the function is well approximated by its derivative, this method works extremely well. \n",
"\n",
Expand Down Expand Up @@ -1733,7 +1733,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We can analytically calculating derivatives using 'ForwardDiff.jl'. The syntax is\n",
"We can analytically calculate derivatives using 'ForwardDiff.jl'. The syntax is\n",
"\n",
" f_prep(x::Vector)=f(x[1])\n",
" f_prep2=(x->ForwardDiff.gradient(f_prep,x))\n",
Expand Down Expand Up @@ -2102,7 +2102,7 @@
"\n",
"Even more problematically, these cycles tend to be stable, as the evaluation at the second starting point shows us.\n",
"\n",
"More sophisticated methods than the one's I'm showing here and check to see if NR is returning less than linear convergence, and default to the Midpoint method in those circumstances. This way, you can achieve the NR speedup, but keep the Midpoint method's robustness.\n",
"More sophisticated methods than the ones I'm showing here check to see if NR is returning less than linear convergence, and default to the Midpoint method in those circumstances. This way, you can achieve the NR speedup, but keep the Midpoint method's robustness.\n",
"\n",
"These are somehow related to [Newton Fractals](https://en.wikipedia.org/wiki/Newton_fractal) and some other mathematics I don't yet understand. Feel free to look them up if you feel so inclined."
]
Expand Down Expand Up @@ -2681,7 +2681,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we can see in <b>black</b> the stationary cycle. Colored by iteration, we can see the perturbed attempt.While is does move over a little to the right once, the path moves right back over to it's attractive stationary region. No amount of iterations will get us any closer to a zero."
"Here we can see in <b>black</b> the stationary cycle. Colored by iteration, we can see the perturbed attempt. While is does move over a little to the right once, the path moves right back over to its attractive stationary region. No amount of iterations will get us any closer to a zero."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Numerics_Prog/Runge-Kutta-Methods.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"$$\n",
"In case you haven't seen it before, the notation $\\mathcal{O}(x)$ stands for \"errors of the order x\".\n",
"Summing over the entire interval, we accumuluate error according to \n",
"$$N\\mathcal{O}(h^2)= \\frac{x_f-x_0}{h}\\mathcal{O}(h^2)=h $$,\n",
"$$N\\mathcal{O}(h^2)= \\frac{x_f-x_0}{h}\\mathcal{O}(h^2)=h, $$\n",
"making this a <b>first order</b> method. Generally, if a technique is $n$th order in the Taylor expansion for one step, its $(n-1)$th order over the interval. "
]
},
Expand Down
8 changes: 4 additions & 4 deletions Prerequisites/.ipynb_checkpoints/QHO-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"* demonstrate completeness. This means we can describe every function by a linear combination of Hermite polynomials, provided it is suitably well behaved.\n",
"\n",
"\n",
"Though a formula exists or calculating a function at n directly, the most efficient method at low n for calculating polynomials relies on recurrence relationships. These recurrence relationships will also be quite handy if you ever need to show orthogonality, or expectation values. \n",
"Though a formula exists for calculating a function at $n$ directly, the most efficient method at low $n$ for calculating polynomials relies on recurrence relationships. These recurrence relationships will also be quite handy if you ever need to show orthogonality, or expectation values. \n",
"##### Recurrence Relations\n",
"\\begin{equation}\n",
"H_{n+1}(x) = 2xH_n(x) - H^{\\prime}_n(x)\n",
Expand Down Expand Up @@ -154,7 +154,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"So lets generate some Hermite polynomials and look at them. \n",
"So let's generate some Hermite polynomials and look at them. \n",
"<b> Make sure you don't call a Hermite you haven't generated yet!"
]
},
Expand Down Expand Up @@ -608,7 +608,7 @@
}
],
"source": [
"# Lets make our life easy and set all units to 1\n",
"# Let's make our life easy and set all units to 1\n",
"m=1\n",
"ω=1\n",
"ħ=1\n",
Expand All @@ -622,7 +622,7 @@
"metadata": {},
"source": [
"### Finding Zeros\n",
"The eigenvalue maps to the number of zeros in the wavefunction. Below, I use Julia's roots package to indentify roots on the interval from -3 to 3. "
"The eigenvalue maps to the number of zeros in the wavefunction. Below, I use Julia's roots package to identify roots on the interval from -3 to 3. "
]
},
{
Expand Down
Loading