MHB Approximating Equations for Unknowns: How to Justify the Form of $U_0$?

  • Thread starter Thread starter evinda
  • Start date Start date
AI Thread Summary
The discussion centers on justifying the form of the equation for the unknown $U_0$ in a finite difference method for a boundary value problem. The initial approach using the first derivative approximation led to an incorrect equation, prompting a reevaluation that includes a second-order correction from Taylor expansion. The matrix of coefficients $A$ is analyzed for invertibility, with the conclusion that it cannot be guaranteed for all functions $q$ and step sizes $h$. However, under certain conditions, particularly with small $h$, the matrix approaches a form that is likely invertible. The error in the approximation is noted to be of order $O(h^3), suggesting that it can be considered negligible in the limit as $h$ approaches zero.
evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

Given the problem $$-u''(x)+q(x)u(x)=f(x), 0 \leq x \leq 1, \\ u'(0)=u(0), \ \ u(1)=0$$ where $f,g$ are continuous functions on $[0,1]$ with $q(x) \geq q_0>0, x \in [0,1]$. Let $U_j$ be the approximations of $u(x_j)$ at the points $x_j=jh, j=0, 1, \dots , N+1$, where $(N+1)h=1$, that gives the finite difference method $$-\frac{1}{h^2}\left (U_{j-1}-2U_j+U_{j+1}\right )+q(x_j)U_j=f(x_j), \ \ 1 \leq j \leq N \\ \frac{1}{h}(U_1-U_0)-U_0=\frac{1}{2}h\left (q(x_0)U_0-f(x_0)\right )$$ where $U_{N+1}=0$.

I have to justify the form of the equation for the unknown $U_0$. We have that the approximation of the first derivative $u'(x_j)$ is $$u'(x_j) \approx \frac{u(x_{i+1})-u(x_{i-1})}{2h}$$

so from $u'(0)=u(0)$ we have $$\frac{U_1-U_0}{h}=U_0 \Rightarrow \frac{1}{h}(U_1-U_0)-U_0=0$$ but this is not the desired result.

What have I done wrong? How do we get $\frac{1}{h}(U_1-U_0)-U_0=\frac{1}{2}h\left (q(x_0)U_0-f(x_0)\right )$ ? (Thinking)
 
Last edited:
Mathematics news on Phys.org
Hey evinda! (Smile)

I believe we're including the second order correction:
$$u(h) = u(0) + hu'(0) +\frac 12 h^2 u''(0)$$
Thus
$$u(h) =u(0) + hu(0) +\frac 12 h^2\Big(q(0)u(0)-f(0)\Big) \\
\Rightarrow U_1 = U_0 + hU_0 +\frac 12h^2\Big(q(0)U_0-f(0)\Big)
$$
(Thinking)
 
I like Serena said:
Hey evinda! (Smile)

I believe we're including the second order correction:
$$u(h) = u(0) + hu'(0) +\frac 12 h^2 u''(0)$$
Thus
$$u(h) =u(0) + hu(0) +\frac 12 h^2\Big(q(0)u(0)-f(0)\Big) \\
\Rightarrow U_1 = U_0 + hU_0 +\frac 12h^2\Big(q(0)U_0-f(0)\Big)
$$
(Thinking)

I see... So do we suppose that at the Taylor expansion there is no error? (Thinking)

- - - Updated - - -

Also how could we show that the matrix of coefficients

$A=\begin{bmatrix}
-\frac{1}{h^2}+\frac{1}{h}+\frac{q(x_0)}{2} & -\frac{1}{h^2} & 0 & 0 & \cdots& 0\\
-\frac{1}{h^2} & \frac{2}{h^2}+q(x_1) & -\frac{1}{h^2} & 0 & \cdots & 0 \\
0 & -\frac{1}{h^2}& \frac{2}{h^2}+q(x_2) & -\frac{1}{h^2} & & 0\\
& & & & \ddots & 0 \\
& & & & & -\frac{1}{h^2}\\
& & & & -\frac{1}{h^2} & \frac{2}{h^2}+q(x_N)
\end{bmatrix}$

