Bridger Holden

2022-10-06

Solving and verification of : $\frac{\mathrm{\partial }}{\mathrm{\partial }\mathbit{y}}\mathrm{cos}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}$
I am trying to simplify an expression and would like to ask if my approach is correct and also could I simplify this expression further. If so what would I use? I am doing a bit of self-studying here so I must apologize if this is trivial.
Question:
Say $x\in {\mathbb{R}}^{n}$ and $y\in {\mathbb{R}}^{n}$ find the explicit expression:
$\begin{array}{r}\frac{\mathrm{\partial }}{\mathrm{\partial }\mathbit{y}}\mathrm{cos}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}\end{array}$
$\begin{array}{r}\frac{\mathrm{\partial }}{\mathrm{\partial }\mathbit{y}}\mathrm{cos}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}=-\mathbit{y}\mathrm{sin}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}\end{array}$
Is the answer correct?
Can I simplify this further?

### Answer & Explanation

Lohre1x

Recall that:
$\frac{d}{dy}\mathrm{cos}\left(xy\right)=-x\mathrm{sin}\left(xy\right)\ne -y\mathrm{sin}\left(xy\right).$
Therefore, in your case, the right derivative is:
$\begin{array}{r}\frac{\mathrm{\partial }}{\mathrm{\partial }\mathbit{y}}\mathrm{cos}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}=-\mathbit{x}\mathrm{sin}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}\end{array}$
Since $\mathrm{sin}\left({\mathbit{x}}^{T}\mathbit{y}\right)$ is a number, then you can write this as:
$\begin{array}{r}\frac{\mathrm{\partial }}{\mathrm{\partial }\mathbit{y}}\mathrm{cos}\left({\mathbit{x}}^{T}\mathbit{y}\right){\mathbit{x}}^{T}=-\mathrm{sin}\left({\mathbit{x}}^{T}\mathbit{y}\right)\mathbit{x}{\mathbit{x}}^{T}\end{array}$

Do you have a similar question?

Recalculate according to your conditions!

Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?