• To: mathgroup at smc.vnet.net
• Subject: [mg71481] Re: Why does this lead to an answer with complex numbers?
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Mon, 20 Nov 2006 06:17:15 -0500 (EST)
• Organization: The Open University, Milton Keynes, UK
• References: <ejosmm\$n3k\$1@smc.vnet.net> <ejrmr9\$97b\$1@smc.vnet.net>

```aaronfude at gmail.com wrote:
> Hi,
>
> Thanks for all the answers. They were all very useful, even though I
> have done my best to confuse everyone by leaving a beta in there which
> had nothing to do with the problem.
>
> So I understand that the answer may be complex and the complex part is
> constant which is in a certain sense valid for a indefinite integral.
> But I very much need a real answer and I still can't quite extract.
> Consider the following:
>
> \!\(\(\(\ \)\(Assuming[x > 0 && A > 0 && B > 0 && \ B < 1, \
>     FullSimplify[Integrate[Log[\@\(A^2 + x\^2\) - B*x\ ], \ x]]]\)\)\)
>
> The answer that I get is correct, but not very useful since it is
> appears complex and I could find a way to determine the real part. Do
> you have any suggestions?
>
>
> Thank you!
>
> Aaron Fude
>

Hi Aaron,

What version of Mathematica do you use? With Mathematica 5.2 I do not
get any complex numbers for your integral.

In[1]:=
Assuming[x > 0 && A > 0 && B > 0 && B < 1,
FullSimplify[Integrate[Log[Sqrt[A^2 + x^2] - B*x], x]]]

Out[1]=
1                      2                           2    2
--------------- (2 Sqrt[-1 + B ] x (-1 + Log[-B x + Sqrt[A  + x ]]) +
2
2 Sqrt[-1 + B ]

2
Sqrt[-1 + B ] x
A (2 ArcTanh[---------------] - 4 Log[A] - 4 Log[B] +
A

2                2    2
4 (-1 + B) (1 + B) (A Sqrt[-1 + B ] - x + B Sqrt[A  + x ])

Log[-(----------------------------------------------------------)] +
2           2
A Sqrt[-1 + B ] + (-1 + B ) x

2                2                2    2
(-1 + B ) (A Sqrt[-1 + B ] + x + B Sqrt[A  + x ])
Log[-------------------------------------------------]))
2         2
A Sqrt[-1 + B ] + x - B  x

In[2]:=
FreeQ[%, I]

Out[2]=
True

In[3]:=
Assuming[x > 0 && A > 0 && B > 0 && B < 1,
Integrate[Log[Sqrt[A^2 + x^2] - B*x], x]]

Out[3]=
2
1                       2                  Sqrt[-1 + B ] x
--------------- (-2 Sqrt[-1 + B ] x + 2 A ArcTanh[---------------] +
2                                           A
2 Sqrt[-1 + B ]

2                     2    2
2 Sqrt[-1 + B ] x Log[-B x + Sqrt[A  + x ]] +

2                2                2    2
2 (-1 + B ) (A Sqrt[-1 + B ] - x + B Sqrt[A  + x ])
A Log[-(---------------------------------------------------)] +
2  2               2           2
A  B  (A Sqrt[-1 + B ] + (-1 + B ) x)

2                2                2    2
2 (-1 + B ) (A Sqrt[-1 + B ] + x + B Sqrt[A  + x ])
A Log[---------------------------------------------------])
2  2               2         2
A  B  (A Sqrt[-1 + B ] + x - B  x)

In[4]:=
FreeQ[%, I]

Out[4]=
True

In[5]:=
Integrate[Log[Sqrt[A^2 + x^2] - B*x], x]

Out[5]=
2
1                       2                  Sqrt[-1 + B ] x
--------------- (-2 Sqrt[-1 + B ] x + 2 A ArcTanh[---------------] +
2                                           A
2 Sqrt[-1 + B ]

2                     2    2
2 Sqrt[-1 + B ] x Log[-B x + Sqrt[A  + x ]] +

2                2                2    2
2 (-1 + B ) (A Sqrt[-1 + B ] - x + B Sqrt[A  + x ])
A Log[-(---------------------------------------------------)] +
2  2               2           2
A  B  (A Sqrt[-1 + B ] + (-1 + B ) x)

2                2                2    2
2 (-1 + B ) (A Sqrt[-1 + B ] + x + B Sqrt[A  + x ])
A Log[---------------------------------------------------])
2  2               2         2
A  B  (A Sqrt[-1 + B ] + x - B  x)

In[6]:=
FreeQ[%, I]

Out[6]=
True

In[7]:=
Assuming[x > 0 && A > 0 && B > 0 && B < 1, FullSimplify[%% == %%%% ==
%%%%%%]]

Out[7]=
True

In[8]:=
\$Version

Out[8]=
5.2 for Microsoft Windows (June 20, 2005)

Regards,
Jean-Marc

```

• Prev by Date: Re: plot question
• Next by Date: symbolic solution of ODE