Matrix equation involving a Pauli matrix I should solve the following problem:
find the matrix $A$ that satisfies the following equation:
$$\sin(\pi A)+\cos(\pi A)^2= \left( \begin{array}{ccc}
0 & 1 \\
1 & 0 \end{array} \right)$$
How can I solve the problem?
Thanks in advance.
 A: Note: diagonalization is essential here. One possibility is to change the basis back and forth. That's what I do below. A more elegant way is to simply work with the spectral projections without ever writing the four coefficients of the matrices. That's Muphrid's approach.
First diagonalize the rhs matrix by $P$ orthogonal:
$$
PSP^*=P\pmatrix{0&1\\1&0}P^*=\pmatrix{1&0\\0&-1}=D\qquad \mbox{where}\quad P=\pmatrix{\frac{\sqrt{2}}{2}& \frac{\sqrt{2}}{2}\\-\frac{\sqrt{2}}{2}&\frac{\sqrt{2}}{2}}.
$$
Then observe, via the series representations of $\sin$ and $\cos $ and $PB^nP^*=(PBP^*)^n$, that
$$
\sin (\pi A)+\cos(\pi A)^2=S\iff P(\sin (\pi A)+\cos(\pi A)^2)P^*=D
$$
$$
\iff \sin (\pi PAP^*)+\cos(\pi PAP^*)^2=D.
$$
So we need to solve $(E): \;\sin (B)+\cos(B)^2=D$ and make $A=\frac{1}{\pi}P^*BP$ in the end.
If $B$ is a solution of $(E)$, $D$ and $B$ commute. In particular, $B$ must leave the eigenspaces of $D$ invariant. Since they are one-dimensional, this forces $B$ to be diagonal. Whence $(E)$ is equivalent to
$$
B=\pmatrix{\lambda&0\\0&\mu}\qquad \pmatrix{\sin \lambda+\cos^2\lambda&0\\0&\sin \mu+\cos^2\mu}=\pmatrix{1&0\\0&-1}
$$
This yields $\sin \lambda=0$ or $\sin\lambda =1$, and $\sin\mu=-1$. So the solutions of $(E)$ are
$$
B=\pmatrix{k\pi&0\\0&-\frac{\pi}{2}+2l\pi}\qquad B=\pmatrix{\frac{\pi}{2}+2k\pi&0\\0&-\frac{\pi}{2}+2l\pi}.
$$
To obtain the solutions of your initial equation, just use the formula $A=\frac{1}{\pi}P^*BP$:
$$
A=\pmatrix{\frac{-1+2k+4l}{4} & \frac{1+2k-4l}{4}\\ \frac{1+2k-4l}{4}&\frac{-1+2k+4l}{4} }\qquad A=\pmatrix{k+l & \frac{1}{2}+k-l\\\frac{1}{2}+k-l&k+l }
$$
where $k$ and $l$ range over $\mathbb{Z}$.
Conclusion: this can be rewritten
$$
A=\left(\frac{-1+2k+4l}{4}\right) I_2+\left(\frac{1+2k-4l}{4}\right) S\qquad A= (k+l)I_2+\left(\frac{1}{2}+k-l \right)S
$$
where $S$ is your original Pauli matrix on the rhs of your equation.
A: The properties of Pauli matrices can be handled abstractly.  You need not, at any time, write them out explicitly.
You want $A$ such that
$$\sin \pi A + \cos^2 \pi A = \sigma_1$$
Edit: I was mistaken earlier; we can't assume that $A$ is a linear combination of $\sigma_1, \sigma_2, \sigma_3$.  But the problem does hinge on the behavior of the trig functions on various kinds of inputs.  Unit "vectors"--linear combinations of $\sigma_1, \sigma_2, \sigma_3$--will pull out of the trig function, for instance.  Bivectors--linear combinations of $\sigma_1 \sigma_2, \sigma_2 \sigma_3, \sigma_3 \sigma_1$.  The logic extends to products of three Pauli matrices.
But that's not all.  There are idempotents of the form $I_\pm = (1 \pm \sigma_1)/2$ (you can understand $1$ as the identity).  These also pull out of trig functions.  There may be other such objects that pull out that I'm not aware of, but I think this will get us in the right direction.
For various reasons, I will take as an ansatz that $B = \pi A = c I_+ + d I_-$.  If $\pi A$ is a "vector" in this terminology, this can be accomplished with $c = -d$; if $\pi A$ is a "scalar" (that is a multiple of the identity), then $c = d$.  I ignore the possibility that $\pi A$ has any other terms, as these are unlikely to cancel out through the power series.
The reason for this decomposition is as follows.  $B^n = c^n I_+ + d^n I_-$.  Thus, the trig functions become
$$\sin B = I_+ \sin c + I_- \sin d, \quad \cos B = I_+ \cos c + I_- \cos d - 1$$
We plug this into the original equation to get the following:
$$I_+ \sin c + I_- \sin d + I_+ \cos^2 c + I_- \cos^2 d - 2(I_+ \cos c + I_- \cos d) + 1 = \sigma_1$$
Breaking down in terms of $1, \sigma_1$, we get
$$\frac{1}{2} (\sin c + \sin d + \cos^2 c + \cos^2 d - 2 \cos c - 2 \cos d) + 1 = 0$$
and 
$$\frac{1}{2}(\sin c - \sin d + \cos^2 c - \cos^2 d - 2 \cos c + 2 \cos d) \sigma_1 = \sigma_1$$
Cancel the $\sigma_1$ and add/subtract the two equations to cancel out everything involving $c$ or $d$ to get
$$\sin c + \cos^2 c - 2 \cos c = 0, \quad \sin d + \cos^2 d - 2 \cos d = -2$$
Well, I must concede that this problem was not as simple as I anticipated, so I think julien's approach, which makes fewer assumptions, is probably the best course.
