1
$\begingroup$

I have the following expression to simplify

$$k_1 c_1^4 + k_{12} c_1^2c_2^2 + k_2 c_2^4$$

using the conditions

$$ c_1^2 = c_{11} $$ $$ c_2^2 = c_{22} $$ $$ c_1 c_2 = c_{12} $$

and I would like to write the expression above as

$$k_1 c_{11}^2 + k_{12} c_{12} + k_2 c_{22}^2$$

How can I do it with Mathematica?

$\endgroup$
3
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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!

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.