Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to simplify the slope of vectors with symbolic coordinates {x,y} using ArcTan[x,y] I am working with real X and Y

I tried the following :

ClearAll@L;
ArcTan[L, L]
ComplexExpand@ArcTan[L, L]
Assuming[Element[L, Reals] && L > 0, ComplexExpand@ArcTan[L, L]]
% // Simplify
Simplify[ComplexExpand@ArcTan[L, L], {Element[L, Reals], L > 0}]

and got the following output:

ArcTan[L, L]
Arg[(1 + I) L]
Arg[(1 + I) L]
Arg[(1 + I) L]
\[Pi]/4

Why is there a difference between the last line

Simplify[ComplexExpand@ArcTan[L, L], {Element[L, Reals], L > 0}]

and the third-last line?

Assuming[Element[L, Reals] && L > 0, ComplexExpand@ArcTan[L, L]]
share|improve this question
1  
The documentation states that "Assuming affects the default assumptions for all functions that have an Assumptions option." Since ComplexExpand does not have an Assumptions option, it does not use the assumptions you specified in Assuming –  Simon Woods Feb 20 at 20:04
    
Thanks you were right. On removing the assumption L>0 from the Simplify[] and the results match! –  my account_ram Feb 22 at 13:57
    
@SimonWoods - Can you add it as an answer so that I can Accept it –  my account_ram Feb 22 at 13:57

1 Answer 1

up vote 0 down vote accepted

The documentation states that:

Assuming affects the default assumptions for all functions that have an Assumptions option.

Since ComplexExpand does not have an Assumptions option, it does not use the assumptions you specified in Assuming.

share|improve this answer
    
Solved . . . . . –  my account_ram Feb 25 at 11:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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