For an integrand with a 1/r vertex singularity, the Duffy transformation from a triangle (pyramid) to a square (cube) provides an accurate and efficient technique to evaluate the integral. In this paper, we generalize the Duffy transformation to power singularities of the form p(x)/r
α
, where p is a trivariate polynomial and α > 0 is the strength of the singularity. We use the map (u, v, w) → (x, y, z) : x = u
β
, y = x
v, z = x
w, and judiciously choose β to accurately estimate the integral. For α = 1, the Duffy transformation (β = 1) is optimal, whereas if α ≠ 1, we show that there are other values of β that prove to be substantially better. Numerical tests in two and three dimensions are presented that reveal the improved accuracy of the new transformation. Higher-order partition of unity finite element solutions for the Laplace equation with a derivative singularity at a re-entrant corner are presented to demonstrate the benefits of using the generalized Duffy transformation.