9
$\begingroup$

We have $a*b*c=-1$, $\frac{a^2}{c}+\frac{b}{c^2}=1$, $a^2 b+a c^2+b^2 c=t$

What's the value of $a^5 c+a b^5+b c^5$?

I tried

Eliminate[{a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}, {a, b, c}] 

It's much slower than Maple's eliminate. How do I solve this efficiently?

$\endgroup$
2
  • $\begingroup$ You can try to solve first and then evaluate? sol = Solve[{a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t}, {a, b, c}] Evaluate[a b^5 + b c^5 + c a^5 /. sol[[1]]] I am not sure if this is the type of result you are looking for. $\endgroup$ Commented Mar 11, 2013 at 12:59
  • $\begingroup$ @BarisV Thansks. I tried this, but to simplify it is so slow. $\endgroup$ Commented Mar 11, 2013 at 13:35

3 Answers 3

18
$\begingroup$

If you use the third argument in Solve, i.e. a list of variables to be eliminated (take a look at the Eliminating Variables tutorial in Mathematica) then you'll get the result immediately :

Solve[{a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}, {res}, {a, b, c, t}] 
{{res -> 3}} 

Edit

It should be underlined that Solve appears to be smarter than Eliminate due to its improvement in Mathematica 8, look at its options, e.g. MaxExtraConditions, Method ( Method -> Reduce). However most of the update of Solve is hidden, but in general it shares its methods with Reduce. Defining

system = { a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res }; 

then it works too

Solve[ system, {res}, {a, b, c}] 
{{res -> 3}} 

while it doesn't in Mathematica 7 yielding

No more memory available. Mathematica kernel has shut down. Try quitting other applications and then retry. 

and your original problem should be evaluated this way (you've lost t):

Eliminate[ system, {a, b, c, t}] 
res == 3 

and it works in Mathematica 7 as well.

$\endgroup$
7
$\begingroup$

Can compute a Groebner basis with an ordering that eliminates {a,b,c}.

eqns = {a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}; GroebnerBasis[ Numerator[Together[Apply[Subtract, eqns, {1}]]], {res, t}, {a, b, c}] (* Out[150]= {-3 + res} *) 

The result is now immediate.

$\endgroup$
3
$\begingroup$

I found two methods:

Reduce[{a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}, {t}] // First (*res == 3*) res /. Solve[{a b c == -1, a^2 + b/c == c, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}, {a, b, c, res}] // Union (*{3}*) 
$\endgroup$
3
  • 1
    $\begingroup$ In general, this way is recommended : res /. {ToRules @ Reduce[{a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}, {t}]}. We can observe that we do not need this equation : a^2 b + b^2 c + c^2 a == t, i.e. we can get the solution this way res /. {ToRules @ Reduce[{a b c == -1, a^2/c + b/c^2 == 1, a b^5 + b c^5 + c a^5 == res}, {res}]}. $\endgroup$ Commented Mar 11, 2013 at 18:46
  • $\begingroup$ You can do also this Normal @ Solve[{a b c == -1, a^2/c + b/c^2 == 1, a b^5 + b c^5 + c a^5 == res}, {res}, MaxExtraConditions -> All] $\endgroup$ Commented Mar 11, 2013 at 18:53
  • $\begingroup$ @Artes Thansk you very much. $\endgroup$ Commented Mar 12, 2013 at 3:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.