Re: Simplifying expression involving Log and I
- To: mathgroup at smc.vnet.net
- Subject: [mg38052] Re: Simplifying expression involving Log and I
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Thu, 28 Nov 2002 14:07:47 -0500 (EST)
- References: <arv2ai$ar4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Andrzej,
You write:
> It seems related to the following behaviour, that certianly suggests a
> bug:
>
> FullSimplify[ArcTan[x, y], {x > 0, y < 0}]
>
> ArcTan[x, y]
>
>
> FullSimplify[ArcTan[2*x, 2*y], {x > 0, y < 0}]
>
> ArcTan[y/x]
Both results are correct. The difference seems to be due to the complexity
test used and, maybe, the order of simplification.
FullSimplify[ArcTan[x, y], {x > 0, y < 0},
ComplexityFunction -> Length]
ArcTan[y/x]
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Andrzej Kozlowski" <andrzej at tuins.ac.jp> wrote in message
news:arv2ai$ar4$1 at smc.vnet.net...
> This will take you pretty close:
>
> FullSimplify[ComplexExpand[
> d*Pi + I*d*(Log[M] - 2*Log[(-I)*Sqrt[(M*r)/d] +
> Sqrt[M - (M*r)/d]]), TargetFunctions -> {Re, Im}],
> M > 0 && 0 < r < d]
>
>
> d*(Pi + 2*ArcTan[Sqrt[M - (M*r)/d], -Sqrt[(M*r)/d]])
>
> Still, there appears to be something missing among the rules
> FullSimplify is applying.
> It seems related to the following behaviour, that certianly suggests a
> bug:
>
> FullSimplify[ArcTan[x, y], {x > 0, y < 0}]
>
>
> ArcTan[x, y]
>
>
> FullSimplify[ArcTan[2*x, 2*y], {x > 0, y < 0}]
>
>
> ArcTan[y/x]
>
> On Monday, November 25, 2002, at 03:58 PM, Dave Snead wrote:
>
> > Hi,
> >
> > I'm trying to simplify (M, r, d are positive reals with r<d)
> > d*Pi + I*d*(Log[M] - 2*Log[(-I)*Sqrt[(M*r)/d] + Sqrt[M - (M*r)/d]])
> >
> > to
> >
> > 2*d*ArcCos[Sqrt[r/d]]
> >
> > I've tried applying
> >
> > FullSimplify[#,M>0 && 0<r<d]&
> >
> > and
> >
> > ExpToTrig
> >
> > but Mathematica won't get rid of the Log and the I and give me the
> > ArcCos.
> >
> > Does anyone know which Mathematica functions to apply to my expression
> > to
> > give me the simplification I want?
> >
> > Thanks in advance.
> >
> >
> >
> >
> >
> >
> >
> Andrzej Kozlowski
> Yokohama, Japan
> http://www.mimuw.edu.pl/~akoz/
> http://platon.c.u-tokyo.ac.jp/andrzej/
>
>