1
$\begingroup$

Suppose the function

f[Ss_,s2_,m_,m2_] = (12 s2 (2 s2^3-6 s2^2 Ss+3 s2 Ss^2+Ss^3) log((m2^2 s2)/(s2-m^2)^2)-12 log(s2/Ss) (s2 (2 s2^3-6 s2^2 Ss+3 s2 Ss^2-Ss^3)-3 s2 Ss^3 log((m2^2 s2)/(s2-m^2)^2))+s2 (46 s2^3-117 s2^2 Ss+72 s2 Ss^2-Ss^3))/(1152 \[Pi]^3 s2 Ss^3)

Is there any way to force the integral

Integrate[f[Ss,s2,m,m2], {s2, (m+m2)^2, Ss}, Assumptions -> Ss > (m+m2)^2 && m > m2 && m2 > 0]

which includes logarithms, to be displayed in the appropriate form with Log[a/b]?

The "nake" output contains pieces like

178 Ss^3 m^2 + 288 Ss^3 log^2(m + m2) m^2 + 
 72 Ss^3 log^2(m2 (2 m + m2)) m^2 - 72 Ss^3 log^2(1 - m^2/Ss) m^2 - 
 72 Ss^3 log^2(Ss) m^2 + 96 Ss^3 log(m + m2) m^2 + 
 144 Ss^3 log(2 m + m2) m^2 - 
 288 Ss^3 log(m + m2) log(2 m + m2) m^2 - 
 144 Ss^3 log(m2 (2 m + m2)) m^2 + 144 Ss^3 log(1 - m^2/Ss) m^2 + 
 24 Ss^3 log(m2^2/(m^2 - Ss)^2) m^2 + 48 Ss^3 log(Ss) m^2 - 
 144 Ss^3 log(m + m2) log(Ss) m^2 - 
 144 Ss^3 log(1 - m^2/Ss) log(Ss) m^2 - 
 72 Ss^3 log(m2^2/(m^2 - Ss)^2) log(Ss) m^2 + 
 144 Ss^3 PolyLog[2,-(m^2/(m2^2 + 2 m m2))] m^2 - 
 144 Ss^3 PolyLog[2,m^2/(m^2 - Ss)] m^2

and I even can't guess its compact form. (Added) By the compact form I mean precise constructions of the form Log[Ss/(Ss-m^2)], Log[m2^2/Ss]^2 and similar to these.

FullSimplify[]/. -Log[x_] + Log[y_] :> Log[y/x] doesn't work.

Input:

ln /: ln[x_] + ln[y_] := ln[x y]
ln /: ln[x_] - ln[y_] := ln[x/y]
f[Ss_, s2_, m_, m2_] = \!\(TraditionalForm\`
\*FractionBox[\(1\), \(1152\ 
\*SuperscriptBox[\(\[Pi]\), \(3\)]\ s2\ 
\*SuperscriptBox[\(Ss\), \(3\)]\)] \((12\ s2\ \((2\ 
\*SuperscriptBox[\(s2\), \(3\)] - 6\ 
\*SuperscriptBox[\(s2\), \(2\)]\ Ss + 3\ s2\ 
\*SuperscriptBox[\(Ss\), \(2\)] + 
\*SuperscriptBox[\(Ss\), \(3\)])\)\ Log[
\*FractionBox[\(
\*SuperscriptBox[\(m2\), \(2\)]\ s2\), 
SuperscriptBox[\((s2 - 
\*SuperscriptBox[\(m\), \(2\)])\), \(2\)]]] - 
      12\ Log[s2/Ss] \((\((s2 - 
\*SuperscriptBox[\(m\), \(2\)])\)\ \((2\ 
\*SuperscriptBox[\(s2\), \(3\)] - 6\ 
\*SuperscriptBox[\(s2\), \(2\)]\ Ss + 3\ s2\ 
\*SuperscriptBox[\(Ss\), \(2\)] - 
\*SuperscriptBox[\(Ss\), \(3\)])\) - 3\ s2\ 
\*SuperscriptBox[\(Ss\), \(3\)]\ Log[
\*FractionBox[\(
\*SuperscriptBox[\(m2\), \(2\)]\ s2\), 
SuperscriptBox[\((s2 - 
\*SuperscriptBox[\(m\), \(2\)])\), \(2\)]]])\) + \((s2 - 
\*SuperscriptBox[\(m\), \(2\)])\)\ \((46\ 
\*SuperscriptBox[\(s2\), \(3\)] - 117\ 
\*SuperscriptBox[\(s2\), \(2\)]\ Ss + 72\ s2\ 
\*SuperscriptBox[\(Ss\), \(2\)] - 
\*SuperscriptBox[\(Ss\), \(3\)])\))\)\)
G[Ss_, m_, m2_] = 
 Integrate[f[Ss, s2, m, m2], {s2, (m + m2)^2, Ss}, 
  Assumptions -> Ss > (m + m2)^2 && m > m2 && m2 > 0]
FullSimplify[G[Ss, m, m2] /. Log[$_] -> ln[$]] /. ln[$_] -> Log[$]
$\endgroup$
11
  • 1
    $\begingroup$ log is not the same as Log. log( ) is not the same as Log[ ]. $\endgroup$
    – bill s
    Aug 2, 2017 at 19:18
  • $\begingroup$ @bills: the same problem with Log remains, I've already tried to replace. $\endgroup$ Aug 2, 2017 at 19:37
  • 1
    $\begingroup$ @JohnTaylor the answer I gave on this question mathematica.stackexchange.com/questions/152801/… (edited) works. $\endgroup$
    – Andrew
    Aug 2, 2017 at 20:11
  • $\begingroup$ @Andrew : this sounds fine, and I'll try it now. $\endgroup$ Aug 2, 2017 at 20:14
  • 1
    $\begingroup$ res=Integrate[..]; FullSimplify[res /. Log[$_] -> ln[$]] /. ln[$_] -> Log[$] works for me. $\endgroup$
    – Andrew
    Aug 2, 2017 at 20:26

1 Answer 1

2
$\begingroup$

It seems that the answer is following.

First, instead of definite integration, let's perform indefinite integration. The reason is that the logs are collected in original function $f$, so the same thing is expected for its integral. After that, using Andrew's answer, one just takes the difference of the integral evaluated at boundary points. The total code is

ln /: ln[x_] + ln[y_] := ln[x y]
ln /: ln[x_] - ln[y_] := ln[x/y]
f[Ss,s2,...] = ...
G1[Ss, s2] = Integrate[f[...], s2]
G = FullSimplify[(G[Ss, Ss,...] - G[Ss, (m+m2)^2])/. Log[$_] -> ln[$]] /. ln[$_] -> Log[$]

The answer is almost perfect...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.