2
$\begingroup$

I have this Mathematica line:

Reduce[1/(E^0)^x + 1/(E^1)^x + 1/(E^3)^x == 0, x]

that gives the output:

C[1] ∈ 
  Integers && (x == 
    I π + 2 I π C[1] + Log[-Root[1 + #1^2 + #1^3 &, 1]] || 
   x == 2 I π C[1] + Log[Root[1 + #1^2 + #1^3 &, 2]] || 
   x == 2 I π C[1] + Log[Root[1 + #1^2 + #1^3 &, 3]])

when copy pasted into the question box at Mathematica Stackexchange.

I would like to drop the part:

C[1] ∈ 
  Integers && 

from the beginning of the output above so that I can apply the ToRules command like this:

{ToRules[(x == 
     I π + 2 I π C[1] + Log[-Root[1 + #1^2 + #1^3 &, 1]] || 
    x == 2 I π C[1] + Log[Root[1 + #1^2 + #1^3 &, 2]] || 
    x == 2 I π C[1] + Log[Root[1 + #1^2 + #1^3 &, 3]])]}

How can I get rid of the C[1]∈Integers && in the output above from the program involving Reduce?

$\endgroup$
10
  • $\begingroup$ Why the down vote? $\endgroup$ Nov 20, 2014 at 12:54
  • $\begingroup$ What is log3? $\endgroup$
    – Öskå
    Nov 20, 2014 at 12:54
  • $\begingroup$ log3 is just a variable. Could have been "y" also. $\endgroup$ Nov 20, 2014 at 12:55
  • 1
    $\begingroup$ Why not List[ToRules@(Reduce[1/(E^0)^x + 1/(E^1)^x + 1/(E^3)^x == 0, x] /. C[1] -> 0)]? $\endgroup$
    – Öskå
    Nov 20, 2014 at 13:00
  • 1
    $\begingroup$ In this particular problem, the output from Reduce has head And and since Last works with any head if you do, say, sol = Reduce[1/(E^0)^x + 1/(E^1)^x + 1/(E^3)^x == 0, x]];, then Last@sol will give you what you want. $\endgroup$
    – gpap
    Nov 20, 2014 at 13:23

1 Answer 1

2
$\begingroup$

I usually use Simplify with assumptions:

Simplify[
 Reduce[1/(E^0)^x + 1/(E^1)^x + 1/(E^3)^x == 0, x],
 C[1] ∈ Integers]
(*
  x == I π (1 + 2 C[1]) + Log[-Root[1 + #1^2 + #1^3 &, 1]] || 
   x == 2 I π C[1] + Log[Root[1 + #1^2 + #1^3 &, 2]] || 
   x == 2 I π C[1] + Log[Root[1 + #1^2 + #1^3 &, 3]]
*)

That way I'm fairly confident the transformations are mathematically sound (as long as I keep to the assumptions).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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