LaTeX & ChatGPT for DP Physics FE2025

February 12, 2023

Starting in August 2023 our DP Year 1 students will be introduced to the new DP Physics curriculum with the First Exams starting in May 2025 (FE2025). With the change in curriculum, now seems to be a great time to learn to how to use LaTeX to support student learning and teaching.

Potential Uses of LaTeX in the Classroom

  • Provides consistent display of equations, formulas, diagrams, and graphical information
  • Teachers can display DP Physics equations and derviations correctly during classroom lessons
  • Can be used for writing DP Physics Extended Essays, Internal Assessments, and Lab Reports

LaTeX Resources

1. Using ChatGPT for LaTeX Code Generation with Overleaf

Unsure how to begin for writing a specific equation in LaTeX, or need a head start? No problem: just ask ChatGPT! After a short series of questions, the increasingly popular AI Chatbot can help provide a scaffold for writing more complicated LaTeX code.

Here’s an example I made using the ChatGPT code generated with the popular online LaTeX editor Overleaf:

Source code can be found here

2. Generating LaTeX Equations and Graphs with Mathcha

Using the online editor Mathcha each equation, graph, or diagram can be easily exported as a transparent SVG or PNG file, or into LaTeX source code, which can then be copy/pasted into presentations, documents, websites, or other editors:

Source code can be found here

3. Using MathJax with Markdown for LaTeX Code Display in Jekyll

One way to use LaTeX in Markdown, is to import the package MathJax into to your webite. To do so for Jekyll, add the following code to _layouts/post.html:

1
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>

Adding LaTeX to a Markdown document requires you to use the MathJax delimiters, rather than $ or $$ to start and end each formula as follows:

  • For centered formulae, use \\[ and \\].
  • For inline formulae, use \\( and \\).

Centered Equation: \\[ x = {-b \pm \sqrt{b^2-4ac} \over 2a} \\]
\[ x = {-b \pm \sqrt{b^2-4ac} \over 2a} \]

We can also write equations like \( ax^2 + \sqrt{bx} + c = 0 \) inline, with the code \\( ax^2 + \sqrt{bx} + c = 0 \\).

Here’s one more example using the \begin{equation} syntax: \begin{equation} \int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15} \end{equation}

1
2
3
\begin{equation}
  \int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
\end{equation}

If you’re keen to learn more about the differences between \(\LaTeX\) and MathJax, you can read the MathJax documentation here.

That’s all for now,
\( M = i^{k_e} \)