Showing students the steps in a problem from symbols, thru substituted values, to final answer

I have seen a number of forum questions concerning showing students the steps in a problem. There seems to be some confusion about how to do this reliabley and easily.

A method I have found useful is seen below:

First, define and display the expressions using all symbols for variables and parameters.

Second, store a list of substitutions which equates the symbols one will want to replace with numbers to the numbers BETWEEN BACKQUTES. Then use subs() or eval() and this list to see the same equations previously displayed but now with numbers where required. No arithmetic will be done with the "numbers" because, although they look like numbers to humans, to Maple they are unknown literal names due to the backquotes.

Third, store a list of substitutions which equates the same symbols as in the second step with actual numbers but WITHOUT BACKQUTES. This time the arithmetic will be done.

There are two things to be careful of here.

(1)If you define your expressions BEFORE you give values to the parameters then you can always change the parameter definitions amongst symbols, the literal numbers, and the real numbers and see the result using subs() or eval(), etc. BUT, if the expressions are defined after the parameters are given values, then these values, not the parameter names, are hard coded into the definition because Maple evaluates the expression before assigning it. Of course, if you put single quotes around the paramenter names when defining the expressions that postpones evaluation of the parameters and produces the same result as defining the expressions before giving values to the paramenters.

(2)If you use backquotes around the numbers, they are no longer numbers but literal names of variables which have no assigned value. Also you will not see the backquotes in output. However, this will not work with single quotes! It might seem to work if you write something like ln('5') because Maple will not evaluate ln() at integer values unless you apply evalf() to it. If you write ln('5.'), you will get a number, however.

Comments

Please Help Me, trying to show the steps in solving a problem

ok now I think i am just a little confused on the syntax to use in order to do what you are describing. I believe you are saying to leave the equation with all its variables in tact then substitute your values after defining the equation.

f := [z = (1+y+y^2-y^3)/(1-y)^3]

I am to pick a value for z between 0.601 and 0.899, I chose 0.8 since its as close to a solid number as I could get.

z := `0.8`

eval(f)

z := 0.8

eval(f)

hmmm still not solving or breaking down the problem

solve(f)

nope, still didnt get it broken down. just the three values of y...

As far as i can tell, I did it exactely how I was supposed to.
Thank you so much in advance for all your help.

Well I have been reading through the documentation and scouring the web for info and examples... I came up with nothing... its been like 12 hours... I got to sleep. I will see if I can figure it out again tomorrow... this program looks as though it can be used as a great learning tool.

It even says on the main site for maple 10, and this is a direct quote:

" More than just the answer
Maple 10, in addition to providing the answer, also displays all the required steps and the “thinking” behind the math problems you are facing.".

Stepping stones

Assuming that you want to show the steps in solving your equation, try this,

restart;
eq := [z = (1+y+y^2-y^3)/(1-y)^3];
eq := eval(eq,z=0.8);
solve(eq,y);

Hope this helps

J. Tarr

Run the following code, and

Run the following code, and I hope you will see what I mean. Because of what you are doing, it is necessary to add a few more ways of putting in unevaluated functions ('solve') and numbers (convert(..., symbol).

> eq := z = (1+y+y^2-y^3)/(1-y)^3;
y_sols := solve(subs(z = .8, eq), y):
'solve'(subs(z = `.8`, eq), y) = y_sols;
`check solutions:`;
for i from 1 to 3 do
y = [y_sols][i];
subs(z = `.8`, y = convert([y_sols][i], symbol), eq)
= subs(z = .8, y = [y_sols][i], eq);
end do;

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}