Given a function $ y=f(x)$. I know that the function is continuous, now for a given $y^{'}_0$, I have to find $x$ such that $\dfrac{\mathrm df(x)}{\mathrm dx} = \dfrac{dy}{dx}=y_0^{'}$ at that $x$.
To solve this problem numerically i tried
$g(x) = \frac {f(x+h) - f(x-h)}{2h} - y_0^{'} = 0$
so $f(x+h) - f(x-h) = 2h \cdot y_0^{'} $
but this is not and an efficient method since it depends a lot on choice of $h$ and I have to solve it multiple times..
Is there a better way?