Hi, I'm a math teacher wanting to insert some dynamic math into a website. What I'd like to achieve is to have a button that a student can press to randomly vary a question so that it's the same type of question, but with different numbers. For example,
Factor the quadratic expression of the form ax^2 + bx + c, where a = 1, and b and c are positive integers between 1 and 100, and such that the roots would be real whole numbers.
If I'm using MathML to encode the math (e.g., like the markup below), stored in a database (e.g., MySQL), how could I set things up so that the computer automatically and randomly varies the math expression in the way I described above? I don't know much about server-side scripting... could I achieve this with PHP? Or would this be more a job of JavaScript on the client side? I'm just looking for some advice to guide my choice of study path. Thank you
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mrow>
<mn>7</mn>
<mo>⁢</mo>
<mi>x</mi>
</mrow>
<mo>+</mo>
<mn>12</mn>
</mrow>
</math>