Hi,

I am using STACK for very basic questions where I need to take a lot of care with the feedback, and the difficulty, as far as my students are concerned, depends on the presentation. For instance the equation x^2 + 1 + 2x = 0 is a lot harder than the x^2 + 2x + 1 = 0, because many students will mix up the coefficients when they use the formula.

The challenge, now, is to make the question as general as possible while presenting expressions (from maxima) exactly as I want them. The problem comes up when coefficients may be negative. When I display a sum defined as a maxima expression the result looks too good, because maxima sorts the terms. If I write a sum of maxima expressions, I need to use parentheses to allow for negative numbers, but ideally I only want necessary parentheses and not superfluous ones. It would also be better to simplify to avoid unary signs without reorganising terms.

Does this problem have a solution? Is it possible to make inline TeX code conditional by using maxima logic? Any other approaches?

Obviously, I can restrict the range of parameters and create different questions for positive and negative ones, but I try to minimise the number of questions I have to maintain.