Student[Basics]
LinearSolveSteps
generate core steps for solving an equation for a given variable
Calling Sequence
Parameters
Description
Examples
Compatibility
LinearSolveSteps( expr, var )
LinearSolveSteps( expr, var, implicitmultiply = true )
expr
-
equation or string containing an equation
var
symbol (variable to solve for)
implicitmultiply
(optional) true or false
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.
with⁡Student:-Basics:
LinearSolveSteps⁡x+12⁢y⁢z=4⁢y2z+3⁢xy,x
x+12⋅y⋅z=4⋅y2z+3⋅xyx+12⋅y⋅z+−3⋅xy=4⋅y2z+3⋅xy+−3⋅xySubtract3⋅xyfrom both sidesx+12⋅y⋅z+−3⋅xy=4⋅y2zSimplifyy⋅x+12⋅y⋅z⋅y+2⋅y⋅z⋅−3⋅x2⋅y⋅z⋅y=4⋅y2zFind common denominatory⋅x+1+2⋅y⋅z⋅−3⋅x2⋅y⋅z⋅y=4⋅y2zSum over common denominatory⁢x+y+2⋅y⋅z⋅−3⋅x2⋅y⋅z⋅y=4⋅y2zMultiply through:y⋅x+1=y⁢x+y−6⁢y⁢z⁢x+y⁢x+y2⋅y⋅z⋅y=4⋅y2zReorder termsy⋅−6⁢x⁢z+x+1y⋅2⁢y⁢z=4⋅y2zFactor−6⁢x⁢z+x+12⁢y⁢z=4⋅y2zDivide−6⁢x⁢z+x+12⁢y⁢z⋅2⁢y⁢z=2⁢y⁢z⋅4⋅y2zMultiply rhs by denominator of lhs−6⁢x⁢z+x+1=2⁢y⁢z⋅4⋅y2zSimplify−6⁢x⁢z+x+1−1=2⁢y⁢z⋅4⋅y2z−1Subtract1from both sides−6⁢x⁢z+x=−1+2⁢y⁢z⋅4⋅y2zSimplify−6⁢x⁢z+x=−1+8⁢y3⁢zzMultiply fraction−6⁢x⁢z+x=−1+8⁢y3divide−6⁢x⁢z+x=8⁢y3−1Reorder termsx⋅1−6⁢z=8⁢y3−1Factorx⋅1−6⁢z1−6⁢z=8⁢y3−11−6⁢zDivide both sides by1−6⁢zx=8⋅y3−11−6⋅zSimplify
Note that the result is a module with callable methods
ex≔LinearSolveSteps⁡1x−12=34−2x,x
ex≔1x−12=34−2x1x−12+12+2x=34−2x+12+2xAdd12+2xto both sides1x+2x=34+12Simplify3x=34+12Add terms3x=54Add termsx3=45Reciprocal of both sidesx3⋅3=3⋅45Multiply rhs by denominator of lhsx=125Simplify
ex:-numsteps
8
ex:-step⁡2
1x−12+12+2x=34−2x+12+2xAdd12+2xto both sides
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'>( ‖_MTEXT⁡Add %1 to both sides,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>
The input can be a string, which prevents automatic simplification
LinearSolveSteps⁡x + 3^2 = 12,x
x+32=12x+32−32=12−32Subtract32from both sidesx=12−32Simplifyx=12−9Evaluate powerx=3Add terms
The implicitmultiply option allows shorthand for string input.
LinearSolveSteps⁡3(x-2) = 0,x,implicitmultiply
3⋅x−2=03⁢x−6=0Multiply through:3⋅x−2=3⁢x−63⁢x−6+6=0+6Add6to both sides3⁢x=6Simplify3⋅x3=63Divide both sides by3x=2Simplify
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
Download Help Document