Equation for a curve initially concave, then convex, and then concave again

22 Views Asked by At

First time poster! Sorry if I have missed a similar answer (I did search and didn't find a suitable answer.)

For an economic application where I am defining utility $u(w)$ over wealth, $w$, I want the curve to be concave up to some wealth $w_1$, then convex till wealth $w_2$, and then concave again till $\infty$. If it makes things easier it is fine to restrict the domain to just $0\le w\le 1$, so $w_1$ and $w_2$ would be fractions. (I can just change the units of wealth!)

Depiction of the desired curve.