Re: A FullSimplify Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg41077] Re: A FullSimplify Problem
- From: "Dr. Wolfgang Hintze" <weh at snafu.de>
- Date: Thu, 1 May 2003 04:59:34 -0400 (EDT)
- References: <b8o20k$p28$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ted,
I played around with your integral but Mathematica wouldn't do the right
thing (neither fixing parameter "a" numerically nor considering the
indefinite integral and putting in upper and lower limits would help).
Finally I came up with the main idea which I believe should always be
tried if possible: modify the original function so that it doesn't
contain branch cuts.
In your case it works as follows (please import what follows below into
a notebook). You can consider that whole procedure as "Simplifying". I
admit it's neither obvious (at least to me) nor applicable in general.
Hope that helps, nevertheless.
Regards,
Wolfgang
(****************************)
(* begin
(****************************)
(* New ansatz: avoid the "dangerous" Log branch cut by considering the
derivative of the original function with respect to the parameter a *)
(* The orginal function f was definied as *)
In[405]:=
h[a_, x_] := Log[1 - 2 a Cos[x] + a^2]
f[a_] := Integrate[h[a, x], {x, 0, \[Pi]}]
(* Consider the derivative of the integrand h[] with respect to the
parameter a *)
In[411]:=
Clear[a];
m[a_, x_] := D[h[b, x], b] /. b -> a
(* This looks much more friendly: *)
In[413]:=
m[a, x]
Out[413]=
\!\(\(2\ a - 2\ Cos[x]\)\/\(1 + a\^2 - 2\ a\ Cos[x]\)\)
(* Now integrate with respect to x *)
In[414]:=
s[a_] := Integrate[m[a, x], {x, 0, \[Pi]}]
(* Mathematica is happy to have no problems here!
Simplifying helps to get a simple result: *)
In[427]:=
s[a] // Simplify // PowerExpand // Simplify
Out[427]=
\!\(\(2\ \[Pi]\)\/a\)
(* Integration by hand would be obvious. Mathematica still makes things
more complicated at first sight. But Simplifying again leads to the
expected final result: *)
In[434]:=
t[a] := Integrate[s[y], y] /. y -> a // Simplify // PowerExpand
In[435]:=
t[a]
Out[435]=
2 \[Pi] Log[a]
(****************************)
(* end
(****************************)
Ersek, Ted R wrote:
> At http://mathworld.wolfram.com/LeibnizIntegralRule.html
> I learned that
> Integrate[Log[1-2a Cos[x]+a^2],{x,0,Pi}]
> = 2*Pi*Log[Abs[a]]
>
> Mathematica knows how to do this integral, but gives a much more complicated
> result. Can anyone explain how to use FullSimplify and other
> transformations to show that the complicated result Mathematica gives is
> equivalent to the answer above?
>
> Thanks,
> Ted Ersek
>
>
>