@Robert-Stanyon I think someserver.com was a placeholder for your own domain ;)
Here is a link to an easy to use CDN where you can find most popular libraries (couldn't find JSmol though) cdnjs
@Robert-Stanyon I think someserver.com was a placeholder for your own domain ;)
Here is a link to an easy to use CDN where you can find most popular libraries (couldn't find JSmol though) cdnjs
When taking the gradient of a scalar function that has only 1 or 2 variables, it will return a vector of length 1 or 2. This will compare falsely with any vector of length 3. For example the gradient of the function "phi(x, y, z) = 2x + z" is "del phi = (2, 0, 1)", however when using the function "Student[VectorCalculus][Gradient]($function)" maple will return the vector "(2, 1)" plus a list "[x, z]" to specify which unit vectors those components were associated with. Obviously we want the student to be able to enter the former vector "(2, 0, 1)" as their answer, and so we would like the Gradient function to return a 0 for components that are zero, rather than discarding them.
To enforce this, use "Student[VectorCalculus][Gradient]($function, [x, y, z])" which will return a vector of length 3 even if some of the components are zero.
We often want to be able to write a question that accepts a list of numbers. The easiest way I've found to do this is using a maple-graded response area. A comma-separated sequence of numbers, e.g. "1, 0, -1" (without quotes) is called an expression sequence in Maple. An expression sequence can be used to initialise a list or set. For examples, if the student enters "1, 2, 3" (without quotes) into the response area, then {$RESPONSE} = {1, 2, 3}.
The reason we use sets rather than lists is that sets are unordered, so the student can enter "0, 1, -1" (without quotes) and it will be marked as correct.