## WeBWorK Problems

### MathObjects involving polar coordinates -- TeX format

by Dick Lane -
Number of replies: 3
I have no difficulty asking for, and then checking, a student answer involving a polar coordinate formula, f(theta), after  "Context() -> variables -> are( theta => 'Real' ) ;"  and a text note "Write ${LQ}theta${RQ} (without quotes) to enter $$\theta$$".

On the other hand, if I define/assign
\$F = Formula( "cos(theta)" ) ;
then the resulting TeX string is "\cos(theta)" rather than "\cos(\theta)".
Am I overlooking something fairly simple to fix this?

### Re: MathObjects involving polar coordinates -- TeX format

by Jason Aubrey -
Hi Dick,

I think

Context() -> variables -> set(theta=> {TeX=>'\theta'});

will do it.

Jason
You may want to make that TeX=>'\theta ' with a space. I don't remember whether the system will insert the space for you if the theta is followed by another letter, for example. It probably should, but my recollection is that it might not. You could test it by entering an answer of 'theta x' for example (but you'd also have to add the variable 'x'), and seeing if the typeset answer is properly processed or not.