Where does the linear system of equations come from in the Method of Undetermined Coefficients

37 Views Asked by At

I am studying for my Numerical Methods exam and I am having trouble with the Method of Undetermined Coefficients, specifically when it comes to obtaining the linear system of equations to solve for A, B, C.

First, I am given that $f''(x) = Af(x + h) + Bf(x) + Cf(x - h)$
(5.12)

Then I find the Taylor Expansion such that:

$$ f(x\pm h) = f(x) \pm hf'(x) \pm \frac{h^2}{2}f''(x) \pm \frac{h^3}{6}f'''(x) \pm \frac{h^4}{24}f^{(4)}(\xi\pm) $$(5.13)

Then using the expansion of 5.13 in 5.12:

$$ f(x) = Af(x + h) + Bf(x) + Cf(x-h) = (A + B + C)f(x) + h(A-C)f'(x) + \frac{h^2}{2}(A+C)f''(x) + \frac{h^3}{6}(A-C)f^{(3)}(x) + \frac{h^4}{24}[Af^{(4)}(\xi_+) + Cf^{(4)}\xi_-)] $$(5.14)

Equating the coefficients of f(x), f'(x), f''(x) on both sides of 5.14 we obtain the linear system:

$ A + B + C = 0 $
$ A - C = 0$
$ A + C = \frac{2}{h^2}$

I do not understand where we are getting the values on the right side of the linear system. I understand that we are supposed to equate f(x), f'(x), and f''(x) but this is how I understand it:

$f(x): A + B + C = B$
$f'(x): A - C = 0$
$f''(x): A + C = 0$

which is clearly not what the textbook gives

1

There are 1 best solutions below

4
On BEST ANSWER

I think you used too many terms.

Couple different ways to get the same results.

$Af(x+h) = Af(x) + Ah f'(x) + A(h^2/2)f''(x)$

$Bf(x) = B f(x)$

$Cf(x-h)= Cf(x)-Chf'(x)+C(h^2/2)f''(x)$


$Af(x+h)+Bf(x)+Cf(x-h)=(A+B+C)f(x)+h(A-C)f'(x) +(A+C)(h^2/2)f''(x)$


Requires:

$(A+C)(h^2/2)=1$

$h(A-C)=0$

$(A+B+C)=0$

$A=C$

$Ah^2=1\implies C=A=1/h^2$

$B=-2A\implies B = -2/h^2$

$f''(x)=(1/h^2) f(x+h)-(2/h^2)f(x)+(1/h^2)f(x-h)$


Compare to an iterative method giving similar results via a restricted form of the binomial theorem.

$f'(x)=\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$

$f''(x)=\lim_{h\to 0} \frac{f'(x+h)-f'(x)}{h}$

$f''(x)= \lim_{h \to 0} \frac{\frac{f(x+2h)-f(x+h)}{h}-\frac{f(x+h)-f(x)}{h}}{h}$

$f''(x) = \lim_{h \to 0} \frac{f(x+2h)-2f(x+h)+f(x)}{h^2}$

$x\to x-h$

$f''(x)=\lim_{h \to 0} \frac{f(x+h)-2f(x)+f(x-h)}{h^2}$