Prologue: It's easy to blend one real function $f(x)$ into another, say $g(x)$, by considering a convex combination with a transition function $\eta(x)$, $$ h(x) = (1-\eta(x)) f(x) + \eta(x) g(x) $$ where $\eta$ is a non-decreasing function over the interval $[a,b]$ with $\eta(x)=0$ for $x\leq a $ and $\eta(x)=1$ for $x\geq b $, see this answer for a cool example. In this way, $h=f$ for $x<a$ and $h=g$ for $x>b$. This strategy is nothing but the use of a weighted arithmetic mean of two values (the two values being $f(x)$ and $g(x)$), with a weight that depends on $x$.
Similarly, we may use the "multiplicative" version of this blending strategy (everything is positive): $$ h(x) = f(x)^{(1-\eta(x))} g(x)^{\eta(x)} $$ or, more generally, we may consider any sort of generalised mean or quasi-mean.
Question: let's assume strictly positive and smooth $g$ and $f$ and consider $$ h(x) = M(g(x),f(x),\lambda(x)) $$ where $M$ is any kind of mean of two real numbers with weight $\lambda(x)$. The weight function $\lambda$ is such that on one side of the interval, we get $h=f$, and $h=g$ on the other. Is it possible to find $M$ and $\lambda$ such that the same averaging prescription is also valid for the first derivatives? Namely, $$ h'(x) = M(g'(x),f'(x),\lambda(x)) $$