Let a square matrix $A=WDV^*$ by the SVD where $D$ is diagonal with positive entries, $U=V^*W$ is unitary, and $0<\lambda<1$. let
$$ f_{(\lambda)} = \lVert D^{1-\lambda} U^* D^{2\lambda}\ UD^{1-\lambda} \rVert_F^2 = \operatorname{tr}\Big(D^{2-2\lambda} U^* D^{2\lambda}\ U \ D^{2-2\lambda} U^* D^{2\lambda}\ U\Big) $$
Please help with the differential $\frac{\partial}{\partial\lambda} f_{(\lambda)}$. I'm thinking in the Frobenius product direction, but I'm not able to get it done.
Thanks in advance.
Post-edit:
Thanks to @greg for pointing my attention to $\operatorname{tr}(M^*M)\ne\operatorname{tr}(M^2)$ since $M=D^{2-2\lambda} U^* D^{2\lambda}\ U$ is not normal. Again, the Frobenius norm is a real-valued function. Therefore, to ensure real-valued trace, will the following be correct? (I implemented some test cases in MATLAB to check the equality). $$ \begin{align} f_{(\lambda)} & \ne \operatorname{tr}\Big((D^{2-2\lambda} U^* D^{2\lambda}\ U)^2\Big) \\ &=\operatorname{tr}\Big((D^{2-2\lambda} U^* D^{2\lambda}\ U)\ (D^{2-2\lambda} U^* D^{2\lambda}\ U)^*\Big) \\ &=\operatorname{tr}\big(D^{4-4\lambda} U^* D^{4\lambda}\ U\big) \end{align} $$
If it's the right way to state it, please help with the differential $\frac{\partial}{\partial\lambda} f_{(\lambda)}$ with respect to this $f_{(\lambda)}$ version.
For typing convenience, define the diagonal (and symmetric) matrix $$B=D^4 \quad\implies\; \log(B) = 4\,\log(D)$$ Since the matrix is diagonal, the differential is analogous to the scalar case. $$dB^\alpha = B^\alpha\log(B)\;d\alpha$$ Write the function in terms of this new variable. Then find its differential and gradient. $$\eqalign{ f &= {\rm Tr}\big(UB^{-\lambda}BU^*\;B^{\lambda}\big) = {\rm Tr}\big(BU^*B^{\lambda}U\;B^{-\lambda}\big) \\ df &= \big(UB^{-\lambda}BU^*\big):dB^{\lambda} + \big(BU^*B^{\lambda}U\big):dB^{-\lambda} \\ \frac{df}{d\lambda} &= \big(UB^{-\lambda}BU^*\big):B^{\lambda}\log(B) - \big(BU^*B^{\lambda}U\big):B^{-\lambda}\log(B) \\ &= {\rm Tr}\Big(UB^{-\lambda}BU^*B^{\lambda}\log(B) - BU^*B^{\lambda}UB^{-\lambda}\log(B)\Big) \\ }$$ where a colon has been used in the intermediate steps to denote the trace/Frobenius product, i.e. $$\eqalign{A:B = {\rm Tr}\big(A^TB\big)}$$