When WeBWorK first came about there were not a lot of good options for an open-source CAS with which to integrate, and at that point using a CAS to check if two expressions were equivalent was notoriously unreliable.

Things have changed a lot since then, and I see the value of having access to a CAS from within WeBWorK problems. As you pointed out, there is some integration with Sage available, and there is also integration with R available. I haven't really played with the Sage integration, but I know that you can access R from within an answer checker.

I think you've hit on the biggest challenge, which is getting the syntax to play nice between the two systems. MathObjects generates both a normal string and a LaTeX string for any object. For Formula objects the normal string is basically "calculator notation", so I would expect that this could be passed to a CAS as-is and be interpreted correctly, and as long as the CAS outputted similar notation, the output from the CAS could be passed to Compute(). If you have specific needs or ideas you can post them here or as a GitHub discussion.

Looking quickly at your sample problem, some of the things you are doing there could be useful as methods in PG. For example checking that two functions are equivalent up to an additive constant is already available as an answer checker, but not as a standalone method within a custom checker. Your checkMultAdd is virtually identical to a code snippet that I use in differential equations problems, so making this a MathObjects method could be useful as well.

With WeBWorK being open source, if you have improvements that you have made to the code, please submit a pull request on GitHub so that they can be considered for inclusion in the code base.

### Re: Why aren't math objects hooked up to a CAS?

by Danny Glin -
In reply to Danny Glin
Saturday, 12 November 2022, 5:54 AM

### Re: Why aren't math objects hooked up to a CAS?

by Nikola Kuzmanovski -The UNL math department will most likely contribute our own problems and methods in the near future to be considered for inclusion in the code base. Some people have started using some of my partial credit checkers in the department here, and it only makes sense to make them available instead of copying them from course to course.