Derivative of real valued function w.r.t real valued variable

268 Views Asked by At

Lets say we have a function $ h: \mathbb R \rightarrow \mathbb R $ that can be composed of two other functions $ f: \mathbb R \rightarrow \mathbb C $ and $ g: \mathbb C \rightarrow \mathbb R $ in the following way $ h(x) = g(f(x)) $.

I want to compute the derivative: $ \frac{dh}{dx} $ but I only have the intermediate results: $ \frac{dh}{df} $ and $ \frac{df}{dx} $ which are both complex valued. How should I combine them to obtain the correct real valued $ \frac{dh}{dx} $ ?

I am familiar with the chain rule for differentation so I tried: $ \frac{dh}{dx} = \frac{dh}{df} \frac{df}{dx} $. This is however still a complex number. And taking the real part seems not correct.

Note: A situation where this occurs is when you transform a real valued variable to the frequency domain via the fourier transform, then do some operation on it and transform it back to the spatial domain. If you want the derivative of the final result w.r.t. the input variable and want to compose it of derivatives of the intermediate results.

1

There are 1 best solutions below

6
On BEST ANSWER

Think about this, instead of dealing with $f$ as a complex number, treat it as a function $f:\mathbb{R}\rightarrow\mathbb{R}^2$. In this case, the chain rule would tell you that

$$ \frac{dh}{dx}=\frac{\partial g}{\partial f_1}\cdot\frac{df_1}{dx}+\frac{\partial g}{\partial f_2}\cdot\frac{df_2}{dx}. $$

In your case, you should be able to do this via: $$ \frac{dh}{dx}=\frac{\partial g}{\partial f}\cdot\frac{df}{dx}+\frac{\partial g}{\partial \overline{f}}\cdot\frac{d\overline{f}}{dx}. $$

In other words, you must differentiate $g(z)$ with respect to both $z$ and $\overline{z}$.