Student[Basics]
LCMSteps
generate steps for calculating the Least Common Multiple
Calling Sequence
Parameters
Description
Examples
Compatibility
LCMSteps( expr )
LCMSteps( expr, implicitmultiply = true )
expr
-
list of integers or strings, sequence of integers, or an expression that contains %lcm(...)
implicitmultiply
(optional) truefalse
output = ...
(optional) option to control the return value
displaystyle = ...
(optional) option to control the layout of the steps
The LCMSteps command accepts a list or sequence of integers, or an expression that contains %lcm, and gives steps for calculating the Least Common Multiple (or Lowest Common Multiple). It calculates these steps by prime factorization.
When expr is a list, one or more elements of the list can be given as a string. In this case, the string is parsed into an expression using InertForm:-Parse so that no automatic simplifications are applied, and thus no steps are missed.
The implicitmultiply option is only relevant when expr is a list of strings. This option is passed directly on to the InertForm:-Parse command and will cause things like 2x to be interpreted as 2*x, but also, xyz to be interpreted as x*y*z.
The output and displaystyle options are described in Student:-Basics:-OutputStepsRecord. The return value is controlled by the output option.
This function is part of the Student:-Basics package.
with⁡Student:-Basics:
LCMSteps⁡12,3,4
lcm⁡12,3,4•Prime factorize each term:12=22⁢33=34=22•Take each factor of the highest power and multiply22⁢3•Simplify12
LCMSteps⁡4,5,6
lcm⁡4,5,6•Prime factorize each term:4=225=56=2⁢3•Take each factor of the highest power and multiply22⁢3⁢5•Simplify60
LCMSteps⁡lcm(6, 8) + lcm(4, 5) - 5
lcm⁡6,8+lcm⁡4,5−5•Exmaine termlcm⁡6,8•Prime factorize each term:6=2⁢38=23•Take each factor of the highest power and multiply23⁢3•Simplify24•This gives:24+lcm⁡4,5−5•Exmaine termlcm⁡4,5•Prime factorize each term:4=225=5•Take each factor of the highest power and multiply22⁢5•Simplify20•This gives:24+20−5•Simplify39
The Student:-Basics:-LCMSteps command was introduced in Maple 2024.
For more information on Maple 2024 changes, see Updates in Maple 2024.
See Also
ilcm
Student:-Basics
Student:-Basics:-FactorSteps
Student:-Basics:-GCDSteps
Download Help Document