Settings

Theme

Show HN: Interactive Calculus via LaTeX

ximera.osu.edu

114 points by jovas 7 years ago · 16 comments

Reader

jovasOP 7 years ago

Tools: https://github.com/ximeraproject

Source: https://github.com/mooculus

Linear algebra: https://ximera.osu.edu/laode/linearAlgebra

  • kisonecat 7 years ago

    The biggest trick here is that TeX source like $\answer{2} + 1 = 3$ provides "answer blank + 1 = 3" on the web, but you can do more complicated things like $\sqrt{\answer{4}} = 2$.

    The website uses Fraser's differential synchronization algorithm, so a student's work is saved as they do it -- and that happens in real time, so an instructor can "look over their shoulder" and watch a student working in real time. The server is actually a git server, so an author publishes content by performing a git push, and because the server knows the history of the content, the server provides the version of the content on which the student last did work.

  • skh 7 years ago

    I really like the interactive exercises. I teach math at a community college and would like to create interactive exercise sheets for some of my classes. I’m not familiar with Github and poked around a bit but I could not figure out how the answer checking was done. In one problem I did the answer was 6 and I was pleasantly surprised the answer 5+1 was counted as correct. Do you know how this is done?

    • kisonecat 7 years ago

      I'm one of the developers of Ximera.

      Expression equality is handled by https://github.com/kisonecat/math-expressions using a few heuristics, which is necessary because Richardson's theorem says this problem is undecidable. The main trick is to regard the expressions as complex-valued functions, find a point where the value is (nearly) equal, and then check for numerical equality in a neighborhood. (Doing this over the complex plane addresses the problem that many common expressions like sqrt(small number-x^2) have a restricted domain over the reals).

      We rely on unit tests from Chris Sangwin (who wrote the textbook _Computer Aided Assessment of Mathematics_) to ensure that we're adjudicating expression equality mostly correctly.

      • skh 7 years ago

        Thanks for the response and info. I looked at the README and it seems like you all use Javascript for this. I was thinking maybe Maple or Mathematica was used. I'm impressed with the calculus notes/exercises I saw. It looks professionally done. The fonts/colors are nice.

        I'm going to try to make some stuff myself. I would mostly do it for developmental math, college algebra, and trig. I haven't dug too deep into how to make my own stuff using Ximera but I'm hoping I won't have to write Javascript myself to handle checking expressions.

        • kisonecat 7 years ago

          Maple and Mathematica are not open, and it's important that not only the resources be open-source, but also the underlying technology stack, because we're trying to not only teach students mathematics but the most engaged students need to "look under the hood" and learn how the technology works.

          So we do support SageMath for more complicated answer validation. This depends on the public SageMath cell servers, which provides cloud-hosted SageMath and enables things like \sage{derivative(x*x,x)}. It's also more performant to rely on JavaScript.

          For developmental math, answer validation is somewhat harder than for calculus, because often you want to distinguish between say (x+1)^2 and x^2 + 2x + 1.

          We run workshops on how to use Ximera. The next one is at UFlorida in October. If you're interested, there is some travel support available. Contact us at ximera@math.osu.edu

      • romwell 7 years ago

        Interesting! When you assess the equality on a neighborhood, what's the algorithm that decides on the number and location of samples?

        For polynomial functions, it's clear how many samples to use; what about others? Do you settle on a magic constant and call it a day?

    • jovasOP 7 years ago

      If you goto:

      https://ximera.osu.edu/introduction

      you can see how to make your own materials.

      There is a set of example environments here:

      https://ximera.osu.edu/examples/exampleActivityCollection

      • skh 7 years ago

        Thank you for the links and reply. The materials for calculus are very good. They look professional. You guys did a great job.

    • shawn 7 years ago

      One way to do this is to install Mathematica and then run

        $ wolframscript --code "6 == 5 + 1"
        True
      
      Suppose you know that a function is equal to "(x - 1)(x + 1) - 42". You want to check whether the student has given an equivalent function, like "x^2 - 43":

        $ wolframscript --code "f[x_] := (x - 1)(x + 1) - 42;
        Simplify[f[x]] == Simplify[x^2 - 43]"
        True
      
      But it should also return True for any other form, like "-43 + x^2". And indeed it does:

        $ wolframscript --code "f[x_] := (x - 1)(x + 1) - 42; 
        Simplify[f[x]] == Simplify[-43 + x^2]"
        True
      
      So in general, you can write a script which inserts the student's answer into the right-hand "Simplify[...]" block. If it prints True, they're equivalent.

      It's also possible to feed a natural language expression like "the integral of Sin(x) from 0 to pi is equal to 2" into wolfram alpha, and check whether it returns True or False:

      http://www.wolframalpha.com/input/?i=the+integral+of+Sin(x)+...

      (To be clear, I don't think this is how this project does it. I was just giving a way to do it.)

pvaldes 7 years ago

Can't see how is this better than using sweave

  • jovasOP 7 years ago

    Can sweave be integrated with a learning management system?

    Ximera allows authors to write online interactive texts, that can serve as the HW system for a class.

    The student's work can be directly sent to the grade book via LTI.

    Moreover, you can simultaneously produce a PDF that looks like a traditional text.

    http://www.lulu.com/shop/the-ohio-state-university-math-depa...

    Which nobody needs to buy, since the PDF generating the text is freely available.

    • rmbeard 7 years ago

      There are some R packages that allow for development of e-learning materials, these are Rmarkdown based so similar to knitr rather than sweave, but basically the same idea. The downside is the lack of symbolic support in R. Ximera does look interesting however. A second question I would have is how this would compare with Jupyter interactive notebooks which have LaTeX support and automated grading as well as symbolic algebra capabilities? Nevertheless additional tools are always welcome.

      • kisonecat 7 years ago

        I don't think Jupyter offers a facility like $\frac{\answer{2}}{4} = 1/2$ for putting answer blanks in the middle of mathematical expressions. For sagemath, code like \sage{derivative(f,x)} also works, even inside an \answer.

        An activity in Ximera has state, and this state is synchronized (via Fraser's differential synchronization) with all open clients, so the instructor can watch a student while they work in Ximera, and even edit the page alongside them.

        • rmbeard 7 years ago

          If I understand your comment, correctly, then grading facility in Jupyter allows something like that I believe. My question related more to any symbolic/computer algebra capabilities Ximera may have, or does it just allow for interactive documents without computational tools?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection