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

4

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

我知道

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

在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)

(%i4) logexpand;
(%o4)                                true

我使用:

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

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

问题:

  1. 如何做到这一点?
  2. 为什么它在Maxima文档中有效,但在我的Maxima中无效?

https://dev59.com/tZXfa4cB1Zd3GeqPf4G0 - Adam
这个回答解决了你的问题吗?如何在Maxima中求对数? - jacob
2个回答

5

在Maxima 5.43.0中,这对我有效:

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

马克西玛(Maxima)表示:
 -- 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)

0

另一种方法:

log(8.0)/log(2.0); 3

为了举例说明,我在命令行中进行了计算。该结果显示在下面的图片中。

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接