Desmos Graphing Calculator – HTML5 with LaTeX editor
desmos.com
desmos.com
Our biggest goal with the calculator has been to make it easy to immediately see the consequences of changing part of an expression, or changing a parameter in an expression. When you remove the friction, this feels like exploring.
Happy to answer any questions.
Edit: For the tech crowd, I'll play the "what happens when you type a key on google.com?" game, only for Desmos:
1. Your keystroke is interpreted and typeset by the awesome, open source math typesetting library MathQuill: http://mathquill.com/
2. Mathquill notifies us that an expression has changed, and gives us a new LaTeX representation of it.
3. We send this new expression to a webworker, where we do all of our math processing. This lets us avoid blocking the UI thread, even if the user asks us to do something like a sum from one to a billion.
4. In the webworker, the expression LaTeX is parsed and analyzed for dependencies, variable assignments, and function definitions. We mark any other expressions that depend on symbols it exports as dirty, so that we can also reanalyze and replot them.
5. We compile the parsed expression (and any other expressions that need to be updated) to javascript by calling "new Function()" on a string representation. Since we need to evaluate these functions at thousands of points for plotting, we've found this to be much more efficient than an interpreter.
6. We plot all plottable functions (explicit functions of one variable, implicit functions of two variables, parametric equations, polar equations, inequalities, etc.), and analyze them for discontinuities and points of interest like minima, maxima, and zeros.
7. We send a representation of the plotted curves back from the webworker to the frontend, and they are plotted on the graph paper using the HTML5 canvas API.
You seem to be doing that for a few other things already, e.g. >= changes into ≥.
I actually like Word's way of getting upright text (and thus without the math spacing/kerning) by using double quotes around something better than using \mathrm. That may well be subjective, though (but it is shorter).
On the note of double-quotes: I am using US International, which has quite a few dead keys: ', ", ^, ~. Usually (on Windows, at least), you get the bare character (without combining it with anything) by typing "+space, which doesn't work in MathQuill, it simply swallows it. The same issue may well happen for a subset of those characters in other European keyboard layouts. Especially ' (used for primes) is a common dead key.
In any case, MathQuill seems amazing and a good step forward in my eyes. I know my way around LaTeX, but managed to take notes in math lectures with Word faster and with fewer errors, simply due to the fact that (a) the language is much nicer to type (especially with non-US keyboard layouts due to needing far fewer braces and backslashes), and (b) you immediately see what you get. Both things I find handled considerably better in Word than in LaTeX (Lyx might be an option for (b), granted). So thank you for creating MathQuill and making it awesome (instead of just delegating to MathJax on every keystroke ;-))
Generally, Word's math markup is described in UTN #28: http://unicode.org/notes/tn28/ so it's for the most part openly documented, along with reasons why certain defaults or behaviours were chosen.
1. Is there a way to do integrals? Are there plans to add that support?
2. Though the UI doesn't block up when you do a large calculation, the calculations do. e.g. I try to sum from 0 to 10^20, then realize I just wanted to sum 0 to 20. If I change the equation, it seems like it has to complete the first calculation to get to the new calculation.
We don't do integrals right now, but I hope we'll be able to add them at some point. It can be pretty tricky to do integrals accurately for non-smooth or highly oscillatory functions. Here's a graph I made recently exploring an interesting numerical integration technique called tanh-sinh quadrature:
https://www.desmos.com/calculator/jg4wamuwde
2. ... If I change the equation, it seems like it has to complete the first calculation to get to the new calculation.
Right, we currently wait for existing calculations to finish before starting new ones. We've experimented with strategies for killing calculations that look like they're hung, but we don't do anything like that right now. Killing and respawning webworkers is expensive and has been crashy in various browsers at various times, and short of that, it's hard to stop calculations midway through.
It's also easy for me to suggest more work for you!
Are you asking about numerically solving systems of equations? Or 3D plotting? We might do one or both of those at some point, but they aren't on the near term road map.
[disclaimer: I work at desmos]
What are you guys planning on doing next?
One of the big things that we've been working on is building interactive lessons that a whole classroom can do together:
Some of these use the calculator as a tool, and they all generally keep with the spirit of trying to make it cheap to try out an idea and see what it implies.
How do you guys pay the bills with no premium features like all the other calculators on the app store?
We license our calculator API to people who want to use it to make math content, or integrate it as a tool for students into their books, exercises, assessments, etc.
\sin \left(x^2+y^2\right)\cdot \left(y^{32}\ -\ x^{32}\ -x\cdot y\right)\ \ =\ 0
EDIT: also
\sin \left(x^2\ \ +y^2\right)\left(y^{32}\ -\ x^{32}\ -x\cdot y\right)\cdot \left(\frac{\left(x-y\right)}{\left(x-y\right)^2}\cdot \frac{\left(y+x\right)}{\left(y+x\right)^2}\ \right)\ =\ 0
Initial things I like:
- Latex representation
- Ability to save expressions
- Pretty UI
Initial issues:
- Keyboard shortcuts. I cannot jump to start/end of line.
- Copy/paste. I get something like this when copying an expression: "\sqrt{\left(x\right)}"
All in all: great job!
\sqrt{\left(x\right)} is LaTeX. What would you prefer it to copy-paste as?
Desmos Graphing Calculator by Desmos https://appsto.re/us/Kl-8M.i