diff --git a/content/posts/KBhpset_6.md b/content/posts/KBhpset_6.md index 603fc3e8b..248a2a540 100644 --- a/content/posts/KBhpset_6.md +++ b/content/posts/KBhpset_6.md @@ -224,6 +224,10 @@ This allows us to write out: ### Problem 16.1, part b {#problem-16-dot-1-part-b} +Explicit Euler's method relates to the slope field works by starting at the initial point, and taking the slope at that point, and "tracing" out to a distance of \\(h\\) on that slope + reevaluating. + +In essence, explicit Euler traces out piecewise linear segments of the function on the slope field. + In Explicit Euler's method, we leverage the fact that: \begin{equation} @@ -232,20 +236,24 @@ x\_{0}+ h f(x\_0) \approx x(t\_0 + h) to obtain our solution at some point beyond the initial point. A graphical way of doing this would involve drawing piecewise linear line segments which span \\(h\\) in \\(t\\) and has slope \\(f(x\_0)\\), starting at point \\(x\_0\\). In problem \\(b\\), specifically, we have: -{{< figure src="/ox-hugo/2024-02-14_17-33-18_screenshot.png" >}} +{{< figure src="/ox-hugo/2024-02-20_14-43-08_screenshot.png" >}} ### Problem 16.2, part a {#problem-16-dot-2-part-a} -In Explicit Euler's method, we seek a point such that: +In Implicit Euler's method, we seek a point such that: \begin{equation} x\_{i+1} - h f(x\_{i+1}) = x\_i \end{equation} -to obtain our solution at some point beyond the initial point. Essentially, we go backwards from each \\(x\_{i+1}\\) to "connect" the best line such the slope at that line can reach backwards into hitting our previous point \\(x\_{i}\\). We keep going ahead by steps \\(h\\), and "connecting" backwards to where we last finished computation. For \\(y' = -3y\\), we have: +to obtain our solution at some point beyond the initial point. Essentially, we go backwards from each \\(x\_{i+1}\\) in distance \\(h\\) from our previous point to "connect" the best line such the slope at that line can reach backwards into hitting our previous point \\(x\_{i}\\). The slopes chosen at each step should be the slope at the destination step, and not the source step. + +We keep going ahead by steps \\(h\\), and "connecting" backwards to where we last finished computation. For \\(y' = -3y\\), we have: + +This method may get stuck if, after a time period ahead of your current point \\(f(x\_{t+1})\\) results in a value for which there's no valid solution for \\(x\_{t+1}\\) which is connected to your previous point. -{{< figure src="/ox-hugo/2024-02-14_17-41-29_screenshot.png" >}} +{{< figure src="/ox-hugo/2024-02-20_14-45-48_screenshot.png" >}} ## Chapter 17 {#chapter-17} diff --git a/content/posts/KBhsu_math53_feb212024.md b/content/posts/KBhsu_math53_feb212024.md index 76ba19c70..43757f214 100644 --- a/content/posts/KBhsu_math53_feb212024.md +++ b/content/posts/KBhsu_math53_feb212024.md @@ -4,7 +4,7 @@ author = ["Houjun Liu"] draft = false +++ -A [Partial Differential Equation]({{< relref "KBhpartial_differential_equations.md" >}}) is a [Differential Equation]({{< relref "KBhdiffeq_intro.md" >}}) which has more than one **independent variable**. +A [Partial Differential Equation]({{< relref "KBhpartial_differential_equations.md" >}}) is a [Differential Equation]({{< relref "KBhdiffeq_intro.md" >}}) which has more than one **independent variable**: $u(x,y), u(t,x,y), ...$ For instance: @@ -13,6 +13,200 @@ For instance: \end{equation} +## Key Intuition {#key-intuition} + +- [PDE]({{< relref "KBhpartial_differential_equations.md" >}})s may have no solutions (unlike [Uniqueness and Existance]({{< relref "KBhuniqueness_and_existance.md" >}}) for [ODE]({{< relref "KBhordinary_differential_equations.md" >}})s) +- yet, usually, there are too many solutions---so... how do you describe all solutions? +- usually, there are no explicit formulas + + +## Laplacian of \\(u(x,y)\\) {#laplacian-of-u--x-y} + +\begin{equation} +\pdv[2]{u}{x} + \pdv[2]{u}{y} +\end{equation} + +Think about a Gaussian distribution, a bell shape curve. One important intuition is that the entire thing is curving down. + + +## Examples {#examples} + + +### Heat Equation {#heat-equation} + +heat distributes by "diffusing"; this is heat \\(u\\) diffusing across a plate + +\begin{equation} +\pdv{u}{t} = \alpha \qty( \pdv[2]{u}{x} + \pdv[2]{u}{y}) +\end{equation} + + +#### Removing a constant {#removing-a-constant} + +Consider a function: + +\begin{equation} +t = c \tau +\end{equation} + +you can remove the constant by finanglisng because the constant drops out when scaled (i.e. you can just scale your results back TODO check this). + + +#### Solution {#solution} + +We can get a solution: + +\begin{equation} +u(t,x) = \frac{1}{\sqrt{t}}e^{-\frac{x^{2}}{4t}} +\end{equation} + +we can check that it satisfy the equation through route algebra. + + +#### Bell Curves {#bell-curves} + +\begin{equation} +y = a e^{-\frac{x^{2}}{b}} +\end{equation} + +this function takes maximum at \\(a\\), centered at \\(0\\), and as \\(b\\) increases the bell becomes more + + + +- Integrating a Bell Curve + + \begin{equation} + \int\_{-\infty}^{\infty} \frac{1}{\sqrt{t}} e^{-\frac{x^{2}}{4t}} \dd{x} + \end{equation} + + let us declare: \\(u = \frac{x}{2 \sqrt{t}}\\) + + meaning: + + \begin{equation} + 2 \int\_{-\infty}^{\infty} e^{-u^{2}}\dd{u} + \end{equation} + + which is a constant. So, no matter the \\(t\\), we have a constant value of energy. + + +### Wave Equation {#wave-equation} + +\begin{equation} +u(t,x), u(t,x,y) +\end{equation} + +we describe it: + +\begin{equation} +\pdv[2]{u}{t} = c^{2} \qty(\pdv[2]{u}{x} + \pdv[2]{u}{y}) +\end{equation} + +If we write it in a single set of variables: + +\begin{equation} +\pdv[2]{u}{t} = \pdv[2]{u}{x} +\end{equation} + +One particular solution: + +\begin{equation} +u(t,x) = \cos t \sin x +\end{equation} + +If you consider traveling across \\(t\\), you will note that we begin at \\(\cos (1) = 1\\), then slowly travel to \\(\cos (\frac{\pi}{2}) = 0\\), and back and forth. + + +#### General Standing Wave Solution {#general-standing-wave-solution} + +Because the [PDE]({{< relref "KBhpartial_differential_equations.md" >}}) given is linear, solutions compose, and we note that any scale of \\(\cos kt \sin kx\\) will compose. + +\begin{equation} +u(t,x) = \sum\_{k=0}^{\infty} a\_{k} \cos kt \sin kx +\end{equation} + + +#### Fourier Series {#fourier-series} + +\begin{equation} +u(o,x) \sum\_{k} a\_{k}\sin kx +\end{equation} + +BIG **stunning conclusion**: **every single function, including wack ones, can be decomposed** : + + +#### General Traveling Wave Solution {#general-traveling-wave-solution} + +\begin{equation} +u(t,x) = \sin (x-t) w(x-t) +\end{equation} + +as long as \\(w\\) is a valid twice-differentiable solution, plugging its derivative in will resolve as well. + + + +- Composition + + \begin{equation} + \sin (x-t) + \sin (x+t) = \sin x \cos t - \cos x \sin t + \sin x \cos t + \cos x \sin t = 2 \sin x \cos t + \end{equation} + + +### Transport Equation {#transport-equation} + +\begin{equation} +\pdv{u}{t} = \pdv{u}{x} +\end{equation} + +generally any \\(u = w(x+t)\\) should solve this + + +### Schrodinger Equation {#schrodinger-equation} + +We have some: + +\begin{equation} +u(x,t) +\end{equation} + +and its a complex-valued function: + +\begin{equation} +i \pdv{u}{t} = \pdv[2]{u}{x} +\end{equation} + +which results in a superposition in linear equations + + +### Nonlinear Example {#nonlinear-example} + +\begin{equation} +\pdv{u}{t} = \pdv[2]{u}{x} + u(1-u) +\end{equation} + +this is a [PDE]({{< relref "KBhpartial_differential_equations.md" >}}) variant of the [logistic equation]({{< relref "KBhlogistic_equations.md" >}}): this is **non-linear** + + +### Monge-Ampere Equations {#monge-ampere-equations} + +\begin{equation} +u(x,y) +\end{equation} + + +#### Hessian {#hessian} + +\begin{equation} +Hess(u) = \mqty(\pdv[2]{u}{x} & \frac{\partial^{2} u}{\partial x \partial y} \\\ \frac{\partial^{2} u}{\partial x \partial y} & \pdv[2]{u}{y}) +\end{equation} + +If we take its determinant, we obtain: + +\begin{equation} +\pdv[2]{u}{x} \pdv[2]{u}{y} - \qty(\frac{\partial^{2} u}{\partial x \partial y})^{2} +\end{equation} + + ## Linear Partial Differential Equation {#linear-partial-differential-equation} A PDE is a [Linear PDE](#linear-partial-differential-equation) when it takes on the form of: diff --git a/static/ox-hugo/2024-02-20_14-41-50_screenshot.png b/static/ox-hugo/2024-02-20_14-41-50_screenshot.png new file mode 100644 index 000000000..2ca52ecee Binary files /dev/null and b/static/ox-hugo/2024-02-20_14-41-50_screenshot.png differ diff --git a/static/ox-hugo/2024-02-20_14-43-08_screenshot.png b/static/ox-hugo/2024-02-20_14-43-08_screenshot.png new file mode 100644 index 000000000..69442ddcd Binary files /dev/null and b/static/ox-hugo/2024-02-20_14-43-08_screenshot.png differ diff --git a/static/ox-hugo/2024-02-20_14-45-48_screenshot.png b/static/ox-hugo/2024-02-20_14-45-48_screenshot.png new file mode 100644 index 000000000..b64059631 Binary files /dev/null and b/static/ox-hugo/2024-02-20_14-45-48_screenshot.png differ diff --git a/static/share/nacc/nacc-layer-dense.html b/static/share/nacc/nacc-layer-dense.html new file mode 100644 index 000000000..bb9b2f192 --- /dev/null +++ b/static/share/nacc/nacc-layer-dense.html @@ -0,0 +1,16 @@ + + + +
+
+ + \ No newline at end of file diff --git a/static/share/nacc-movement.html b/static/share/nacc/nacc-movement.html similarity index 100% rename from static/share/nacc-movement.html rename to static/share/nacc/nacc-movement.html diff --git a/static/share/naccmmse-perm.html b/static/share/nacc/naccmmse-perm.html similarity index 100% rename from static/share/naccmmse-perm.html rename to static/share/nacc/naccmmse-perm.html