I need an expression for the real 7/3 power of a real-valued function, i.e., a reformulation of
f[x_] := g[x]^(7/3)
that works for negative values of g[x]. This function and its first and second derivatives are used in heavy computation (i.e. in objectives to FindMinimum) and need to be well-defined at all values of x. In particular, I've tried the following, which don't work:
f[x_] := g[x]^(7/3)
which gives complex values at negative values of g[x], and
f[x_] := Surd[g[x],3]^7
which gives a "Infinite expression" error when its derivative is evaluated at 0.
CubeRootandSurdfunctions. – Mark McClure Mar 6 at 17:02f[x_] := Piecewise[{{g[x]^(7/3), g[x] >= 0}}, -(-g[x])^(7/3)]work? – whuber Mar 6 at 17:52