       Re: Inverse of "PowerExpand"

• To: mathgroup at smc.vnet.net
• Subject: [mg51659] Re: Inverse of "PowerExpand"
• From: "Dr. Wolfgang Hintze" <weh at snafu.de>
• Date: Wed, 27 Oct 2004 23:44:08 -0400 (EDT)
• References: <clnf0f\$ode\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Klaus,

let's take a slightly simpler example:

In:=
v = PowerExpand[Log[f*f]]

Out=
2*Log[f]

1st idea

In:=
Simplify[v]

Out=
2*Log[f]

2nd idea

In:=
ComplexExpand[v]

Out=
2*I*Arg[f] + Log[f^2]

... oh, looks quite good, but the imaginary part is disturbing.
So let's tell Mathematica that f is >0 (and hence real)

In:=
Simplify[ComplexExpand[v], f > 0]

Out=
2*Log[f]

... still not ok!
But telling it in another way (Arg[f]==0) works:

In:=
Simplify[ComplexExpand[v], Arg[f] == 0]

Out=
Log[f^2]

In:=
w = PowerExpand[Log[a*b*b/c]]

Out=
Log[a] + 2*Log[b] - Log[c]

"Inversion" can be done by using

In:=
Simplify[ComplexExpand[w], Arg[a] == 0 && Arg[b] == 0 &&
Arg[c] == 0 && a > 0 && c > 0]

Out=
Log[(a*b^2)/c]

But, when playing around with the conditions, trying to be logical (a>0
should mean Arg[a]==0 etc.) and other, you can discover the most funny
things. E.g. adding the condition b>0 yields

In:=
Simplify[ComplexExpand[w], Arg[a] == 0 && Arg[b] == 0 &&
Arg[c] == 0 && a > 0 && c > 0 && b > 0]

Out=
2*Log[b] + Log[a/c]

Noch einen schönen Abend dabei...(have a nice evening experimenting...)
Wolfgang

Klaus G wrote:

> PowerExpand[Log[a*b*b/c]]
>
> gives:
>
> Log[a] + 2 Log[b] - Log[c]
>
> Which Function will return the original "Log"?
>
> Klaus G.
>
>

```

• Prev by Date: Re: Bug in Graphics Text under Linux
• Next by Date: Re: listplot and plot of the same function display in different scale...
• Previous by thread: Re: Inverse of "PowerExpand"
• Next by thread: Re: Inverse of "PowerExpand"