0
|
13925 Views
|
4 Replies
|
1 Total Likes
View groups...
Share

Define a complex number

Posted 10 years ago
 Hello, I want to define a complex number like z(x,y) = x + i y But when I do some mathematical operations on this number, Mathematica program don't know that the variables x and y are real numbers How can i enforce mathematica to deal with x and y as a real numbers not a complex numbers I am looking for ward to receive a comment .. many thanks
4 Replies
Sort By:
Posted 10 years ago
 The solution to this problem is to introduce Assumptions on variables x and y. There is a way to formulate global assumptions or you can add the assumptions as options to Simplify or to a few other Mathematica functions. Details are best seen from the Documentation concerning Assumptions (you know the convenient access via the F1-key to the documentation?).You may probably wonder why Mathematica does not follow the established paradigm of object oriented languages. I'm not in a position to answer this question. As it appears to me, the more recent versions of Mathematica made some steps on the way to incorporate the type-concept into the language. I would suspect that the end of this way is not yet reached.Sorry Sean, I overlooked that you did not only write on ComplexExpand that also about Assumptions!
Posted 10 years ago
 Hello, I want to define a complex number like z(x,y) = x + i y But when I do some mathematical operations on this number, Mathematica program don't know that the variables x and y are real numbers How can i enforce mathematica to deal with x and y as a real numbers not a complex numbers I am looking for ward to receive a comment .. many thanks
Posted 10 years ago
 Hello, I want to define a complex number like z(x,y) = x + i y But when I do some mathematical operations on this number, Mathematica program don't know that the variables x and y are real numbers How can i enforce mathematica to deal with x and y as a real numbers not a complex numbers I am looking for ward to receive a comment .. many thanks
Posted 10 years ago
 First, try using ComplexExpand:http://reference.wolfram.com/language/ref/ComplexExpand.htmlComplexExpand expands an expression assuming the variables are Real. Additionally, you can use the Assumptions option on many commands to tell it to assume that certain variables are RealAssumptions ->Element[{x,y},Reals]