re-writte $AX B+C(X \odot X) D $ into compact form $f(\mathbf{A},\mathbf{B}, \mathbf{C}, \mathbf{D}) \mathbf{X}$ I have an matrix form as:
$$
\mathbf{A} \mathbf{X} \mathbf{B}+\mathbf{C} (\mathbf{X} \odot \mathbf{X}) \mathbf{D}
$$
Where $\odot$ is the element-wise matrix product. And $\mathbf{A} \mathbf{X}$ simple denotes the matrix-matrix product.
I am trying to re-write the equation as
$$
f(\mathbf{A},\mathbf{B}, \mathbf{C}, \mathbf{D}) \mathbf{X} 
$$
or
$$
f(\mathbf{A},\mathbf{B}, \mathbf{C}, \mathbf{D}) \mathbf{X}  g(\mathbf{A},\mathbf{B}, \mathbf{C}, \mathbf{D})
$$
Is it possible?  my goal is to put $X$ together, and solve a linear system equation.
Thanks
 A: The form $f({\bf A}, {\bf B}, {\bf C}, {\bf D}) {\bf X}$ implies that the expression is linear in ${\bf X}$.
However, ${\bf C}({\bf X}\odot {\bf X}){\bf D}$ is not linear in ${\bf X}$, since e.g. for ${\bf X},{\bf X}'=$
$$
{\bf C}\big((+) \odot (+)\big){\bf D}
=    4{\bf C}{\bf D} 
\neq 2{\bf C}{\bf D} 
=    {\bf C}(\odot ){\bf D}  + {\bf C}(\odot ){\bf D} 
$$
Hence it is impossible to write $g({\bf A}, {\bf B}, {\bf C}, {\bf D}, {\bf }) = {\bf A} {\bf X} {\bf B}+{\bf C} ({\bf X} \odot {\bf X}) {\bf D}$ in the form you propose. Now that being said, it is possible to write $g$ in "polynomial" form
$$
g({\bf A}, {\bf B}, {\bf C}, {\bf D}, {\bf X})
= \big({\bf A} \otimes {\bf B}^\big)\cdot {\bf X} + \big({\bf C}\otimes {\bf D}^\big)\cdot {\bf X}^{\odot 2}
$$
Where, subject to convention, ${\bf R} \otimes {\bf S} =\big({\bf R}_{ik} {\bf S}_{jl}\big)_{ij,kl}$ and "$\cdot$" is the 2-d tensor contraction
$$\begin{aligned}
\big({\bf A} \otimes {\bf B}^\big) \cdot {\bf X}
= \big({\bf A}_{ik} {\bf B}_{lj}\big)_{ij,kl} \cdot ({\bf X}_{kl})_{kl}
= \sum_{kl} {\bf A}_{ik}{\bf B}_{lj}{\bf X}_{kl}
= {\bf A} {\bf X} {\bf B}
\end{aligned}$$
