Given $\alpha$ a scalar, $\mathbf{X}$ an $N_x \times 1$ vector that is a function of $\alpha$, $\mathbf{U}$ an $N_u \times 1$ vector that is a function of $\alpha$ and $\mathbf{X}$, and $\mathbf{C}$ an $N_u \times N_u$ matrix that is a function of $\alpha$, $\mathbf{X}$, and $\mathbf{U}$. I am trying to compute the total derivative of $\mathbb{F} = \mathbf{C} \mathbf{U}$ with respect to $\alpha$ using the chain rule:
$$\underbrace{\frac{d \mathbb{F}}{d \alpha}}_{N_u \times 1} = \underbrace{\frac{\partial \mathbb{F}}{\partial \alpha}}_{N_u \times 1} + \underbrace{\frac{\partial \mathbb{F}}{\partial \mathbf{X}}}_{N_u \times N_x} \underbrace{\frac{\partial \mathbf{X}}{\partial \alpha}}_{N_x \times 1} + \underbrace{\frac{\partial \mathbb{F}}{\partial \mathbf{U}}}_{N_u \times N_u} \underbrace{\frac{\partial \mathbf{U}}{\partial \alpha}}_{N_u \times 1},$$
The first term is straight forward. How can I compute the second term on the RHS and put it in the above form (i.e., put $\frac{\partial \mathbf{X}}{\partial \alpha}$ on the right)?
I figured out the following:
$$\underbrace{\frac{\partial \mathbb{F}}{\partial \mathbf{X}}}_{N_u \times N_x} \underbrace{\frac{\partial \mathbf{X}}{\partial \alpha}}_{N_x \times 1} = \underbrace{\frac{\partial \mathbf{C}}{\partial \mathbf{X}}}_{N_u \times N_u \times N_x} \underbrace{\frac{\partial \mathbf{X}}{\partial \alpha}}_{N_x \times 1} \underbrace{\mathbf{U}}_{N_u \times 1} + \underbrace{\mathbf{C}}_{N_u \times N_u} \underbrace{\frac{\partial \mathbf{U}}{\partial \mathbf{X}}}_{N_u \times N_x} \underbrace{\frac{\partial \mathbf{X}}{\partial \alpha}}_{N_x \times 1},$$
As you can see, confusion comes from the first term on the RHS in the above equation. I can't figure out how to perform the derivative of the matrix $\mathbf{C}$ with respect to $\mathbf{X}$ and how to put the size correctly so the multiplication is correct. Finally, in such case, is it possible to reorder the term to put $\frac{\partial \mathbf{X}}{\partial \alpha}$ on the right?
The context is optimization of fluid-structure interaction problems if any one is interested. Any help is highly appreciated.