Hello,
I'm struggling to work out a correct pattern matching.
I want students to factorise a polynomial (in this case with complex
factors). So that they can't just write down the unfactorised
polynomial, I have pattern matching. It works well for real factors, but
I can't get it to work for complex factors.
I'm currently trying
(x+ `+- complex:$n)(x+ `+- complex:$n) `| (x- `+- complex:$n)(x-`+-
complex:$n) `| (x+`+- complex:$n)(x-`+- complex:$n)
but it does not accept for example (x-4i)(x+4i) nor things like
(x-(3-2i))(x-(3+2i)), with or without brackets around the complex number.
I've tried also the equivalent combinations with (x+ '+- $n) and with
(x+ ?) and I can't get anything to work.
Julia
--
www.julia-goedecke.de