I am evaluating $\sin(A)$ where $A$ is a $3\times 3$ matrix. I have calculated it but now I want to check this with a Taylor series expansion of Sin[x].
What I am using is
myfn= With[{B = N[A]},
Sum[ MatrixPower[B, 2 k + 1]/Factorial[2 k + 1], {k, 0, 4}]]
But I have to put $(-1)^k$ as well in the summation list. I dun know how to do it either it takes $1$ or $-1$ but it's not changing a sign whenever I am trying to evaluate
With[{B = N[A]},
Sum[ MatrixPower[B, 2 k + 1]*(-1^k)/ Factorial[2 k + 1], {k, 0, 4}]]
I am seriously stuck, could anyone help?
MatrixFunction[]. – J. M.'s missing motivation Aug 13 '17 at 17:41