如何在Maxima CAS中简化log(8)/ log(2)?

问题描述 投票:1回答:1

我想简化log(8)/ log(2)

我知道

log(8)/log(2) = log(2^3)/log(2) = 3*log(2)/log(2) = 3

可能in Maxima,但不适用于我:

Maxima 5.41.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) log(8)/log(2);
                                    log(8)
(%o1)                               ------
                                    log(2)
(%i2) logexpand;
(%o2)                                true
(%i3) log(2^3)/log(2);
(%o3)                               log(8)
                                    ------
                                    log(2)

我使用:

round(float(log(8)/log(2));

但是我认为这不是最佳解决方案(我使用整数)

integer logarithm maxima
1个回答
1
投票

这在Maxima 5.43.0中对我有效:

(%i1) radcan(log(8)/log(2));
(%o1)                                  3
(%i2) radcan(log(2^3)/log(2));
(%o2)                                  3

马克西玛说

 -- Function: radcan (<expr>)

     Simplifies <expr>, which can contain logs, exponentials, and
     radicals, by converting it into a form which is canonical over a
     large class of expressions and a given ordering of variables; that
     is, all functionally equivalent forms are mapped into a unique
     form.  For a somewhat larger class of expressions, 'radcan'
     produces a regular form.  Two equivalent expressions in this class
     do not necessarily have the same appearance, but their difference
     can be simplified by 'radcan' to zero.

在这种情况下,它将因数8分解,然后将幂3移到对数之外,从而可以消除2的剩余对数:

(%i3) radcan(log(8));
(%o3)                              3 log(2)
© www.soinside.com 2019 - 2024. All rights reserved.