MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Another damn simplifying problem: ArcTan

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60126] Re: Another damn simplifying problem: ArcTan
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Sat, 3 Sep 2005 02:06:20 -0400 (EDT)
  • References: <dek7hq$a2t$1@smc.vnet.net> <demm3s$rd1$1@smc.vnet.net> <dep7cc$euf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Mathieu McPhie wrote:
> Hi all again,
> 
> By drawing a little diagram I have cunningly devised the following 
> arctan indentities, which I think M. should know, you know?
> 
> 1. ArcTan[x,y] + ArcTan[x,-y] = 0,   for all real x and y
> 2. ArcTan[x,y] + ArcTan[-x,y] = pi,  for all real x and y > 0
> 3. ArcTan[x,y] + ArcTan[-x,y] = -pi, for all real x and y < 0
> 
> I can get M to Simplify the 1st expression, but only for x > 0, not the 
> general result, i.e.
> 
> Simplify[ArcTan[x,y]+ArcTan[x,-y],x>0] = 0
> 
> I can get Ma to reproduce the first general by the following complicated 
> expression
> 
> Simplify[Factor[TrigToExp[ArcTan[x, y] + ArcTan[x,-y]]]
> /. Log[x_] + Log[y_] -> Log[x y]] = 0
> 
> But using the same proceedure with the 2nd/3rd expression yields the 
> answer pi, regardless of the sign of y.
> 
> Simplify[Factor[TrigToExp[ArcTan[x, y] + ArcTan[-x,y]]]
> /. Log[x_] + Log[y_] -> Log[x y]] = pi
> 
> WTH? Anyone got ideas here?
> 
> Cheers, Mat
> 
> Mathieu McPhie wrote:
> 
>>Sorry, I got my x's and y's mixed up, and so I was more curious about 
>>why "M" can't simplify the following:
>>
>>Simplify[ArcTan[x,-y]+ArcTan[x,y]]
>>
>>This can be simplified by choosing x > 0, and not if x < 0. Which 
>>according to the range of the ArcTan function should also evaluate to 0.
>>
>>Cheers, Mat
> 
> 
Hello,

Simplify will never supply everything that might be needed, but why not 
write your own function that looks for expressions like 
ArcTan[x,y]+ArcTan[x,-y] and evaluates them. Of course, your own 
function can even make simplifications that are not valid in all cases 
(or ever!).

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: piecewise vs which
  • Next by Date: hints to speed up numerical integration?
  • Previous by thread: Re: Would a code generator from dynamic systems be feasible and useful?
  • Next by thread: hints to speed up numerical integration?