# Math Help - Function approximation of piecewise function

1. ## Function approximation of piecewise function

Hi,

I'm trying to smooth a piecewise function in order to make the gradient continuous for an optimisation problem. I want to restore the main gradients in each of the piecewise components.

The piecewise function is
1. S = Y - N where Y-N > beta * Y
2. S = beta * Y otherwise

Can anyone point me in the right direction?

Cheers,

T.

2. Originally Posted by tristank83
Hi,

I'm trying to smooth a piecewise function in order to make the gradient continuous for an optimisation problem. I want to restore the main gradients in each of the piecewise components.

The piecewise function is
1. S = Y - N where Y-N > beta * Y
2. S = beta * Y otherwise

Can anyone point me in the right direction?

Cheers,

T.
This looks unwise, but if you must do this I think more information is needed, like where does this function come from, what does it represent and exactly how are you going to use the smoothed version.

CB