1
$\begingroup$

How do you find a real part of a complex expression?

Here is an example of what I am looking for

complexExpand[Sqrt[x + I*b]] 

gives me

(b^2 + x^2)^(1/4) Cos[1/2 Arg[I b + x]] + I (b^2 + x^2)^(1/4) Sin[1/2  Arg[I b + x]], 

while there exists expression which does not contain cos or arg (just x and b).

$\endgroup$

closed as unclear what you're asking by Simon Woods, march, Öskå, RunnyKine, J. M. will be back soon Apr 6 '16 at 21:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ "Dummy machine didn't accept my question, so I have to type. I am curious if it will be accepted." What? Also, look up Re in the Mathematica documentation. $\endgroup$ – march Apr 6 '16 at 19:33
  • $\begingroup$ I tried it and it didn't work. It only work with numbers, not with expressions. $\endgroup$ – user1765636 Apr 6 '16 at 20:37
  • $\begingroup$ Without a lot more information/specifics in the post, looking up Re in the documentation is the only answer we can give you. If you edit your post with more information about your specific case, complete with a simple (but not too simple that it doesn't show the problem) example of your use-case, then perhaps we can be more specific. Otherwise, this will likely soon be closed as "unclear what you're asking". But also try ComplexExpand along with Re, perhaps. $\endgroup$ – march Apr 6 '16 at 20:41
  • $\begingroup$ Please edit your original post with this information, properly formatted in code blocks. Click the grey question mark on the right side of the editing toolbar for formatting help. $\endgroup$ – march Apr 6 '16 at 20:52
  • 1
    $\begingroup$ ComplexExpand[Re[Sqrt[x + I*b]]] works, once you realize that up to branch-cuts, ArcTan[x,b] == Arg[I b + x]. $\endgroup$ – march Apr 6 '16 at 20:55

Browse other questions tagged or ask your own question.