piecewise linear approximation of $x^2$

1k Views Asked by At

Take the function $f(x) = x^2$. I read that it can be written as $$f(x) \approx k_1\cdotΔx_1 + k_2\cdotΔx_2 + \dots +k_n\cdot \Delta x_n,$$ where $k_n$ is the slope of the $n$-th piecewise linear block, and $\Delta x_n$ is the $n$-th linear block.

How is this derived? Can you explain it?

1

There are 1 best solutions below

2
On

The graph here explains exactly your problem here >>>

As you see it is piece wise linear and the slopes you have already captured intuitively. So the smaller the $\Delta$ linear pieces (and the more of them in terms of $n$) the better the approximtaion.


From the definition of slope

$$k_i=\frac{\Delta y_i}{\Delta x_i}$$

derive $n$ pieces of lines:

$$\Delta y_i=k_i\cdot \Delta x_i$$

and sum over $n$:

$$f(x)=y\approx\sum^n_{i=1}\Delta y_i=\Delta y_1 + \Delta y_2+\dots+\Delta y_n= k_1\cdotΔx_1 + k_2\cdotΔx_2 + \dots +k_n\cdot \Delta x_n$$

so: $$f(x) \approx k_1\cdotΔx_1 + k_2\cdotΔx_2 + \dots +k_n\cdot \Delta x_n$$