gpt4 book ai didi

integer - 如何简化Maxima CAS中的log(8)/log(2)?

转载 作者:行者123 更新时间:2023-12-02 17:36:50 25 4
gpt4 key购买 nike

我想简化 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)

(%i4) logexpand;
(%o4) true

我使用:

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

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

问题:

  1. 怎么做?
  2. 为什么有效 in Maxima doc ,但我的 Maxima 里没有?

最佳答案

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

关于integer - 如何简化Maxima CAS中的log(8)/log(2)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58436010/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com