MathGroup Archive 2011

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

Search the Archive

Re: Simplifying certain trigonometric expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121038] Re: Simplifying certain trigonometric expressions
  • From: "Oleksandr Rasputinov" <oleksandr_rasputinov at hmamail.com>
  • Date: Wed, 24 Aug 2011 07:49:54 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j328id$b4g$1@smc.vnet.net>

On Wed, 24 Aug 2011 08:17:33 +0100, SamTakoy <pavelgrinfeld at gmail.com>  
wrote:

> Hi,
>
> My Mathematica has no problem with
>
> Assuming[x > 0 && y > 0, Cos[ArcTan[y/x]] // FullSimplify]
>
> yielding x/Sqrt[x^2 + y^2], but can't do anything with
>
> Assuming[x > 0 && y > 0, Cos[2 ArcTan[y/x]] // FullSimplify].
>
> How does one overcome this?
>
> Thanks,
>
> Pavel
>

The result you are most likely looking for here has a larger LeafCount  
than the input, so in the view of FullSimplify with the default  
ComplexityFunction, the given expression cannot be made any simpler. But  
you can get a different result by specifying a ComplexityFunction biased  
against trigonometric functions:

Assuming[x > 0 && y > 0,
  FullSimplify[
   Cos[2 ArcTan[y/x]],
   ComplexityFunction -> Function[{expr},
     100 Count[expr, _Cos | _ArcTan, {0, Infinity}] + LeafCount[expr]
     ]
   ]
  ]

gives

-1 + (2 x^2)/(x^2 + y^2)

which I think is probably what you wanted.

Best,

O. R.




  • Prev by Date: Re: Getting 3d printable models out of 3d graphics in Mathematica
  • Next by Date: Re: Execute commands with CDF player
  • Previous by thread: Re: Simplifying certain trigonometric expressions
  • Next by thread: Nested List Abs[]