Text Entry for Symbolic Questions
Today we launched a new feature for Isaac, the ability to type answers to our symbolic questions. To do this, we had to build support for users opting in to new and experimental features like these; but we’ve now crossed this hurdle, and store this in the same way we store email preferences and subject interests.
If you’re interested in text entry for these questions, you’ll find a new tab on your My Account page called ‘Beta Features’. I feel we should be clear that these really will be experimental features; we can’t promise they will work on all browsers or won’t have bugs in. They are opt-in for a reason, but we’re confident they won’t prevent anyone from doing their homework!
Disclaimer aside; how do you start using the new feature once you’ve turned it on?
You can type a fairly standard maths syntax in the box, and we’re trying our best to be lenient when it’s unabiguous. It uses the same syntax that the equation editor generates; based around Python, but it will look familiar to anyone who has used Excel, Matlab or Wolfram|Alpha. There are some examples below, to give you an idea:
$ 2x + 3 $ | 2*x + 3 |
$ \cos(\theta) + i\sin(\theta) $ | cos(theta) + i*sin(theta) |
$ ax^{2} + bx + c $ | a*x**2 + b*x + c |
$ e^{i\pi} + 1 = 0 $ | e**(i*pi) + 1 == 0 |
$ E^{2} = p^{2}c^{2} + m^{2}c^{4} $ | E**2 == (p**2)(c**2) + (m**2)(c**4) |
$ v = \sqrt{v_{x}^{2} + v_{y}^{2}} $ | v == sqrt(v_x**2 + v_y**2) |
$ e^{x} \ge 1 + x $ | e**x >= 1 + x |
This is the standard syntax, but we realise that some people know other conventions, and so we also support the caret symbol for powers (like a^2
for $a^{2}$) and a single equals sign for equals (like V = I*R
for $V = IR$) since this is what most people expect!
As described in a a previous post, the equation editor already creates this Python-like text so we can check answers. This means that if you visit a question you’ve answered before using the equation editor you’ll see the automatically generated text already in the box. Likewise, if you’ve not attempted a question and aren’t sure what to type, you can use the equation editor and it will show you the text for next time. The automatically generated text errs on the side of caution and adds a lot more multiplication signs and brackets than you might actually type by hand. As an example, see an incorrect previous attempt at this question:
The text z + (z**(2))/(2) + (z**(3))/(3)
was generated by the equation editor, and you’ll notice the prolific use of brackets. The text z + z**2/2 + z**3/3
is exactly equivalent, although not very nice to read as a human! Powers bind more tightly than division, which binds more tightly than multiplication (think BODMAS). We suggest you use an appropriate number of brackets though!
One final note: whilst you can use the equation editor to get started and then edit the text in the box, but you can't type equations to then use in the editor.
EDIT: Now you can type an answer and then edit it!
As always, we welcome feedback on both the equation editor and the new text entry feature: drop us a message here!
James Sharkey
James is a physicist turned computer scientist, working both on physics and computing for Isaac