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.
withStudent:-Basics:
LCMSteps12,3,4
lcm12,3,4•Prime factorize each term:12=2233=34=22•Take each factor of the highest power and multiply223•Simplify12
LCMSteps4,5,6
lcm4,5,6•Prime factorize each term:4=225=56=23•Take each factor of the highest power and multiply2235•Simplify60
LCMStepslcm(6, 8) + lcm(4, 5) - 5
lcm6,8+lcm4,5−5•Exmaine termlcm6,8•Prime factorize each term:6=238=23•Take each factor of the highest power and multiply233•Simplify24•This gives:24+lcm4,5−5•Exmaine termlcm4,5•Prime factorize each term:4=225=5•Take each factor of the highest power and multiply225•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