PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, October 17, 2022

[FIXED] How to simplify log(8)/log(2) in Maxima CAS?

 October 17, 2022     integer, logarithm, maxima     No comments   

Issue

I want to simplify log(8)/log(2)

I know that

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

it is possible in Maxima but not works for me:

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

I use:

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

but I think that it is not the best solution ( I work with integers)

Questions:

  1. How to do it ?
  2. Why it works in Maxima doc, but not in my Maxima ?

Solution

This works for me in Maxima 5.43.0:

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

Maxima says that

 -- 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.

In this context it factorizes the number 8 and then moves the power 3 outside of the logarithm, enabling cancellation of the remaining log of 2:

(%i3) radcan(log(8));
(%o3)                              3 log(2)


Answered By - jacob
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing