LCMSteps - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Student[Basics]

  

LCMSteps

  

generate steps for calculating the Least Common Multiple

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

LCMSteps( expr )

LCMSteps( expr, implicitmultiply = true )

Parameters

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

Description

• 

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.

Examples

withStudent:-Basics:

LCMSteps12,3,4

lcm12,3,4Prime factorize each term:12=2233=34=22Take each factor of the highest power and multiply223Simplify12

(1)

LCMSteps4,5,6

lcm4,5,6Prime factorize each term:4=225=56=23Take each factor of the highest power and multiply2235Simplify60

(2)

LCMStepslcm(6, 8) + lcm(4, 5) - 5

lcm6,8+lcm4,55Exmaine termlcm6,8Prime factorize each term:6=238=23Take each factor of the highest power and multiply233Simplify24This gives:24+lcm4,55Exmaine termlcm4,5Prime factorize each term:4=225=5Take each factor of the highest power and multiply225Simplify20This gives:24+205Simplify39

(3)

Compatibility

• 

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