## 28 Reputation

18 years, 61 days

## improved code...

I want to tighten up the issue by posting a nicer (and stable) version of the question. Here the partial fraction decompostion in order to get \$ANSWER is not done by hand but left to Maple: question=Expand the following into partial fractions:
\$displayf=@ maple=evalb(\$ANSWER-\$RESPONSE=0);@ maple_answer=convert(\$f,parfrac);@ type=formula@ mode=Maple@ name=parfrac decompo@ editing=useHTML@ algorithm=\$dummy=range(1,2,1); \$gamma = range(0,1,1); \$A = range(-2,2,1); condition:not(eq(\$A,0)); \$B = range(1,2,1); condition:not(eq(\$B,0)); \$k = range(-2,2,1); \$l = range(-2,2,1); condition:not(eq(\$k,\$l)); \$alpha=if(eq(\$l,0),\$dummy,1); \$f = maple(" \$A/((\$k)+s)^(\$alpha) +(\$B)*s^(\$gamma)/((\$l)+s)"); \$displayf=maple("ff:=factor(\$f): printf( MathML:-ExportPresentation(expand(numer(ff))/expand(denom(ff))))");@ Note that it would not at all be helpful here to use simplify as in maple=evalb(simplify(\$ANSWER-\$RESPONSE)=0);@ The effect would be that the original expression, i.e. not decomposed into partial fraction, would be accepted as an correct answer. Thanks again to everybody for your help!!! Peter

## improved code...

I want to tighten up the issue by posting a nicer (and stable) version of the question. Here the partial fraction decompostion in order to get \$ANSWER is not done by hand but left to Maple: question=Expand the following into partial fractions:
\$displayf=@ maple=evalb(\$ANSWER-\$RESPONSE=0);@ maple_answer=convert(\$f,parfrac);@ type=formula@ mode=Maple@ name=parfrac decompo@ editing=useHTML@ algorithm=\$dummy=range(1,2,1); \$gamma = range(0,1,1); \$A = range(-2,2,1); condition:not(eq(\$A,0)); \$B = range(1,2,1); condition:not(eq(\$B,0)); \$k = range(-2,2,1); \$l = range(-2,2,1); condition:not(eq(\$k,\$l)); \$alpha=if(eq(\$l,0),\$dummy,1); \$f = maple(" \$A/((\$k)+s)^(\$alpha) +(\$B)*s^(\$gamma)/((\$l)+s)"); \$displayf=maple("ff:=factor(\$f): printf( MathML:-ExportPresentation(expand(numer(ff))/expand(denom(ff))))");@ Note that it would not at all be helpful here to use simplify as in maple=evalb(simplify(\$ANSWER-\$RESPONSE)=0);@ The effect would be that the original expression, i.e. not decomposed into partial fraction, would be accepted as an correct answer. Thanks again to everybody for your help!!! Peter

## Bug identified...

Thanks a lot! That's it. Yes, I knew about the safety rule to embrace each and every variable in MapleTA by parentheses. And yes, I forgot to do that in the case of \$alpha. I have meanwhile set MAPLE_DEBUG=true in /config/system.properties ( I STRONGLY RECOMMEND THAT TO EVERYBODY ) and got the following jvm 1 | From Maple --> on line 302, syntax error, `-` unexpected: jvm 1 | Maple computation syntax error: jvm 1 | e := exp(1) : protect('e') : -1/((-2)+s)^1 +(2)*s^-0/((1)+s); This clearly shows what is happening: The problem arises when \$alpha equals 0, which becomes -0 in MapleTA for some reasons. Then -0 is passed to Maple where s^-0 is indeed a syntax error. Whereas embracing \$alpha with parentheses leads to s^(-0) being passed to Maple in that case which will be evaluated as desired.

## Bug identified...

