Concept:
If
\[
A+A^T=I,
\]
where \(A^T\) denotes the transpose of \(A\) and
\[
I=
\begin{bmatrix}
1 & 0\\
0 & 1
\end{bmatrix},
\]
then we first find \(A^T\), add it to \(A\), and compare the result with the identity matrix to determine the value of \(x\).
Step 1: Find the transpose of \(A\).
Given,
\[
A=
\begin{bmatrix}
\cos x & \sin x\\
-\sin x & \cos x
\end{bmatrix}.
\]
The transpose of \(A\) is
\[
A^T=
\begin{bmatrix}
\cos x & -\sin x\\
\sin x & \cos x
\end{bmatrix}.
\]
Step 2: Compute \(A+A^T\).
\[
A+A^T=
\begin{bmatrix}
\cos x & \sin x\\
-\sin x & \cos x
\end{bmatrix}
+
\begin{bmatrix}
\cos x & -\sin x\\
\sin x & \cos x
\end{bmatrix}.
\]
Adding corresponding entries,
\[
A+A^T=
\begin{bmatrix}
2\cos x & 0\\
0 & 2\cos x
\end{bmatrix}.
\]
Step 3: Compare with the identity matrix.
Since
\[
A+A^T=I,
\]
we have
\[
\begin{bmatrix}
2\cos x & 0\\
0 & 2\cos x
\end{bmatrix}
=
\begin{bmatrix}
1 & 0\\
0 & 1
\end{bmatrix}.
\]
Therefore,
\[
2\cos x=1,
\]
which gives
\[
\cos x=\frac{1}{2}.
\]
Step 4: Find the value of \(x\).
Since
\[
x\in\left[-\frac{\pi}{2},\,\frac{\pi}{2}\right],
\]
the only value satisfying
\[
\cos x=\frac{1}{2}
\]
is
\[
x=\frac{\pi}{3}.
\]
Hence,
\[
\boxed{x=\frac{\pi}{3}.}
\]