[geogebra-cas] Re: MathPiper debugging update

  • From: Markus Hohenwarter <markus@xxxxxxxxxxxx>
  • To: geogebra-cas@xxxxxxxxxxxxx
  • Date: Wed, 8 Apr 2009 08:17:48 -0400

Dear Ted,

thank you for this update! I think this approach is very good and will
be extremely helpful for our 6-12 audience. Middle and high school
teachers have strong expectations about what should be the "right"
result for such algebraic transformations, so it's great that you are
trying to develop MathPiper into this direction.

Thanks,
Markus

On Wed, Apr 8, 2009 at 00:28, Ted Kosan <ted.kosan@xxxxxxxxx> wrote:
> Sherm and I have been collecting high school level math problems from
> textbooks as part of the process of debugging MathPiper.  We are
> comparing MathPiper's output to answers in the back of the books and
> to Maxima's output.   So far these tests have enabled us to identify
> the causes of a number of problems and we are in the process of fixing
> these problems.
>
> I have included one of the groups of test problems below in case
> anyone is interested in looking at it :-)
>
> Ted
>
>
> %mathpiper
> Echo("pp.105.  Perform the following additions.  Express each result
> in lowest terms. The letter symbols that appear represent positive
> integers.");
> NewLine();
>
>
> equations1 := {
> {2/3 + 5/3,"7/3"},
> 1/9 + 4/9 + 5/9,
> {2/7 + 3/7 + 5/7,"10/7"},
> a/y + b/y + c/y,
> {a/x + 3*a/x + 4*a/x,"8*a/x"},
> x/(x+y) + x/(x + y),
> {a/(a + 1) + 1/(a + 1),"1"},
> 2/3 + 4/5,
> {3 + 7/6 + 2/3,"29/6"},
> y/3 + 2*y/9,
> {3*y + y/5,"16*y/5"},
> x/2 + x/3 + x/4,
> {4/a + 3/(2*a),"11/(2*a)"},
> 1/a + 1/b + 1/c,
> {b*c + 1/c,"(b*c^2+1)/c"},
> x/(x+y) + 7,
> {1/(2*m) + (a + 3)/(4*m),"(a+5)/(4*m)"},
> 9/x^2 + 4/x,
> {a/(x + y) + b/(x + y),"(a+b)/(x+y)"},
> 1/a + 3/(a*b) + 2/b,
> {2*x/a + 3*y/b,"(2*b*x+3*a*y)/(a*b)"},
> 2/a + 7/(a*b*c) + 6/c,
> };
>
> count := 1;
> ForEach(e,equations1)
> [
>    If(IsList(e), [answer := e[2]; e := e[1];]);
>
>
>    Echo("#",count ,"Problem:   ",e,
> If(IsBound(answer),ToString()[WriteString("  Answer: "
> );Write(answer);Clear(answer);],"") );
>
>    //Echo(PrettyForm(e));
>
>    Echo("MathPiper:    ",Simplify(e));
>
>    me := ToString()[WriteString("ratsimp(");Write(e);WriteString(")");];
>    Echo("Maxima:",Maxima(me));
>
>    count := count + 1;
>
> ];
>
> count - 1;
>
> %/mathpiper
>
>    %output,preserve="false"
>      Result: 22
>
>      Side effects:
>      pp.105.  Perform the following additions.  Express each result
> in lowest terms. The letter symbols that appear represent positive
> integers.
>
>      #1 Problem:   7/3   Answer: "7/3"
>      MathPiper:    7/3
>      Maxima:(%o687) 7/3
>
>      #2 Problem:   10/9
>      MathPiper:    10/9
>      Maxima:(%o688) 10/9
>
>      #3 Problem:   10/7   Answer: "10/7"
>      MathPiper:    10/7
>      Maxima:(%o689) 10/7
>
>      #4 Problem:   (a+b+c)/y
>      MathPiper:    (a+b+c)/y
>      Maxima:(%o690) (c+b+a)/y
>
>      #5 Problem:   (8*a)/x   Answer: "8*a/x"
>      MathPiper:    (8*a)/x
>      Maxima:(%o691) 8*a/x
>
>      #6 Problem:   (2*x)/(x+y)
>      MathPiper:    (2*x)/(x+y)
>      Maxima:(%o692) 2*x/(y+x)
>
>      #7 Problem:   1   Answer: "1"
>      MathPiper:    1
>      Maxima:(%o693) 1
>
>      #8 Problem:   22/15
>      MathPiper:    22/15
>      Maxima:(%o694) 22/15
>
>      #9 Problem:   29/6   Answer: "29/6"
>      MathPiper:    29/6
>      Maxima:(%o695) 29/6
>
>      #10 Problem:   y/3+(2*y)/9
>      MathPiper:    (5*y)/9
>      Maxima:(%o696) 5*y/9
>
>      #11 Problem:   3*y+y/5   Answer: "16*y/5"
>      MathPiper:    (16*y)/5
>      Maxima:(%o697) 16*y/5
>
>      #12 Problem:   x/2+x/3+x/4
>      MathPiper:    (13*x)/12
>      Maxima:(%o698) 13*x/12
>
>      #13 Problem:   4/a+3/(2*a)   Answer: "11/(2*a)"
>      MathPiper:    (11*a)/(2*a^2)
>      Maxima:(%o699) 11/(2*a)
>
>      #14 Problem:   1/a+1/b+1/c
>      MathPiper:    (a*b+a*c+b*c)/(a*b*c)
>      Maxima:(%o700) ((b+a)*c+a*b)/(a*b*c)
>
>      #15 Problem:   b*c+1/c   Answer: "(b*c^2+1)/c"
>      MathPiper:    (b*c^2+1)/c
>      Maxima:(%o701) (b*c^2+1)/c
>
>      #16 Problem:   x/(x+y)+7
>      MathPiper:    (8*x+7*y)/(x+y)
>      Maxima:(%o702) (7*y+8*x)/(y+x)
>
>      #17 Problem:   1/(2*m)+(a+3)/(4*m)   Answer: "(a+5)/(4*m)"
>      MathPiper:    (m*a+5*m)/(4*m^2)
>      Maxima:(%o703) (a+5)/(4*m)
>
>      #18 Problem:   9/x^2+4/x
>      MathPiper:    (4*x^2+9*x)/x^3
>      Maxima:(%o704) (4*x+9)/x^2
>
>      #19 Problem:   (a+b)/(x+y)   Answer: "(a+b)/(x+y)"
>      MathPiper:    (a+b)/(x+y)
>      Maxima:(%o705) (b+a)/(y+x)
>
>      #20 Problem:   1/a+3/(a*b)+2/b
>      MathPiper:    (2*a^2*b+a*b^2+3*a*b)/(a^2*b^2)
>      Maxima:(%o706) (b+2*a+3)/(a*b)
>
>      #21 Problem:   (2*x)/a+(3*y)/b   Answer: "(2*b*x+3*a*y)/(a*b)"
>      MathPiper:    (2*x*b+3*a*y)/(a*b)
>      Maxima:(%o707) (3*a*y+2*b*x)/(a*b)
>
>      #22 Problem:   2/a+7/(a*b*c)+6/c
>      MathPiper:    (6*a^2*b*c+2*a*b*c^2+7*a*c)/(a^2*b*c^2)
>      Maxima:(%o708) (2*b*c+6*a*b+7)/(a*b*c)
> .   %/output
>
>



-- 
Markus Hohenwarter, PhD
Florida Center for Research in Science, Technology, Engineering, and Mathematics
Florida State University, www.fcrstem.org

GeoGebra: www.geogebra.org
IGI: www.geogebra.org/IGI
CPALMS: www.cpalms.org

Other related posts: