4

Generally, I do all my math with pen and paper, and only when done, type it via LaTeX. The downsides to this are inefficiency (time taken to retype), difficulty of editing (lots of cross outs), and losing things that I end up not typing. With so many downsides, why do I do it? Because I need to actually see the figures in mathematical notation to think about them, and waiting for LaTeX to compile them breaks up my train of thought.

I've tried repeatedly to try to "think" with LaTeX symbols, and it's failed: I can reason about $x < f(\frac \alpha {e^ \sqrt y}) \implies y \in \mathbb Q$ but not about x < f(\frac \alpha {e^ \sqrt y) \implies y \in \mathbb Q.

Likewise, I've tried "being patient" and waiting for the LaTeX to compile, and found it prohibitively disruptive to try while I'm still thinking and exploring. Even the faster LaTeX previews make this hard - and for the slow ones, it's downright impossible.

Are there any means to do math via a computer? Are there tools or techniques designed for exploring math, as opposed to publishing or sharing it?

SRobertJames
  • 4,278
  • 1
  • 11
  • 27
  • 2
    This question could be on meta mse – Тyma Gaidash Dec 11 '22 at 23:17
  • 1
    For not too complex answers on MSE, I type in LaTeX directly. That is, answers that do not require too much trial and error: even if there are long formulas, straightforward computations can easily be done in LaTeX, and with some care you can make use of copy/paste to get it done faster. When I have to think for some time before finding the answer, I go back to pen & paper, at least until I have an idea of the final derivation. With real-time rendering, MathJax is much much more comfortable than "true" LaTeX (with a "compilation" step). – Jean-Claude Arbaut Dec 11 '22 at 23:26
  • Frame challenge: given how you've described your experience trying to do math with LaTeX, I don't think your current method is inefficient at all. – Greg Martin Dec 12 '22 at 05:35

3 Answers3

2

I am a thoroughly devoted fan of Mathematica, which allows one to input formulas in "mathematical" typography (rather than confusing "computer science" typography). (I'll teach a course on this starting next month.)

Unlike most tablets and such, Mathematica then performs the computations, thereby allowing you to think like a mathematician, without being burdened by long, error-prone hand calculation.

At the end, you can apply // TeXForm to an output to get LaTeX for pasting into documents such as scientific papers or homework assignments.

enter image description here

Or...

enter image description here

Try it... you'll never go back to pen and paper.


In a comment, the OP asks for an example showing how "mathematical" input is superior to traditional "computer science" input. OK, here is a "computer science" (code) term as input:

Surd[x + Surd[x^2 + Surd[x^3 + Surd[x^4 + Surd[x^5, 6], 5], 4], 3], 2]

It is confusing and hides the structure. And if you are missing a comma, or matching bracket, or have extra ones, or... it is very difficult to find such errors.

Here is the LaTeX version of that term:

\sqrt[2]{\sqrt[3]{x^2+\sqrt[4]{x^3+\sqrt[5]{\sqrt[6]{x^5}+x^4}}}+x}

Ugh!!!!!

By contrast, here is the "mathematical" (typeset) term in Mathematica as input:

enter image description here

If there is an error or improper syntax, you see it immediately.

Note that this is input and can be executed immediately.

SOOO much clearer. Typesetting input this way helps you copy equations from books or (gulp) paper-and-pencil hand calculation.

Make sense?

  • 1
    I've not used Mma for a long time, but if I remember correctly it's similar to Maple or Maxima wrt LaTeX output: I'm often not quite satisfied with how the formula is rendered (terms not sorted, simplification not the way I want it, etc.). It could be a starting point, but all in all, I prefer to type in LaTeX directly. – Jean-Claude Arbaut Dec 11 '22 at 23:38
  • 1
    Moreover, I'm not sure what you mean by "thinking like a mathematician", but I don't feel like letting a black box tell me the result with no reflection on my part. Especially considering that CAS have bugs: it's more an "assistant", that can help on some long computations, but which requires careful guiding and checking. – Jean-Claude Arbaut Dec 11 '22 at 23:38
  • Oh... such a common (mis) understanding! (See https://www.ted.com/talks/conrad_wolfram_teaching_kids_real_math_with_computers as a start.). By "think like a mathematician" I mean consider approaches, theorems, limiting cases, verification steps, visualizations, etc., without taking time for error-prone (and nearly always unhelpful) hand calculation steps. I'm writing a book on this, so stay tuned and see how "no reflection on my part" is the OPPOSITE of what Mathematica provides. – David G. Stork Dec 12 '22 at 00:48
  • Mmm. I know what a CAS can provide and how it can free one from some tedious tasks. I also know how it can fail spectacularly on not so difficult problems, so I always make sure I double check. Typically one can be confident with polynomial computations. Radicals are much more difficult to handle. I have seen bugs with all of Maxima, Maple and Mathematica (but to be fair, much more bugs in Maxima). So, yes, we might agree, if by "verification steps" you take this into account. No misunderstanding on my part I think. – Jean-Claude Arbaut Dec 12 '22 at 00:55
  • @DavidG.Stork 1. Could you post a link to an example of what you're showing? Ideally in real analysis which is what I'm studying now, and where the calculations that could be automated seem minimal compared to the creative and conceptual work of proofs. 2. Can you explain why you prefer the syntax (for writing math, not computing math) of Mathematica over LaTeX and why it's more "mathematical" and less "CS"? Learning a new syntax would be an investment and I want to understand the reward before making the commitment. – SRobertJames Dec 12 '22 at 02:49
  • See revision to solution. – David G. Stork Dec 12 '22 at 03:33
  • To be fair, the $\LaTeX$ code is less horrible if properly formatted, similar to the “computer science” version above: \sqrt[2]{x + \sqrt[3]{x^2 + \sqrt[4]{x^3 + \sqrt[5]{x^4 + sqrt[6]{x^5}}}}} – Jendrik Stelzner Dec 12 '22 at 06:09
  • Less horrible, but still far more horrible than the elegant Mathematica version. – David G. Stork Dec 12 '22 at 06:11
1

Most of the time, I just use a plain text file (open editor.exe on Windows, resp. TextEdit on Mac) to develop math. I know this is rather trivial, but often this is sufficient, probably at least for algebra related mathematics. For example, this recent answer of mine was completely done in a simple text file. When I want to write a fraction, I just write a/b in the file instead of \frac{a}{b}, the latter being much less intuitive to work with and longer to write. Of course, there is still some work to be done to write the result with LaTeX, but usually the end result is much shorter compared to what has been written before. Also, writing the whole thing again helps to reorganize the proofs in a better way. Believe it or not, but I have been doing this for almost 20 years now. I have been wasting quite a lot of paper in the first years (think about the trees...), but nowadays it's the exception. Of course for commutative diagrams and really complex projects nothing beats pen and paper.

  • [Martin Brandenburg]: Could you give an example of a "really complex project" where pen and paper "beat" sophisticated symbol-manipulation programs such as Mathematica 13.0? – David G. Stork Dec 12 '22 at 03:41
  • Mathematica is obviously not capable of handling anything in algebraic geometry, algebraic topology or category theory (just to name a few examples). – Martin Brandenburg Dec 12 '22 at 10:41
  • Sorry, false. Here is basic algebraic geometry, just for a start: https://demonstrations.wolfram.com/topic.html?topic=algebraic+geometry&limit=20. And there is great support for knot theory (algebraic topology) (Alexander polynomials, etc.): https://reference.wolfram.com/language/ref/KnotData.html – David G. Stork Dec 12 '22 at 19:13
0

Your way of working is correct: you are just lacking the right tool for actually doing your work: as you state correctly, you can't reason with things like x < f(\frac \alpha {e^ \sqrt y) \implies y \in \mathbb Q, but you might start using an editor for working with LaTeX instead of typing everything by hand. I just mean: I have written my thesis like this, but this was 25 years ago! Surely somebody has written a LaTeX editor by now? Maybe some people can add links towards LaTeX editors as a comment to my answer?

Dominique
  • 2,130
  • 1
    LaTeX editors abound, but they do not provide real-time display. There is a compile step, which takes at least a few seconds; not long to wait when you're done, but too long to reason with as you work. – SRobertJames Dec 12 '22 at 14:14