Given $A\in\mathbb{R}^{n\times n}$ and $B\in\mathbb{R}^{n\times 2}$, I am interested in solving the following problem:
\begin{array}{ll} \underset{R \in \mathbb{R}^{2\times 2}}{\text{minimize}} & \mathrm{tr} \left( R^{-1}B^T X B \right)\\ \text{subject to} & X=A^TXA-A^TXB(R+B^TXB)^{-1}B^TXA.\end{array}
Here $X$ is unique stabilizing solution to DARE, thus X is positive definite. It is required that $R>0$ (i.e. positive definite) and $B^TXB$ to be full rank.
EDIT: For a fixed $A,B,R$, we can get unique $X$ by solving DARE, for example by using matlab "idare" or "dare" command. However, here $R$ is not fixed, it is a variable, thus for each $R$, there is corresponding $X$.
My attempt: I wanted to start with simpler case when we put additional constraints on $R$. Assume that $R$ is diagonal and positive definite. WLOG we can assume that $R=\mathrm{diag}\{r_1,r_2\}$, such that $r_1+r_2=1$ and $1>r_i>0$ for $i=1,2.$
A=[3 0 0 0; 0 2 1 0; 0 0 2 0; 0 0 0 2];
B=rand(4,2);
Q=zeros(4,4);
r1=linspace(0.01, 0.99);
for i=1:100
R=[r1(i) 0; 0 1-r1(i)];
[X,~,~] = idare(A,B,Q,R);
T(i)=trace(inv(R)*B'*X*B);
end
plot(T)
It looks like that as we increase $r_1$ from $0$ to $1$, then $\mathrm{tr} \left( R^{-1}B^T X B \right)$ is continuous, moreover, it is convex. However, I am unable to prove it.