[LON-CAPA-users] formula response with cas

H.K. Ng lon-capa-users@mail.lon-capa.org
Wed, 22 Oct 2008 10:43:40 -0400

Thanks for the feedback.

>H.K. Ng wrote:
>>I am writing some formula response problems and would like to use 
>>maxima to compare two algebraic expressions. Basically, the 
>>questions will ask the students to solve the problems algebraically 
>>and then enter the expression. Some questions:
>>1. What is the maxima function to use in this case? Using Peter's 
>>writeup, ratsimp works but does not seem appropriate when it is a 
>>comparison of two expressions.
>>2. Also, reading Peter's writeup, it says that the expression is 
>>passed to &implicit_multiplication function so that it inserts the 
>>"*" symbol where a multiplication is implied. However, when I enter 
>>v^2+2g(a-b) it is not graded correctly. On the other hand 
>>v^2+2*g*(a-b) is graded correctly. What I am missing here?
>If you send me the code, I will have a look. Seems weird.

I found out the reason (after reading Justin's writeup) 2g(a-b) can 
be interpreted as 2 times the function g(a-b), so using g2(a-b) is 
ok. Maybe, we need a flag to indicate that these are all factors, no 
function in the implicit_multiplication call - to make it easier for 
the students??

>>3. How do I use greek symbols for an expression, both in the coded 
>>answers and as input in the answer box? Drag math does insert greek 
>>symbols but there doesn't seem to be a way to directly type it in?
>Within loncapa dragmath is configured to convert to maxima syntax. 
>maxima swallows almost every variable name. So using alpha, beta, 
>etc. would be fine. Problem is, you have tell non-dragmath users 
>that they have to enter alpha for \alpha etc.
>Along the road of this will be the question whether we should have a 
>loncapa standard on entering pi ...

I would definitely say that having a standard way of entering pi etc 
is preferred. However, as it stands now putting theta does not 
display the symbol (just the word). Is there a way to show the symbols?