Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about the function Assuming[], the $Assumptions system variable, and the Assumptions option of functions such as Simplify[] and Integrate[].
3
votes
Accepted
How do I declare that a variable represents a real number?
1. See the function ComplexExpand
ComplexExpand[Re[x + I y]]
gives
x
2. Also you can try Refine combined with Element:
Refine[Re[x + I y], Element[x, Reals]]
(*x - Im[y]*)
40
votes
How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc
You can also use Refine with Element :
Refine[Sqrt[2] Conjugate[Sqrt[1/L]] Sin[(Pi* Conjugate[n x])/Conjugate[L]],
{Element[L, Reals], Element[n, Integers]}]
gives
and if you add that L>0:
Ref …