Group Abstract Group Abstract

Message Boards Message Boards

0
|
23.2K Views
|
4 Replies
|
1 Total Like
View groups...
Share
Share this post:

Assume real values of an enxpression while using Simplify or FullSimplify?

Posted 9 years ago

Hi. I have this number:

(e + I y - 3 (f + I z) +     3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 +     
Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f +
       I (1 + z))^2] +     I (e + f + 
      I (y + z))^2 + (4 (-1 + 3 I e - I f + (e + I y)^2 - 
        3 y + (e + I y) (f + I z) - (f + I z)^2 + z)^2)/(e + I y - 
      3 (f + I z) + 3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 + 
      Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f + 
          I (1 + z))^2] + I (e + f + I (y + z))^2))/(2 (-1 + 3 I e - 
     I f + (e + I y)^2 - 3 y + (e + I y) (f + I z) - (f + I z)^2 + z))

I know it is real (I proved that), but using Simplify or FullSimplify there are still imaginary units. Using ComplexExpand, too. What is commend which I should use to reduct imaginary units? I am not well-experienced, so I don't know how do this.

*e, f, y, z are real numbers

POSTED BY: Jan Redwi?ski
4 Replies

You can introduce assumptions in Simplify and FullSimplify after your expresion:

Simplify[expr,assum]
FullSimplify[expr,assum]

And you can write your assumption like this:

{e, y, f, z} \[Element] Reals

For more info check the guide Using Assumptions.

Posted 9 years ago

You're right! Now I understand why it doesn't work.

y = Sqrt[1-e^2]
z = Sqrt[1-f^2]

In addition e, f are elements of (-1,1). Now it should work, I've forgot that I made all formulas for this assumptions (and I didn't know how implement them in Mathematica) Thanks, Jofre Espigule and David Keth :)

POSTED BY: Jan Redwi?ski
Posted 9 years ago

However, for at least one set of values, the expression is complex:

In[1]:= expr = (e + I y - 3 (f + I z) + 
     3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 + 
     Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f + 
           I (1 + z))^2] + 
     I (e + f + 
         I (y + z))^2 + (4 (-1 + 3 I e - I f + (e + I y)^2 - 
           3 y + (e + I y) (f + I z) - (f + I z)^2 + z)^2)/(e + I y - 
        3 (f + I z) + 
        3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 + 
        Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f + 
              I (1 + z))^2] + I (e + f + I (y + z))^2))/(2 (-1 + 
       3 I e - I f + (e + I y)^2 - 
       3 y + (e + I y) (f + I z) - (f + I z)^2 + z));

In[2]:= expr /. {e -> 1, f -> 1, y -> 1, z -> 1}

Out[2]= 3/2 + I/2
POSTED BY: David Keith
Posted 9 years ago

How to "say" in Wolfram language that e, f, y, z are reals? Because I think that Mathematica counts it for complex e, f, y, z.

POSTED BY: Jan Redwi?ski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard