[LON-CAPA-users] Having an equation or a range as a response

Seema Ali sali at vsb.bc.ca
Fri Jan 20 13:49:11 EST 2012


I'm also super new to Maxima, but can it factor out constants from an expression?  Or could you create a fraction between the left and right side, reduce it and then see if it is the simplified version? Of course being carfeul not to divide by zero.  
 
 

________________________________

From: lon-capa-users-bounces at mail.lon-capa.org on behalf of Gerd Kortemeyer
Sent: Fri 1/20/2012 4:10 AM
To: Discussion list for LON-CAPA users
Subject: Re: [LON-CAPA-users] Having an equation or a range as a response



Hi,

On Jan 20, 2012, at 1:03 AM, Seema Ali wrote:

> Thank you Gerd!
>
> That worked well. I changed one of the lines to
> if (&cas('maxima',"($left)-($b)-(y-$right)") eq '0') { return 'EXACT_ANS'; }
>
> Just in case someone decides to enter 8=y. =]

It's still not perfect. What if they enter 2y=16? The current algorithm only deals with stuff like y+2=10.

I am very busy at the moment, but at some point in time, I want to look at doing this in a general way. I filed a bug against myself, http://bugs.lon-capa.org/show_bug.cgi?id=6550 - trivial this is not, unless I am missing something.

- Gerd.
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20120120/dd521fbc/attachment.html>


More information about the LON-CAPA-users mailing list