Edit problem 1 and add problem 3

This commit is contained in:
Cory Balaton 2023-09-08 12:08:02 +02:00
parent 996b99fca3
commit 400e8a29df
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B
3 changed files with 15 additions and 6 deletions

Binary file not shown.

View File

@ -1,8 +1,17 @@
\section*{Problem 1} \section*{Problem 1}
First, we rearrange the equation.
\begin{align*}
- \frac{d^2u}{dx^2} &= 100 e^{-10x} \\
\frac{d^2u}{dx^2} &= -100 e^{-10x} \\
\end{align*}
Now we find $u(x)$.
% Do the double integral % 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 \\
&= \int \frac{-100 e^{-10x}}{-10} + c_1 dx \\ &= \int \frac{-100 e^{-10x}}{-10} + c_1 dx \\
&= \int 10 e^{-10x} + c_1 dx \\ &= \int 10 e^{-10x} + c_1 dx \\
@ -10,7 +19,7 @@
&= -e^{-10x} + c_1 x + c_2 &= -e^{-10x} + c_1 x + c_2
\end{align*} \end{align*}
Using the boundary conditions, we can find $c_1$ and $c_2$ as shown below: Using the boundary conditions, we can find $c_1$ and $c_2$
\begin{align*} \begin{align*}
u(0) &= 0 \\ u(0) &= 0 \\

View File

@ -2,7 +2,7 @@
\section*{Problem 3} \section*{Problem 3}
To derive the discretized version of the Poisson equation, we first need To derive the discretized version of the Poisson equation, we first need
the taylor expansion for $u(x)$ around $x + h$ and $x - h$. the Taylor expansion for $u(x)$ around $x$ for $x + h$ and $x - h$.
\begin{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) 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)
@ -24,8 +24,8 @@ If we add the equations above, we get this new equation:
We can then replace $\frac{d^2u}{dx^2}$ with the RHS (right-hand side) of the equation: We can then replace $\frac{d^2u}{dx^2}$ with the RHS (right-hand side) of the equation:
\begin{align*} \begin{align*}
- \frac{d^2u}{dx^2} &= 100 e^{-10x} \\ - \frac{d^2u}{dx^2} &= f(x) \\
\frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} + \mathcal{O}(h^2) &= 100 e^{-10x} \\ \frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} + \mathcal{O}(h^2) &= f_i \\
\end{align*} \end{align*}
And lastly, we leave out $\mathcal{O}(h^2)$ and change $u_i$ to $v_i$ to And lastly, we leave out $\mathcal{O}(h^2)$ and change $u_i$ to $v_i$ to
@ -33,5 +33,5 @@ differentiate between the exact solution and the approximate solution,
and get the discretized version of the equation: and get the discretized version of the equation:
\begin{align*} \begin{align*}
align* \frac{ - u_{i+1} + 2 u_i - u_{i-1}}{h^2} &= 100 e^{-10x} \\ \frac{ - v_{i+1} + 2 v_i - v_{i-1}}{h^2} &= 100 e^{-10x_i} \\
\end{align*} \end{align*}