finding derivative at intermediate point of known data set

413 Views Asked by At

I have a function $y = f(x)$, $ x \in [0,1] $ and $ y \in [0,1]$

Set of values $(x_i,y_i)$ are known for n points. I need to find derivative at point $x_{\zeta}$ such that $y(x_{\zeta}) = 0.5$

Now $x_{\zeta}$ generally falls between two data points $x_i \le x_{\zeta} \le x_{i+1}$. How can $\frac{dy}{dx}|_{x_{\zeta}}$ can be best expressed in terms of $x_i , x_{i+1}$ ? One option is to take weighted average of derivatives at points $x_{i}$ and $x_{i+1}$

$({x_{i+1}-x_{i}})\frac{dy}{dx}|_{x_{\zeta}} = (x_{i+1}-x_{\zeta})\frac{dy}{dx}|_{x_{i}} +(x_{\zeta}-x_{i}) \frac{dy}{dx}|_{x_{i+1}}$

I want to know if there is better option for calculation taking two points only and as a another question how can I take values of all known points take into account for calculation of derivative?

The function $y$ is non-periodic. If it was periodic Fast Fourier Transform might have been useful.

1

There are 1 best solutions below

1
On
  1. Choose an interpolation method and use it to reconstruct the function $f$ based on the known data points. Use Google to see commonly used interpolation methods and how to use them. You can also make up your own method. Choose the interpolation method that you think constructs an $f$ that approximates the real $f$ the best.
  2. Solve $f(x_\zeta) = 0.5$. ($x_\zeta$ was not given, right?)
  3. Calculate $f'(x_\zeta)$.

I want to know if there is better option for calculation taking two points only and as a another question how can I take values of all known points take into account for calculation of derivative?

Some interpolation methods take all the points into account. Note that without defining the word "better", no one here can tell you what the best solution to your problem is. Maybe your current method is already the best.