# determining x and y offset of a curve segment

Good afternoon.

I have a curve with the formula: $$f(x)=x^{2.2}$$

I have curve segments which are offset from the above formula that have the general formula ($$a$$ represents horizontal displacement while $$b$$ represents vertical displacement): $$f(x)=(x+a)^{2.2} +b$$

I have the start point ($$x_1$$,$$y_1$$) and the end point ($$x_2$$,$$y_2$$) of the curve segments so I can attempt to solve via substitution but because I am dealing with a rational exponent, the results are ugly and I must utilize a root finding algorithm such as Brent-Dekker: $$b= y_1 - (x_1 + a)^{2.2}$$ $$0=(x_2 + a)^{2.2} + y_1 - (x_1 + a)^{2.2} - y_2$$

In an effort to avoid root finding algorithms, I tried the following approach which involved using the first derivative to obtain the horizontal offset (which was wildly unsuccessful): $$f'(x)= 2.2 * (x^{1.2})$$ $$x_m = \frac{y_2-y_1}{2.2*(x_2-x_1)}^{\frac{1}{1.2}}$$ $$x_n = \frac{x_2^{2.2}-x_1^{2.2}}{2.2*(x_2-x_1)}^{\frac{1}{1.2}}$$ $$a = x_n - x_m$$

Is there a way to do this? I have thousands of curve segments to calculate so an alternative to a computationally expensive root finding algorithm would be much appreciated.

Thank you!