# Simplify expressions with constraints

I have the following expression to simplify

k1c41+k12c21c22+k2c42k_1 c_1^4 + k_{12} c_1^2c_2^2 + k_2 c_2^4

using the conditions

c21=c11
c_1^2 = c_{11}

c22=c22
c_2^2 = c_{22}

c1c2=c12
c_1 c_2 = c_{12}

and I would like to write the expression above as

k1c211+k12c12+k2c222k_1 c_{11}^2 + k_{12} c_{12} + k_2 c_{22}^2

How can I do it with Mathematica?

=================

=================

2

=================

One way:

eqs = {f == k1 c1^4 + k12 c1^2 c2^2 + k2 c2^4,c1^2 == c11, c2^2 == c22, c1 c2 == c12};
Reduce[Eliminate[eqs, {c1, c2}], f]

(c22 == 0 && c12 == 0 && f == c11^2 k1) || (c22 != 0 &&
c11 == c12^2/c22 && f == c11^2 k1 + c12^2 k12 + c22^2 k2)

Simplify[%, c22 != 0]

c12^2 == c11 c22 && f == c11^2 k1 + c12^2 k12 + c22^2 k2

Try this:

expr = k1 c1^4 + k12 c1^2 c2^2 + k2 c2^4;
expr /. {c1 -> Sqrt[c11], c2 -> Sqrt[c22], c1^2*c2^2 -> c12^2}

(* c11^2 k1 + c12^2 k12 + c22^2 k2 *)

Have fun!

Is this right though? what if c1∨c2<0c_1\vee c_2<0? – Feyre Aug 12 at 11:16      @ Feyre I see no problem in this case. – Alexei Boulbitch Aug 12 at 11:46      From c21=c11c_{1}^2=c_{11} follows |c1|=√c1\left| c_1\right|=\sqrt{c_1}. It's a matter of proper proof. – Feyre Aug 12 at 13:09      @Feyre And the result of the transformation in question will be different? – Alexei Boulbitch Aug 12 at 13:33      Well, no. Just that I'd be cautious of doing something like that. – Feyre Aug 12 at 13:56