is invertible? (Thinking)
 
evinda said:
I see... So do we suppose that at the Taylor expansion there is no error? (Thinking)

There will still be an error, just an order of magnitude less.
Not bad eh? (Mmm)
Also how could we show that the matrix of coefficients

$A=\begin{bmatrix}
-\frac{1}{h^2}+\frac{1}{h}+\frac{q(x_0)}{2} & -\frac{1}{h^2} & 0 & 0 & \cdots& 0\\
-\frac{1}{h^2} & \frac{2}{h^2}+q(x_1) & -\frac{1}{h^2} & 0 & \cdots & 0 \\
0 & -\frac{1}{h^2}& \frac{2}{h^2}+q(x_2) & -\frac{1}{h^2} & & 0\\
& & & & \ddots & 0 \\
& & & & & -\frac{1}{h^2}\\
& & & & -\frac{1}{h^2} & \frac{2}{h^2}+q(x_N)
\end{bmatrix}$

is invertible? (Thinking)

We won't be able to guarantee that it's invertible for any $h$ and any function $q$.
I think that for any $h$ there will be a function $q$ such that the matrix is not invertible.

However, we can write $A$ as:
$$A=\frac 1{h^2}\begin{bmatrix}
-1+h+h^2\frac{q(x_0)}{2} & -1 & 0 & 0 & \cdots& 0\\
-1 & 2+h^2q(x_1) & -1 & 0 & \cdots & 0 \\
0 & -1& 2+h^2q(x_2) & -1 & & 0\\
& & & & \ddots & 0 \\
& & & & & -1\\
& & & & -1 & 2+h^2q(x_N)
\end{bmatrix}$$
And if $h$ is small enough, it approaches:
$$A \approx \frac 1{h^2}\begin{bmatrix}
-1 & -1 & 0 & 0 & \cdots& 0\\
-1 & 2 & -1 & 0 & \cdots & 0 \\
0 & -1& 2 & -1 & & 0\\
& & & & \ddots & 0 \\
& & & & & -1\\
& & & & -1 & 2
\end{bmatrix} $$
Would that be invertible? (Wondering)
 
I like Serena said:
There will still be an error, just an order of magnitude less.
Not bad eh? (Mmm)

We won't be able to guarantee that it's invertible for any $h$ and any function $q$.
I think that for any $h$ there will be a function $q$ such that the matrix is not invertible.

However, we can write $A$ as:
$$A=\frac 1{h^2}\begin{bmatrix}
-1+h+h^2\frac{q(x_0)}{2} & -1 & 0 & 0 & \cdots& 0\\
-1 & 2+h^2q(x_1) & -1 & 0 & \cdots & 0 \\
0 & -1& 2+h^2q(x_2) & -1 & & 0\\
& & & & \ddots & 0 \\
& & & & & -1\\
& & & & -1 & 2+h^2q(x_N)
\end{bmatrix}$$
And if $h$ is small enough, it approaches:
$$A \approx \frac 1{h^2}\begin{bmatrix}
-1 & -1 & 0 & 0 & \cdots& 0\\
-1 & 2 & -1 & 0 & \cdots & 0 \\
0 & -1& 2 & -1 & & 0\\
& & & & \ddots & 0 \\
& & & & & -1\\
& & & & -1 & 2
\end{bmatrix} $$
Would that be invertible? (Wondering)

From the wiki on tridiagonal matrices, it would appear so, since this particular matrix has all the off-diagonal elements equal (it's also Toeplitz, but that's more general). However, these results have only been obtained around 1996 or 1997 - fairly recently. Not sure they've made their way into a lot of textbooks yet.
 
I like Serena said:
There will still be an error, just an order of magnitude less.
Not bad eh? (Mmm)

We would have an error of order $O(h^3)$. Can we ignore it since it converges to $0$?
If so, how could we justify it formally? (Thinking)
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top