TITLE: Finite Approximation
QUESTION [1 upvotes]: For this problem I found online
(1) Where does equation 1 come from? I don't understand why there's only $x_1$, $x_2$ and $x_3$ in the matrix? And why are their positions in the middle of the matrix?
(2) How is equation 1 converted to equation 2?

REPLY [1 votes]: Note: this answer is incomplete. Hopefully it clears up some things for the OP nevertheless. It should not be accepted in its current state.

First note that there appears to be a typo on the page -- $F$ should equal $[f_0, f_1, f_2, f_3, f_4]$, i.e. $F$ should only have five components, not six. Otherwise the multiplication in the equation you mention would not make sense (it's possible to multiply a $3 \times 5$ matrix with a $5 \times 1$ matrix, but it is not possible to multiply a $3 \times 5$ matrix with a $6 \times 1$ matrix). Plus $f_5$ was never mentioned as one of the approximations which are being looked for.

In other words, the first thing to understand about equation 1 is that there is a typo in its definition.

Equation 2 follows from Equation 1 by (a) multiplying equation 1 by $1/4$, and then (b) adding it to $1/4$ times the equation above Equation 1, which describes $F''$.

I.e., we add $1/4 \cdot F''$ ($1/4$ times the approximation to $f''$) to $1/4$ times the equation describing the approximation to  $xf(x)$, to get $1/4$ times the approximation to $f'' + xf(x)$.
Note that $(\Delta x)^{-2} = 4$, which is why everything is being multiplied by $1/4$, to simplify the expression somewhat. And since $(1/4) \cdot 0 = 0$, it doesn't affect the end result.

Also, there may be another typo on the page -- at the top of the page, it is written $N = 4$ (upper-case $N$), but later on the page it is written $n = 4$ (lower-case $n$) -- I suspect they are meant to denote the same quantity, even though they are represented by different symbols.
The reason why (I think) the matrices which are being multiplied with $F$ from the left are $3 \times 5$ is because of the description of the problem, where we are only supposed to find the values of the approximations at interior points. The boundary points are $x_0$ and $x_4$, so the interior points are $x_1, x_2, x_3$ -- note that there are only three interior points, and that multiplying the matrices in question on the left of $F$ leads to a $3 \times 1$ vector. Also the only points which occur in the left matrix of equation 1 are $x_1, x_2, x_3$, which are the interior points, which again corresponds to/matches the problem description.
{"set_name": "stack_exchange", "score": 1, "question_id": 2311716}