Approximated second derivative of $y(0)''$ function $y(x)$ at x = 0 difference quotient, using the values of $y(x)$ at the sites of the three-point template $ {x}_{1} = \frac {-4h} { 5}, {x} _ {2} = 0, {x} _ {3} = \frac {h} {5} $.
Calculate the difference quotient value (approximate value of $y '' (0)$) for $ y (x) = {x} ^ {3} $ when $h = 0.05$. The result is rounded to hundredths.
Decision:
$y''= \frac{{y} _ {i +1} -2 {y} _ {i} + {y} _ {i-1}} {{h} ^ { 2}}$
$y _ {i + 1} = {\frac {-4 (0.05)} {5}} ^ {3}$
$y _ {i} = 0$
$y _ {i-1} = {\frac {(0.05)} {5}} ^ {3}$
=> $y'' = - 0.03$
The obvious answer is $-0.03$.
But the authors insist that the answer is $-0.06$.
Please help me understand where they got the multiplication by $2$ ? I can not understand. Thanks in advance.
Your approximation formula is correct. However, I don't get x1 and x3. They should be equal to -h and h respectively.
BTW, if $x_1=−\frac{4h}{5}$ and $x_3=\frac{h}{5}$ then $y_{i - 1} = (−\frac{4h}{5})^3$ and $y_{i + 1} = (\frac{h}{5})^3$.
If you want to use these values, you should use this formula: $\frac{y_{i + 1} - 2y_{i} + y_{i - 1}}{\frac{17}{50}h^2}$
Note that there are infinitely many formulae to approximate any derivative. Their difference is the speed at which they approach the exact answer. The simplest way to check whether an approximation is correct or not is through Hopital's rule.