(Spline) curve fitting $(x,y)$ points when $dy/dx$ is also known for each point I have an $(x,y)$ dataset consisting of points on an unknown curve and I've been using spline fits to generate a curve joining these points as a guide-to-the-eye (and nothing more). However, I also know $dy/dx$ at each of my points, and so I know that the spline fit is not ideal: e.g. I know that there's a maxima at one point and a minima at another, and the spline fit is misleading at these points.
What kind of curve fitting should I use if I want to also incorporate this extra information? I have access to Matlab, Mathematica, R and anything open source. Suggestions for even just a place to start reading would be much appreciated. Thank you.
Edit: the only thing that I have thought of is to manually make additional points either side of my "real" points at $x+dx$ and $x-dx$, and then use this new set of points to generate the spline, but this seems a little dubious to me.
 A: (Hoermann and Leydold 2003) provide one application of such a problem with a discussion of an algorithm. In this case we have points on a CDF and a PDF, and we want to write the CDF as an interpolating spline and use the fact that the PDF gives the first derivatives of the CDF. Moreover, it also includes the constraint that a CDF is never decreasing. In this case the purpose is to invert the CDF to get an approximation of the quartile function. This is pretty specific, but it may give you enough inspiration to solve your problem.
Hoermann, Wolfgang and Leydold, Josef. (2003). Continuous random variate generation by fast numerical inversion.  ACM Transactions on Modeling and Computer Simulation, 13(4): 347--362.
A: See the R package cobs here. Specifically, the pointwise argument to the main function cobs() allows you to set constraints on points the spline should pass through as well as derivatives. In this case
cobs(x, y, pointwise=rbind(c(2, x_1, <derivative at x_1>), <etc>))

should be what you want.
A: Here are two papers that deal with this exact problem. They use support vector regression instead of splines:


*

*Lázaro et al. "Support vector regression for the simultaneous learning of a multivariate function and its derivatives." Neurocomputing 69.1 (2005): 42-61.
http://gtas.unican.es/pub/68

*Jayadeva et al., "Regularized Least Squares Twin SVR for the Simultaneous Learning of a Function and its Derivative," 2006 International Joint Conference on Neural Networks (IJCNN), pp.1192,1197
http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1716237&isnumber=36115
Nevertheless, it seems unlikely that there is a popular implementation of any of such methods, as it's a quite specific problem.
