Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4543 > unrolled thread
| Started by | SamTakoy <pavelgrinfeld@gmail.com> |
|---|---|
| First post | 2011-08-24 07:17 +0000 |
| Last post | 2011-08-24 11:54 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
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
| From | SamTakoy <pavelgrinfeld@gmail.com> |
|---|---|
| Date | 2011-08-24 07:17 +0000 |
| Subject | Simplifying certain trigonometric expressions |
| Message-ID | <j328id$b4g$1@smc.vnet.net> |
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
[toc] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-08-24 11:50 +0000 |
| Message-ID | <j32ohs$drh$1@smc.vnet.net> |
| In reply to | #4543 |
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.
[toc] | [prev] | [next] | [standalone]
| From | psycho_dad <s.nesseris@gmail.com> |
|---|---|
| Date | 2011-08-24 11:54 +0000 |
| Message-ID | <j32oqi$duk$1@smc.vnet.net> |
| In reply to | #4543 |
Try this: Cos[2 ArcTan[y/x]] // TrigExpand // FullSimplify The result is: -1 + (2 x^2)/(x^2 + y^2) Cheers
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web