with a fixed data point?

Dear all,

I am searching for a way to fit polynomials to experimental data of heat capacity and temperature.
Easily done for a TF1 or a TGraph (files attached).
The polynomial coefficients are meant for use in some other software.

The tricky point: One predefined value has to be matched exactly.
I have to use several complementary polynomials for different temperature regions. For the software to be stable, I have to define some points where the polynomials intersect, having identical values.
The intersection points have to be at specific temperatures.

:arrow_right: What is the best way to set one pair of values which the polynomial does match perfectly?

Thanks for any answer in advance!
rooTalk_polynomial.root (650 Bytes)
rooTalk_own_function.root (551 Bytes)

I would parametrise the polynomial in such a way that the data point is matched exactly by construction. Assuming the coordinate of the point are (x0, y0), you could try experimenting with something like this:

f(x) = y0 + a1*(x-x0) + a2*(x-x0)^2 + ... where a1, a2, … are fit parameters.