Thanks a lot! That's it. Yes, I knew about the safety rule to embrace each and every variable in MapleTA by parentheses. And yes, I forgot to do that in the case of \$alpha. I have meanwhile set MAPLE_DEBUG=true in /config/system.properties ( I STRONGLY RECOMMEND THAT TO EVERYBODY ) and got the following jvm 1 | From Maple --> on line 302, syntax error, `-` unexpected: jvm 1 | Maple computation syntax error: jvm 1 | e := exp(1) : protect('e') : -1/((-2)+s)^1 +(2)*s^-0/((1)+s); This clearly shows what is happening: The problem arises when \$alpha equals 0, which becomes -0 in MapleTA for some reasons. Then -0 is passed to Maple where s^-0 is indeed a syntax error. Whereas embracing \$alpha with parentheses leads to s^(-0) being passed to Maple in that case which will be evaluated as desired.

## ......

and now there should be the next paragraph and the system replies that the data is suspicious. Sorry for the mess. I am fighting with despairation.

## ......

and now there should be the next paragraph and the system replies that the data is suspicious. Sorry for the mess. I am fighting with despairation.

## yet another part...

This is the text I originally was unable to post: --- Quite often I receive complains by my students that they answered a question correctly but MapleTA did not assign any points. Unfortunately most of the time they are right! to be cont'd

## yet another part...

This is the text I originally was unable to post: --- Quite often I receive complains by my students that they answered a question correctly but MapleTA did not assign any points. Unfortunately most of the time they are right! to be cont'd

## My original posting...

I couldn't post so far. I always got the response "Terminated request because of suspicious input data". Even now it doesn't work with the text I intended to post.

## My original posting...

I couldn't post so far. I always got the response "Terminated request because of suspicious input data". Even now it doesn't work with the text I intended to post.

## Maybe my text is too long?...

So I am breaking in into parts: Here is the source code: question=Zerlegen Sie den folgenden Bruch in Partialbrüche:
\$displayf=@ maple=evalb(\$ANSWER-\$RESPONSE=0);@ maple_answer=\$A/((\$k)+s)^\$alpha +(\$B)*s^\$gamma/((\$l)+s);@ type=formula@ mode=Maple@ name=Partialbruchzerlegung2@ editing=useHTML@ algorithm=\$dummy=range(1,2,1); \$gamma = range(0,1,1); \$A = range(-2,2,1); condition:not(eq(\$A,0)); \$B = range(1,2,1); condition:not(eq(\$B,0)); \$k = range(-2,2,1); \$l = range(-2,2,1); condition:not(eq(\$k,\$l)); \$alpha=if(eq(\$l,0),\$dummy,1); \$f = maple(" \$A/((\$k)+s)^(\$alpha) +(\$B)*s^(\$gamma)/((\$l)+s)"); \$displayf=maple("ff:=factor(\$f): printf( MathML:-ExportPresentation(expand(numer(ff))/expand(denom(ff))))");@

## Maybe my text is too long?...

So I am breaking in into parts: Here is the source code: question=Zerlegen Sie den folgenden Bruch in Partialbrüche:
\$displayf=@ maple=evalb(\$ANSWER-\$RESPONSE=0);@ maple_answer=\$A/((\$k)+s)^\$alpha +(\$B)*s^\$gamma/((\$l)+s);@ type=formula@ mode=Maple@ name=Partialbruchzerlegung2@ editing=useHTML@ algorithm=\$dummy=range(1,2,1); \$gamma = range(0,1,1); \$A = range(-2,2,1); condition:not(eq(\$A,0)); \$B = range(1,2,1); condition:not(eq(\$B,0)); \$k = range(-2,2,1); \$l = range(-2,2,1); condition:not(eq(\$k,\$l)); \$alpha=if(eq(\$l,0),\$dummy,1); \$f = maple(" \$A/((\$k)+s)^(\$alpha) +(\$B)*s^(\$gamma)/((\$l)+s)"); \$displayf=maple("ff:=factor(\$f): printf( MathML:-ExportPresentation(expand(numer(ff))/expand(denom(ff))))");@

## another bit of it...

The question text in English would be someting like "Expand the following into partial fractions". The student's answer is obviously correct. Some remark on the umlaut problem: The German word "Partialbrüche" for partial fraction contains an umlaut, here ü, set as ü in html. Umlaute in their html form are displayed correctly within Maple T.A. initially, but sooner or later they are replaced by a question mark.
 1 2 Page 1 of 2
﻿