  In this work we discuss the exact solution to the algebraic equation
associated to the Ricci tensor in the quadratic $f(R,Q)$ extension of Palatini
gravity. We show that an exact solution always exists, and in the general case
it can be found by a simple matrix diagonalization. Furthermore, the general
implications of the solution are analysed in detail, including the generation
of an effective cosmological constant, and the recovery of the $f(R)$ and
$f(Q)$ theories as particular cases in their corresponding limit. In addition,
it is proposed a power series expansion of the solution which is successfully
applied to the case of the electromagnetic field. We show that this power
series expansion may be useful to deal perturbatively with some problems in the
context of Palatini gravity.
