I'am trying to solve the following problem in python: I have a x and y dataset. From those points, I can easily find the Lagrange poly that fits my dataset. Then I would like to find another polynomial function that has a constant orthogonal distance (d) from my function f(x).
Is there a library that could calculate it for me?
I was thinking about calculating the derivatives at each point x and calculating how much should I add to each y in order to obtain the desired new function, but I am having troubles with it.
Any ideas on how to solve it using Python?