I was trying to smoothen the step function (zero when $x$ is less than $2/3$ and equal to $1$ when $x$ is greater then $5/6$) as in the picture below. Trying to fit $f$ in between $2/3$ and $5/6$ using smoothstep $f(x)=3x^2- 2x^3$. Also used the stretching/contraction of $x$ axis and translation of $x$ axis but could not actually fit it.
[Math] Smoothing of a step function using smoothstep. (Curve fitting)
approximation-theorycalculuscurvesgraphing-functions
Best Answer
The following function as in your link, $$ \texttt{SmoothStep}:[0,1]\to \mathbb R, \\ \texttt{SmoothStep}(x) = 3x^2 - 2x^3$$ interpolates between 0 and 1 while having zero derivative at the endpoints $0,1$. You want to $(A)$ squish this to an interval of length $\frac56 - \frac23 = \frac16$ and $(B)$ make the function start at $2/3$ instead of 0. Lets do these one at a time.
Plots to verify this is correct: