davidedc / Algebrite

Computer Algebra System in Javascript (Typescript)
http://algebrite.org
MIT License
955 stars 59 forks source link

How to identify if an expression given by a human is in its simplified form #165

Open chrisbansart opened 2 years ago

chrisbansart commented 2 years ago

Hi, First of all, I assume that it's not a specific Algebrite issue, but I wonder what is the best approach to know with Algebrite if an expression is simplified or not. I use Algebrite for pedagogical purpose and for instance, I'd like to give an expanded expression and ask learner to factorise it. In this context, how could I analyse the learner's answer with algebrite to assess his answer.

Thanks a lot Chris

murkle commented 2 years ago

That's very tricky using CAS systems. First you must define precisely what "factored" means. For example are you happy with these forms? (x-√2)(x+√2) (1/2)(x+1)(2x+2) 4(x+0.5)(x+0.5)

So it may not be simply enough to say "does it multiply out to give the same expression?"

chrisbansart commented 2 years ago

I fully agree "So it may not be simply enough to say "does it multiply out to give the same expression?"

As fully factorized, the expression must be in the form of a product of factors of non-zero degree where each of these factors could not be written as a product of two factors of non-zero degree.

In addition to that factorizations by constants are rather incidental and often unnecessary.

The issue is that several solutions are then acceptable:

For instance factorization of 2x²+6x+4 : both (2x+2)(x+2) and (x+1)(2x+4) could be considered as correct answers.

murkle commented 2 years ago

Personally I wouldn't accept those as "fully factored" and would insist on 3 factors thus 2(x+1)(x+2) 😁

You can look at something I made in 2009 (😮) - my first version did use a CAS but now it just does numeric checking which is actually robust enough for this http://www.mathlets.co.uk/factorise/?level=2

chrisbansart commented 2 years ago

Your 2009 work is really impressive ;-) I fully tested it. For a given polynom, I observed that 4(0.25x+1)(x+3) is considered as false whereas (x+4)(x+3) is considered as a correct answer. In my opinion the first answer is quite right although learner have probably overthaugth the factorisation rule. Is there any means with Algebrite to take into account this kind of answers, or maybe how to introduce a kind of thinness in assessment of a factorised expression to accept several close answers.