A workaround is a Newton algorithm, if the spline is used with a Modulo 1 parameter, modelling a periodic spline function. The function to be minimized is then spline[t_] := Abs[spline[t][[1]] - x0];
getPointNewton[x0_, splinein_, tstart_] :=
Module[{d, t, dert, dt, spline},
spline[t_] := Abs[spline[t][[1]] - x0];
t = tstart;
dt = 0.001;
d = 1;
While[d > 0.00000005,
dert = (spline[t + dt] - spline[t - dt])/(2 dt);
t = Mod[t - spline[t]/dert, 1];
d = Abs[splinein[t][[1]] - x0];
];
t
]
Edit: Works fine for this dataset, gives 0.171472 after 345 iterations, but has problems converging in more extreme data (higher derivatives/values) and close to boundaries.
The standard minimization routines in Mathematica seem to take a lot of time for convergence.
A better algorithm, which converges on the wished parameter from the left only is this one:
getPointLeft[x0_, spline_, tstart_] :=
Module[{i, t, basestep, points}, i = 0;
t = tstart;
basestep = 1;
points = {0};
While[Abs[spline[t][[1]] - x0] > 0.000005,
If[spline[t + (1/2)^i basestep][[1]] > x0, i++,
t = t + (1/2)^i basestep;
AppendTo[points, N[t]]]];
points]
data = {{9.93114`, 379022.8`}, {11.71875`, 321705.7`}, {13.46983`,
280830.8`}, {15.625`, 243949.8`}, {18.60119`, 206915}, {21.70139`,
179663.2`}, {24.93351`, 158942.4`}, {29.29688`,
138396.2`}, {33.48214`, 123873.8`}};
spline = BSplineFunction[data, SplineDegree -> 3];
points = getPointLeft[13.46, spline, 0]
Show[Plot[Abs[spline[t][[1]] - 13.46], {t, 0, 0.2}],
Graphics[{PointSize[Large], Red,
Point[Transpose[{points,
Abs[spline[#][[1]] - 13.46] & /@ points}]]}]]
![Convergence to t[x0]](https://i.stack.imgur.com/T6ou4.png)
It halfs the stepsize as long as the next step would overshoot. This works well to find the next local minimum, which is fine for a case in which the dependent variable looked for is a monotonous function of the parameter t. Result:0.171472 after 33 iterations.