# Fit with composed function gives steps

Hello,

I have been trying to fit a spectrum with the following composed function:

(x<=[7])x[0]*pow(exp(-[1]*x-abs([2])xx)+x/[3],-[4])+(x>=[7])x[5]*1/pow(x,[6])

The fit itself does not look bad but in the switch point between one function and the other I have a kink/step. Fixing or constraining param [7] only reduce or moves around the step, does not get rid of it.
I have also tried first fitting only with the power law part and then using the parameters obtained as input in the full blast fit, but that also does not solve the problem.

I would happy to know if you have suggestions!
Thanks in advance.

First, you should have:
(x<=[7])(something) + (x>[7])(something else)
or:
(x<[7])(something) + (x>=[7])(something else)

Then, it seems to me that you should reduce the number of parameters by one, solving the equation (this will guarantee that there is no “step”):
x*[0]pow(exp(-[1]x-abs([2])xx)+x/[3],-[4]) = x[5]1/pow(x,[6])
and then the “x” that you get is automatically your current parameter “[7]”.
Alternatively, you could easily get rid of parameter “[0]” or “[5]” by solving (also this will guarantee that there is no “step”):
[7]
[0]pow(exp(-[1][7]-abs([2])
[7][7])+[7]/[3],-[4]) = [7][5]*1/pow([7],[6])