Автора пока нетВзять себе
- Языки
- English
- Темы
- ОбразованиеНаука
When physics teachers corrected Olympiad solutions with interactive SageMath notebooks, pilot testing showed the time it took fell to about one third, and students were not penalized multiple times for a single mistake. That is one result reported by Dominik Borovský, Jozef Hanč and Martina Hančová in a 2023 arXiv paper on using SageMath, a free open-source alternative to commercial math software, to teach physics and other STEM subjects.
What SageMath is
SageMath (Sage) is a free, open-source mathematics system built on Python and licensed under the GPL. Its motto, "building the car instead of reinventing the wheel," reflects how it gathers several hundred existing open-source packages, among them NumPy, SciPy, SymPy, Matplotlib and Maxima, into one environment for beginners and experts. The authors present it as an alternative to commercial computer algebra systems such as Maple, Mathematica and Matlab. Sage's commands are closer to standard mathematical notation than plain Python's, and it ships with Jupyter, where it works as the computational engine behind notebooks that mix code, text, multimedia and visualizations. The authors note that the OpenDreamKit project (2015-2019), which involved fifteen major European universities, recognized its potential as part of a free platform for researchers and students.
The course
In 2019 the authors redesigned a bachelor's course, Methods of Physical Problems Solving, for students of physics combined with another science: mathematics, biology, chemistry, informatics or geography. Students learn qualitative, quantitative and experimental ways to solve physics problems and to use digital tools. The course adopted blended and flipped learning and replaced traditional tests with ongoing projects and assignments. Over its 13 weeks Sage serves as a scientific data source, a graphing calculator, a modeling tool and a programming environment. Many problems come from school physics competitions, from easy tasks for seventh graders to very hard tournament problems.
Example 1: Physics Olympiad thermodynamics
The first example is a thermodynamics problem from the 63rd Slovak Physics Olympiad, regional round, category C (second year of high school), academic year 2021/2022.

Figure from Borovský, Hanč and Hančová, CC BY 4.0.
- Python's scipy.constants library supplies constants such as the molar gas constant and Avogadro's number, from CODATA 2018, managed by the U.S. National Institute of Standards and Technology. No manual copying means fewer human errors.
- Other libraries add chemical data, such as an element's atomic mass or a compound's molar mass, and reach databases like PubChem, an NIH biological database and the Materials Project.
- Unknown quantities must be declared as symbolic variables, which the authors see as a plus because it pushes students to think about which physical concepts the quantities stand for.
- Sage solves the system of equations symbolically, shows results in LaTeX, and lets a teacher substitute a hypothetical student's wrong value to check their solution.
- Pandas tables can be sorted and searched, and Matplotlib graphs can be zoomed, panned and read by cursor.
These notebooks were used in real competition grading. Pilot testing over three years cut correction time to about 1/3, and grading was more objective because a student was not penalized repeatedly for one mistake.
Example 2: a Wilberforce pendulum
The second example comes from the 34th Young Physicists' Tournament (Problem 12): a Wilberforce pendulum, a mass with adjustable moment of inertia hanging from a spring. Sage can embed videos and sketches for the introduction. The problem calls for the Lagrange approach, which works with energies instead of forces. Students often think it is harder than Newton's method, but the authors say Newton's is harder for non-trivial problems. Their difficulty is mostly the math, which Sage handles: a student describes the energies and builds the Lagrangian, and a short Python function turns it into equations.

Figure from Borovský, Hanč and Hančová, CC BY 4.0.
An analytical solution exists only under specific conditions, but Sage also gives numerical solutions for general conditions, with graphs. In the authors' plot, a dotted numerical solution agrees with the analytical one. They single out a fast ODE solver, desolve_odeint, written in Fortran.
Their conclusion
After more than 5 years, the authors call Sage with Jupyter a universal, interactive and easy-to-use platform across STEM and research. They have also used it for fast, accurate calculations of the gamma difference distribution, and note that it suits inquiry-based, project-based and blended learning. Students who learn it can join real research as assistants or later as doctoral students, as one of the authors did.
Sources
- Dominik Borovský, Jozef Hanč and Martina Hančová, "Scientific Computing with Open SageMath not only for Physics Education," arXiv:2308.07199 (2023) (https://arxiv.org/abs/2308.07199), licensed under CC BY 4.0. Changed here: rewritten in hubnx's own words and shortened; two figures kept, the other figure and the references left out.
Комментарии



