A CAS that solves equations using the same techniques that humans use

52 views
Skip to first unread message

Ted Kosan

unread,
Mar 11, 2013, 4:49:27 AM3/11/13
to khanacademy...@googlegroups.com
Over the past year, I have been experimenting with giving the
MathPiper computer algebra system (CAS) the ability to solve equations
using the same step-by-step techniques that humans typically use. Here
are some examples of it solving equations that contain only one
instance of the unknown:

http://206.21.94.61/tkosan/expressiontreemath2/


I have also given the CAS the ability to show expression tree versions
of the equations because the following research paper indicates that
students often have difficulty visualizing the structure of
expressions and equations:

http://pat-thompson.net/PDFversions/1987StrucInAlg.pdf

Here are a couple of paragraphs from this paper:

“Typical errors found in previous studies of students' errors in
algebra suggest that students studying algebra frequently fail to
realize that formulas in mathematical symbol systems have an intrinsic
structure. In algebra, expressions are structured explicitly by the
use of parentheses, and implicitly by assuming conventions for the
order in which we perform arithmetic operations. It is hypothesized
that many of students' errors in manipulating an algebraic expression
are due to their inattention to the expression's structure.”

“Finally, it should be noted that in eight days of instruction these
leaving-seventh grade students went from essentially no working
knowledge of order of operations to deriving algebraic identities, and
did so with some depth of understanding. Even with the limitations
stated earlier in this discussion, the fact that such coverage is
possible makes us question assumptions that are built into traditional
junior high school pre-algebra and algebra curricula about what one
can expect of junior high school students in the United States.”


A math teacher and myself recently had his students experiment with
the step-by-step equation solver. Here is what they thought about it:

============ Student Responses

1) I think that it shows finding the value of 'x' quite well because
it takes us through the order of operations without having us to
memorize PEMDAS. Basically, it makes solving an equation more clear.

2) It all makes sense.

3) I think it is smart that it shows the steps and it all makes sense.
I think that this is a very effective way to solve equations. The tree
diagram clearly demonstrates the relationship between the equation and
illustrates a clear understanding of the steps in the process.

4) How do you do this?

5) This is really neat! I enjoy the fact that the various operations
are not only expressed visually with the tree, but also expressed in
words.

6) This shows step by steps how to create a tree. It has great
explanation and images that make it easier for one to understand the
concept. I found it very helpful and clever.

7) I actually think its helpful because its shows the equation mapped
out on the tree. Rather then it just being numbers, its a visual to
help you understand the equation.

8) I personally do not think this is a good way to show the
function.The problem here is that the + and c together makes people
think that you are adding C.

9) It was very cool, it shows that he has been actively working on
this project, keep up the good work.

10) Very cool!

11) It is a lot more self-explanatory now. Before, I needed your
guidance to really understand it, but now it is very clear.

12) I think this makes sense and i like what he did with this. I think
that it is beneficial because the tree is helpful. The tree shows the
relationship and details of the equations.

13) I think the way the expression trees are explained is just a bit
confusing. your moving in the right direction, it is getter better and
better each revision. I think that it is pretty cool that this will
actually show you what to do and how to get the answer instead of just
handing you the answer.

14) Automate the solve equation process if it's not so already. Still
great piece of software. I think this is interesting... Of course, I
still find it easiest to do in your head, But I like that this shows
the order in which to do things. It is very clear: start at the top of
the tree and move down.

============

A minimal version of MathPiper is available on the above website if
anyone is interested in playing with its expression tree visualizer
and its step-by-step equation solver. The readme.txt file at the
bottom of the website contains instructions for installing and running
MathPiper.

I am also working on a JavaScript version of MathPiper that includes
the step-by-step equation solver.

Ted Kosan

Simon Gruening

unread,
May 21, 2014, 12:41:35 PM5/21/14
to khanacademy...@googlegroups.com
Hello,

I am interested in your project. 
I've read through the paper (among others) and I like the method.
Is it possible for me to grab the code anywhere?

Thank You
/ZC

Chris Sangwin

unread,
May 21, 2014, 12:59:29 PM5/21/14
to khanacademy...@googlegroups.com
Yes, the code is on github,


Please respect the licence (GPL) and let me have any changes, and extra features!  If you make any use of STACK it is very nice to know. it is also helpful for grant applications etc to demonstrate usage.

I'm happy to collaborate, indeed I'm currently working with some developers to extract a "STACK core" which is independent of Moodle, and which can be embedded in other things.  Please please please *don't* start on this without asking for what we have done so far.  I've had forks in the past.  They take years to merge back, if ever.....

Chris


--
You received this message because you are subscribed to the Google Groups "Khan Academy Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to khanacademy-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simon Gruening

unread,
May 22, 2014, 2:10:17 AM5/22/14
to khanacademy...@googlegroups.com
Perfect! Thank you Chris, I'll make sure to follow best contribution practices if I start hacking around on it =)
To unsubscribe from this group and stop receiving emails from it, send an email to khanacademy-developers+unsub...@googlegroups.com.

Ted Kosan

unread,
May 22, 2014, 2:56:10 AM5/22/14
to khanacademy...@googlegroups.com
Simon,

The following JavaScript application is designed to help people learn
about the structure that is associated with mathematical expressions:

http://patternmatics.com/test/expression_structure.html

It does this by using expression trees and LookSee diagrams.



An experimental step-by-step equation solver is contained in the
latest development release of the MathPiper CAS:

http://www.mathpiper.org/development-releases


The SolveSteps function is used to solve an equation with a single
unknown step-by-step:

Show(StepsView(SolveSteps( '((- a_) * b_ )/ c_ + d_ == e_, a_), ShowTree: True))


The solution that the above line of code produces is similar to the
following solution:

http://patternmatics.com/examples/expressions/stepbystep/single_unknown/example_1.png


Ted Kosan

Simon

unread,
May 23, 2014, 1:27:51 AM5/23/14
to khanacademy...@googlegroups.com
Hello Ted,

Your examples look extremely promising. Thank you for the short guide. I
wasn't aware of the development release nor that it also contains a bit
of what I am looking for. This is great!

Thanks Again,
Simon
Reply all
Reply to author
Forward
0 new messages