Compare commits
1 Commits
3-solve-pr
...
5-solve-pr
| Author | SHA1 | Date | |
|---|---|---|---|
| 42f85c1eb7 |
Binary file not shown.
@@ -86,6 +86,7 @@
|
|||||||
|
|
||||||
\section*{Problem 1}
|
\section*{Problem 1}
|
||||||
|
|
||||||
|
% Do the double integral
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
u(x) &= \int \int \frac{d^2 u}{dx^2} dx^2\\
|
u(x) &= \int \int \frac{d^2 u}{dx^2} dx^2\\
|
||||||
&= \int \int -100 e^{-10x} dx^2 \\
|
&= \int \int -100 e^{-10x} dx^2 \\
|
||||||
@@ -125,40 +126,7 @@ Using the values that we found for $c_1$ and $c_2$, we get
|
|||||||
|
|
||||||
\section*{Problem 3}
|
\section*{Problem 3}
|
||||||
|
|
||||||
To derive the discretized version of the Poisson equation, we first need
|
% Show how it's derived and where we found the derivation.
|
||||||
the taylor expansion for $u(x)$ around $x + h$ and $x - h$.
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
u(x+h) &= u(x) + u'(x) h + \frac{1}{2} u''(x) h^2 + \frac{1}{6} u'''(x) h^3 + \mathcal{O}(h^4)
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
u(x-h) &= u(x) - u'(x) h + \frac{1}{2} u''(x) h^2 - \frac{1}{6} u'''(x) h^3 + \mathcal{O}(h^4)
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
If we add the equations above, we get this new equation:
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
u(x+h) + u(x-h) &= 2 u(x) + u''(x) h^2 + \mathcal{O}(h^4) \\
|
|
||||||
u(x+h) - 2 u(x) + u(x-h) + \mathcal{O}(h^4) &= u''(x) h^2 \\
|
|
||||||
u''(x) &= \frac{u(x+h) - 2 u(x) + u(x-h)}{h^2} + \mathcal{O}(h^2) \\
|
|
||||||
u_i''(x) &= \frac{u_{i+1} - 2 u_i + u_{i-1}}{h^2} + \mathcal{O}(h^2) \\
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
We can then replace $\frac{d^2u}{dx^2}$ with the RHS (right-hand side) of the equation:
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
- \frac{d^2u}{dx^2} &= 100 e^{-10x} \\
|
|
||||||
\frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} + \mathcal{O}(h^2) &= 100 e^{-10x} \\
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
And lastly, we leave out $\mathcal{O}(h^2)$ and change $u_i$ to $v_i$ to
|
|
||||||
differentiate between the exact solution and the approximate solution,
|
|
||||||
and get the discretized version of the equation:
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
align* \frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} &= 100 e^{-10x} \\
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
\section*{Problem 4}
|
\section*{Problem 4}
|
||||||
|
|
||||||
@@ -168,8 +136,16 @@ align* \frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} &= 100 e^{-10x} \\
|
|||||||
|
|
||||||
\subsection*{a)}
|
\subsection*{a)}
|
||||||
|
|
||||||
|
% Phrase it better
|
||||||
|
$n = m - 2$, since $\textbf{A}$ is used to solve for all of the points in
|
||||||
|
between the end-points $0$ and $1$. For the complete solution, we need to add
|
||||||
|
$u(0)$ and $u(1)$.
|
||||||
|
|
||||||
\subsection*{b)}
|
\subsection*{b)}
|
||||||
|
|
||||||
|
When solving for $\vec{v}$, we find the approximate solutions for $u(x)$
|
||||||
|
that are in between the end-points, but not the end-points themselves.
|
||||||
|
|
||||||
\section*{Problem 6}
|
\section*{Problem 6}
|
||||||
|
|
||||||
\subsection*{a)}
|
\subsection*{a)}
|
||||||
@@ -180,9 +156,7 @@ align* \frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} &= 100 e^{-10x} \\
|
|||||||
|
|
||||||
% Figure it out
|
% Figure it out
|
||||||
|
|
||||||
\section*{Problem 7}
|
% Linelevant files on gh and possibly add some comments
|
||||||
|
|
||||||
% Link to relevant files on gh and possibly add some comments
|
|
||||||
|
|
||||||
\section*{Problem 8}
|
\section*{Problem 8}
|
||||||
|
|
||||||
@@ -190,7 +164,7 @@ align* \frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} &= 100 e^{-10x} \\
|
|||||||
|
|
||||||
\section*{Problem 9}
|
\section*{Problem 9}
|
||||||
|
|
||||||
% Show the algorithm, then calculate FLOPs, then link to relevant files
|
% Shon*{Proalgorithm, then calculate FLOPs, then link to relevant files
|
||||||
|
|
||||||
\section*{Problem 10}
|
\section*{Problem 10}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user