Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4546

Re: Simplifying certain trigonometric expressions

From "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Simplifying certain trigonometric expressions
Date 2011-08-24 11:50 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j32ohs$drh$1@smc.vnet.net> (permalink)
References <j328id$b4g$1@smc.vnet.net>

Show all headers | View raw


On Wed, 24 Aug 2011 08:17:33 +0100, SamTakoy <pavelgrinfeld@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.

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Simplifying certain trigonometric expressions SamTakoy <pavelgrinfeld@gmail.com> - 2011-08-24 07:17 +0000
  Re: Simplifying certain trigonometric expressions "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-08-24 11:50 +0000
  Re: Simplifying certain trigonometric expressions psycho_dad <s.nesseris@gmail.com> - 2011-08-24 11:54 +0000

csiph-web