LinearSolveSteps - 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]

  

LinearSolveSteps

  

generate core steps for solving an equation for a given variable

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

LinearSolveSteps( expr, var )

LinearSolveSteps( expr, var, implicitmultiply = true )

Parameters

expr

-

equation or string containing an equation

var

-

symbol (variable to solve for)

implicitmultiply

-

(optional) true or false

Description

• 

The LinearSolveSteps command accepts a linear equation expr in the given variable, var, and displays the steps required to solve for that variable.

• 

Note that this command also accepts some nonlinear equations that can be reduced down to linear equations (in other words, you can isolate x on one side of the equation, and there is only one solution).

• 

If expr is a string, then it 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 string.  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.

• 

A step may show up where the expression is not obviously different from the previous step.  This can happen when the underlying data structure is transformed during the step, and it is not obvious that the resulting structure is the same as the original, but just expressed differently.  This becomes more apparent when looking at the inert form of the raw data.

• 

The return value is a module that display annotated steps by default.  This module also has callable methods and data members: data, numsteps, step, and toMathML.  

data: a numsteps x 2 array where column 1 is the inert-form expression, and column 2 is the annotation.  R:-data[1,1] is the original expression in inert form.

numsteps: the number of steps in the solution, including the original expression.  

step(i): a method for displaying individual steps.  Calling R:-step(i) displays the ith typeset expression and annotation.  Step 1 is the original expression.

toMathML(): a method for converting the sequence of steps and annotations into mathml.  The toMathML command optionally takes one or two arguments: (1) a filename, indicating the mathml should be written to the specified file, and (2) the option htmlheader=true, which also causes html tags to be written along with the mathml, thus generating a complete .html page that can be loaded in a browser.

• 

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

Examples

withStudent:-Basics:

LinearSolveStepsx+12yz=4y2z+3xy,x

x+12yz=4y2z+3xyx+12yz+−3xy=4y2z+3xy+−3xySubtract3xyfrom both sidesx+12yz+−3xy=4y2zSimplifyyx+12yzy+2yz−3x2yzy=4y2zFind common denominatoryx+1+2yz−3x2yzy=4y2zSum over common denominatoryx+y+2yz−3x2yzy=4y2zMultiply through:yx+1=yx+y6yzx+yx+y2yzy=4y2zReorder termsy6xz+x+1y2yz=4y2zFactor6xz+x+12yz=4y2zDivide6xz+x+12yz2yz=2yz4y2zMultiply rhs by denominator of lhs6xz+x+1=2yz4y2zSimplify6xz+x+11=2yz4y2z1Subtract1from both sides6xz+x=−1+2yz4y2zSimplify6xz+x=−1+8y3zzMultiply fraction6xz+x=−1+8y3divide6xz+x=8y31Reorder termsx16z=8y31Factorx16z16z=8y3116zDivide both sides by16zx=8y3116zSimplify

(1)

Note that the result is a module with callable methods

exLinearSolveSteps1x12=342x,x

ex1x12=342x1x12+12+2x=342x+12+2xAdd12+2xto both sides1x+2x=34+12Simplify3x=34+12Add terms3x=54Add termsx3=45Reciprocal of both sidesx33=345Multiply rhs by denominator of lhsx=125Simplify

(2)

ex:-numsteps

8

(3)

ex:-step2

1x12+12+2x=342x+12+2xAdd12+2xto both sides

(4)

ex:-toMathML

<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mi>x</mi></mrow></mfrac><mo>−</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mrow><mo>=</mo><mrow><mfrac><mrow><mn>3</mn></mrow><mrow><mn>4</mn></mrow></mfrac><mo>−</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac></mrow></mrow></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mi>x</mi></mrow></mfrac><mo>−</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac><mo>+</mo><mfenced><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac><mo>+</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac></mrow></mfenced></mrow><mo>=</mo><mrow><mfrac><mrow><mn>3</mn></mrow><mrow><mn>4</mn></mrow></mfrac><mo>−</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac><mo>+</mo><mfenced><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac><mo>+</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac></mrow></mfenced></mrow></mrow><mspace width='10px'><mtext color='blue'>( _MTEXTAdd %1 to both sides&comma;12+2x )</mtext></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mi>x</mi></mrow></mfrac><mo>+</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac></mrow><mo>=</mo><mrow><mfrac><mrow><mn>3</mn></mrow><mrow><mn>4</mn></mrow></mfrac><mo>+</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mrow><mspace width='10px'><mtext color='blue'>( Simplify )</mtext></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mfrac><mn>3</mn><mi>x</mi></mfrac><mo>=</mo><mrow><mfrac><mrow><mn>3</mn></mrow><mrow><mn>4</mn></mrow></mfrac><mo>+</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mrow><mspace width='10px'><mtext color='blue'>( Add terms )</mtext></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mfrac><mn>3</mn><mi>x</mi></mfrac><mo>=</mo><mfrac><mn>5</mn><mn>4</mn></mfrac></mrow><mspace width='10px'><mtext color='blue'>( Add terms )</mtext></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mfrac><mi>x</mi><mn>3</mn></mfrac><mo>=</mo><mfrac><mn>4</mn><mn>5</mn></mfrac></mrow><mspace width='10px'><mtext color='blue'>( Reciprocal of both sides )</mtext></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mrow><mfrac><mi>x</mi><mn>3</mn></mfrac><mo> </mo><mn>3</mn></mrow><mo>=</mo><mrow><mn>3</mn><mo> </mo><mfenced><mfrac><mn>4</mn><mn>5</mn></mfrac></mfenced></mrow></mrow><mspace width='10px'><mtext color='blue'>( Multiply rhs by denominator of lhs )</mtext></mstyle></math> <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle scriptminsize='8.0pt'><mrow><mi>x</mi><mo>=</mo><mfrac><mn>12</mn><mn>5</mn></mfrac></mrow><mspace width='10px'><mtext color='blue'>( Simplify )</mtext></mstyle></math>

(5)

The input can be a string, which prevents automatic simplification

LinearSolveStepsx + 3^2 = 12&comma;x

x+32=12x+3232=1232Subtract32from both sidesx=1232Simplifyx=129Evaluate powerx=3Add terms

(6)

The implicitmultiply option allows shorthand for string input.

LinearSolveSteps3(x-2) = 0&comma;x&comma;implicitmultiply

3x2=03x6=0Multiply through:3x2=3x63x6+6=0+6Add6to both sides3x=6Simplify3x3=63Divide both sides by3x=2Simplify

(7)

Compatibility

• 

The Student[Basics][LinearSolveSteps] command was introduced in Maple 18.

• 

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

See Also

Student:-Basics

Student:-Basics:-SolveSteps

Student:-Calculus1:-ShowSolution

Student:-Calculus1:-ShowSteps

updates,Maple18,StudentBasics