Derivative of a real-value function

62 Views Asked by At

Suppose we have a function $f(\theta)$ and it is $\mathbb{R} \rightarrow \mathbb{C}$. Consider the square of the absolute value of $f(\theta)$, $$g(\theta) = |f(\theta) |^2$$ Obviously, the function $g(\theta)$ is $\mathbb{R} \rightarrow \mathbb{R}$. What is the first order derivative of $g(\theta) $ over $\theta$? I do not know whether we can express the result by using $f(\theta)$.

By using chain rule, I think the result can be $2 f(\theta) \frac{\partial f(\theta)}{\partial \theta}$. However, I check with $f(\theta) = \exp(j\theta) +1$, it is wrong. Is there anything special about the chain rule for complexity function?

1

There are 1 best solutions below

3
On BEST ANSWER

We can write

$$|f(\theta)|^2=f(\theta)\overline{f(\theta)}$$

where $\overline{f(\theta)}$ is the complex conjugate of $f(\theta)$

Then, we have

$$\begin{align} \frac{d|f(\theta)|^2}{d\theta}&=\frac{d}{d\theta}\left(f(\theta)\overline{f(\theta)}\right)\\\\ &=f(\theta)\frac{d\overline{f(\theta)}}{d\theta}+\overline{f(\theta)}\frac{df(\theta)}{d\theta}\\\\ &=2\text{Re}\left(\overline{f(\theta)}\frac{df(\theta)}{d\theta}\right)=2\text{Re}\left(f(\theta)\frac{d\overline{f(\theta)}}{d\theta}\right) \end{align}$$


Alternatively, Let $f(\theta)=u(\theta)+iv(\theta)$, where $u(\theta)=\text{Re}(f(\theta))$ and $v(\theta)=\text{Im}(f(\theta))$.

Then, $|f|^2=u^2+v^2$ and we have

$$\begin{align} \frac{d|f(\theta)|^2}{d\theta}&=2\left(u(\theta)\frac{du(\theta)}{d\theta}+v(\theta)\frac{dv(\theta)}{d\theta}\right)\\\\ &=2\text{Re}\left(\overline{f(\theta)}\frac{df(\theta)}{d\theta}\right)=2\text{Re}\left(f(\theta)\frac{d\overline{f(\theta)}}{d\theta}\right) \end{align}$$