Function Repository Resource:

LogSimplify

Source Notebook

Attempt to simplify a numeric expression containing logarithms using integer relations

Contributed by: Eric Weisstein

ResourceFunction["LogSimplify"][expr]

attempts to simplify a numeric expression expr containing multiple Log terms, using integer relations among logarithms.

Examples

Basic Examples (2) 

Simplify an expression provided by Stephen Wolfram:

In[1]:=
rbar = 1/
    1296 (19 (-8 + 3 Sqrt[3]) Log[3] + 8 Log[7 - 4 Sqrt[3]] + 360 Sqrt[3] Log[4 - 2 Sqrt[3]] + 12 Log[2 - Sqrt[3]] - 780 Sqrt[3] Log[-1 + Sqrt[3]] + 308 Log[2 + Sqrt[3]] + 304 Log[-3 + 2 Sqrt[3]] + 6 Sqrt[3] (8 + 5 Log[-6 + 4 Sqrt[3]]));
ResourceFunction["LogSimplify"][rbar]
Out[1]=

Verify the identity numerically:

In[2]:=
N[rbar - %, 1000] // Quiet
Out[2]=

Applications (2) 

Simplify the expression obtained using the divergence theorem to find the mean square cylindrical radius of the tritetrahedron:

In[3]:=
rxy = 139/612 - Log[1 + Sqrt[2]]/(12 Sqrt[2]) + (24875 Log[2])/(3773184 Sqrt[
       34]) - (10195135 Log[3])/(7546368 Sqrt[34]) - (422649125 Log[
       5])/(384864768 Sqrt[34]) - (3125 Log[17])/(2829888 Sqrt[
       34]) + (6948125 Log[49 - 8 Sqrt[34]])/(22639104 Sqrt[
       34]) + (6125 Log[34 - 3 Sqrt[34]])/(314432 Sqrt[
       34]) - (3968125 Log[8 - Sqrt[34]])/(22639104 Sqrt[
       34]) + (106805 Log[-5 + Sqrt[34]])/(471648 Sqrt[
       34]) + (2172125 Log[-3 + Sqrt[34]])/(192432384 Sqrt[
       34]) + (5125 Log[2 + Sqrt[34]])/(36992 Sqrt[
       34]) + (64658875 Log[3 + Sqrt[34]])/(384864768 Sqrt[
       34]) + (111215005 Log[5 + Sqrt[34]])/(384864768 Sqrt[
       34]) + (483125 Log[8 + Sqrt[34]])/(22639104 Sqrt[
       34]) - (2875 Log[34 + 3 Sqrt[34]])/(166464 Sqrt[
       34]) + (183308125 Log[49 + 8 Sqrt[34]])/(384864768 Sqrt[
       34]) + (375 Log[34119931 + 5851502 Sqrt[34]])/(9248 Sqrt[
       34]) - (5125 Log[41847233 + 7176736 Sqrt[34]])/(332928 Sqrt[
       34]);
ResourceFunction["LogSimplify"][rxy]
Out[4]=

Verify this identity numerically:

In[5]:=
N[rxy - %, 1000] // Quiet
Out[5]=

The definite integral of a rational function:

In[6]:=
int = \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(1\)]\(
\*FractionBox[\(1 - 5 
\*SuperscriptBox[\(x\), \(3\)] + 
\*SuperscriptBox[\(x\), \(5\)]\), \(\(-8\) - 40\ x - 36\ 
\*SuperscriptBox[\(x\), \(2\)] + 13\ 
\*SuperscriptBox[\(x\), \(3\)] + 25\ 
\*SuperscriptBox[\(x\), \(4\)] + 9\ 
\*SuperscriptBox[\(x\), \(5\)] + 
\*SuperscriptBox[\(x\), \(6\)]\)] \[DifferentialD]x\)\)
Out[6]=

Simplify this expression:

In[7]:=
ResourceFunction["LogSimplify"][int] // FullSimplify
Out[7]=

Verify the identity numerically:

In[8]:=
N[int - %, 1000] // Quiet
Out[8]=

Properties and Relations (4) 

The function returns unevaluated when given a non-numeric argument:

In[9]:=
ResourceFunction["LogSimplify"][a + b Sqrt[2]]
Out[9]=

Arguments are evaluated according to the normal Wolfram Language evaluation rules:

In[10]:=
ResourceFunction["LogSimplify"][Log[E^2]]
Out[10]=
In[11]:=
ResourceFunction["LogSimplify"][2^10]
Out[11]=

If the evaluated argument contains fewer than two Log terms, the argument is returned unchanged:

In[12]:=
ResourceFunction["LogSimplify"][1234]
Out[12]=
In[13]:=
ResourceFunction["LogSimplify"][1 + Log[7]]
Out[13]=

If no relation is found among Log terms, the argument is returned unchanged:

In[14]:=
ResourceFunction["LogSimplify"][expr = \!\(TraditionalForm\`
\*FractionBox[\(12\ 
\*SqrtBox[\(3\)] - 4\ 
\*SqrtBox[\(7\)] - 3\ Log[3\ \((7 - 4\ 
\*SqrtBox[\(3\)])\)] + 6\ Log[\(-2\) + 
\*SqrtBox[\(7\)]]\), \(48\ 
\*SqrtBox[\(3\)]\)]\)]
Out[14]=

Publisher

Eric Weisstein

Requirements

Wolfram Language 12.3 (May 2021) or above

Version History

  • 1.0.0 – 18 August 2023

Source Metadata

Related Resources

Author Notes

This is based on an idea by Michael Trott.

License Information