Format and Display of Steps - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[Basics]

  

OutputStepsRecord

  

format and/or display annotated steps

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

OutputStepsRecord(steps)

OutputStepsRecord(steps, options)

Parameters

steps

-

list of records

displaystyle=...

-

(optional) columns, compact, or linear

output=...

-

(optional) print, printf, typeset, canvas, script, list, record, link

animated=...

-

(optional) true or false

Description

• 

The OutputStepsRecord command is used to format and display a "steps" data structure, used by many of the internal Student commands for showing the steps of solving a math problem.  Such a command creates a list of Records containing "math" and "annotation"s, and this routine takes care of displaying those steps in a consistent way.

• 

The displaystyle option controls the layout of the content.  

  

When displaystyle=columns, substeps are split out into a second column to the right of the main steps.

  

When displaystyle=linear, annotations appear on their own line as a title, preceding the math for each step.

  

When displaystyle=compact, annotations appear on the same line, to the right of the math, except for annotations that introduce a series of substeps, which appear on their own line as a title.

• 

The output option controls the rendering mechanism and return value.

  

output=typeset is the default rendering mode when using the Standard Worksheet Interface.  It displays textbook style math in a layout according to displaystyle.

  

output=printf is the default rendering mode when using the Command-line version of Maple.  It displays ASCII style math notation, and is ideal for copy & paste into an email or text-based application.

  

output=print uses the print command to render output in a linear centered fashion.

  

output=canvas returns a XML string that can be used as part of a MapleLearn document.

  

output=link deploys the steps as a MapleLearn document and provides a web hyperlink to the document as output.

  

output=script returns a DocumentTools:-Canvas:-Script object.

  

output=record returns the input as a Record

  

output=list returns the input as a list of lists

  

When animated=true, the steps are shown one by one in a time-delayed fashion.  The default, animated=false, puts all of the steps on screen at once.

• 

This function is part of the Student:-Basics package.

Examples

withStudent:-Basics:

steps := [
  Record(math=<2*x+5*y=19,x-2*y=-4>,annotation="solve system"),
  Record(math=(x=2*y-4),annotation="solve equation 2 for x",
         substeps=[
             Record(math=(x-2*y=-4),annotation="equation 2"),
             Record(math=(x=-4+2*y),annotation=_MTEXT("add %1 to both sides",2*y))
         ]
  ),
  Record(math=(y=3),annotation="substitute value of x into equation 1 and solve",
         substeps=[
             Record(math=(2*x+5*y=19),annotation="equation 1"),
             Record(math=(2 %* (2*y-4)+5*y=19),annotation="sub in value for x"),
             Record(math=(4 %* y-8+5 %* y=19),annotation="expand"),
             Record(math=(9*y-8=19),annotation="collect"),
             Record(math=(9*y=27),annotation="add 8 to both sides"),
             Record(math=(y=3),annotation="divide both sides by 9")
         ]
  ),
  Record(math=(x=2 %* (3)-4),annotation=_MTEXT("substitute %1 into %2",y=3,x=2*y-4)),
  Record(math=(x=2),annotation="simplify"),
  Record(math=<x=2,y=3>,annotation="solution")
]:

OutputStepsRecordsteps

solve systemsolve equation 2 for xequation 2x2y=−4add2yto both sidesx=2y4substitute value of x into equation 1 and solveequation 12x+5y=19sub in value for x22y4+5y=19expand4y8+5y=19collect9y8=19add 8 to both sides9y=27divide both sides by 9y=3substitutey=3intox=2y4x=234simplifyx=2solution

(1)

OutputStepsRecordsteps&comma;displaystyle=columns

 

 

 

 

 

 

 

 

 

 

 

 

 

OutputStepsRecordsteps&comma;displaystyle=compact

solve systemsolve equation 2 for xx2y=−4equation 2x=2y4add2yto both sidessolve equation 2 for xx=2y4substitute value of x into equation 1 and solve2x+5y=19equation 122y4+5y=19sub in value for x4y8+5y=19expand9y8=19collect9y=27add 8 to both sidesy=3divide both sides by 9substitute value of x into equation 1 and solvey=3x=234substitutey=3intox=2y4x=2simplifysolution

(2)

OutputStepsRecordsteps&comma;output=printf

• solve system
        Vector(2, [2*x+5*y = 19,-2*y+x = -4])
▫        solve equation 2 for x
                ◦ equation 2
                -2*y+x = -4
                ◦ add 2*y to both sides
                x = 2*y-4
▫        substitute value of x into equation 1 and solve
                ◦ equation 1
                2*x+5*y = 19
                ◦ sub in value for x
                2*(2*y-4)+5*y = 19
                ◦ expand
                4*y+5*y-8 = 19
                ◦ collect
                9*y-8 = 19
                ◦ add 8 to both sides
                9*y = 27
                ◦ divide both sides by 9
                y = 3
• substitute y = 3 into x = 2*y-4
        x = 2*3-4
• simplify
        x = 2
• solution
        Vector(2, [x = 2,y = 3])

OutputStepsRecordsteps&comma;output=print

solve system

solve equation 2 for x

equation 2

x2y=−4

add 2*y to both sides

x=2y4

substitute value of x into equation 1 and solve

equation 1

2x+5y=19

sub in value for x

22y4+5y=19

expand

4y8+5y=19

collect

9y8=19

add 8 to both sides

9y=27

divide both sides by 9

y=3

substitute y = 3 into x = 2*y-4

x=234

simplify

x=2

solution

(3)

OutputStepsRecordsteps&comma;displaystyle=columns&comma;animated=true

OutputStepsRecordsteps&comma;output=link

https://learn.maplesoft.com/d/MRMJCMKFKIJGHNDPFOFRDJKMLFPHJIPTJHKHGJBHOSMILHKHIIAGLRLKHJFIIREHDMKPMRNQGMHOPRCQDQAGBLIPMPOFALPOMJJM

Compatibility

• 

The Student[Basics][OutputStepsRecord] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

• 

The Student[Basics][OutputStepsRecord] command was updated in Maple 2022.

• 

The animated option was introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

Student:-Basics

Student:-Basics:-SolveSteps