Calculus with Julia Squared
Preface

This version of the notes, Calculus with Julia Squared (CWJSN), is a fork of the original Calculus with Julia repo. The original repo is available at CalculusWithJuliaNotes.jl, and you can see the rendered book here.
The key difference is that this version replaces SymPy with Julia’s Symbolics.jl and other Julia packages. My goal is to totally remove all Python dependencies, so it essentially becomes Calculus with Julia with Julia. Hence the Squared. I created this purely for my own self study. My reasoning is this: In my math studies, I want to only use Julia, without requiring the context switch to Python. As part of that, I wanted to replace SymPy which is used in the original notes, with Symbolics. This also serves as a good way to learn more about that large and complex package, and the SciML ecosystem.
I have no plans to heavily maintain this fork, and it is not intended to be a replacement for the original notes. It is simply a personal project although I want to share it with others who might be interested in using Julia only for learning calculus.
Since I am neither an expert in Symbolics nor Calculus, the port was done mostly by Claude (albeit with guidance on my part). For that reason, I have not pushed this fork back as a PR to John Verzani, the original developer/professor, to whom I am extremely grateful for creating these notes in the first place. All the core content was created by him.
What is modified are the code parts that were originally in SymPy. As part of that, it is important to point out that the associated underlying CalculusWithJulia.jl package repo has also been forked and changed into CalculusWithJuliaSquared.jl. Since here too the heavy lifting in the port was done by Claude, I am neither submitting it as a PR to the original repo, or submitting it to Julia packages. You need to use the github repo if you want to use CWJS for your own work.
As for the notes port, there are a few places where Symbolics can’t do the heavy lifting, and the alternatives used are noted. Claude also created a helper function in CWJS to deal with the different approach SymbolicLimits.jl takes to limits. The function is called symlim and is in the CWJS package. It is worth noting for the more knowledgeable reader that the key difference is that SymbolicLimits.jl is a Gruntz engine for asymptotics at infinity, which, when a common factor needs cancelling first, may return silently wrong answers on ordinary finite limits. Hence the helper function. There is another helper function called tlim and others might follow.
Finally, this port is a huge undertaking, so it is only partially complete. All that is deployed and published are the currently ported pages. Over time, more and more will be added until hopefully the port of the whole book is completed.
What follows is the original introduction by the author of the original Calculus with Julia notes.
This is a set of notes for learning calculus using the Julia language. Julia is an open-source programming language with an easy to learn syntax that is well suited for this task.
Read “Getting started with Julia” to learn how to install and customize Julia for following along with these notes. Read “Julia interfaces” to review different ways to interact with a Julia installation.
Since the mid 90s there has been a push to teach calculus using many different points of view. The Harvard style rule of four says that as much as possible the conversation should include a graphical, numerical, algebraic, and verbal component. These notes use the programming language Julia to illustrate the graphical, numerical, and, at times, the algebraic aspects of calculus.
There are many examples of integrating a computer algebra system (such as Mathematica, Maple, or Sage) into the calculus conversation. Computer algebra systems can be magical. The popular WolframAlpha website calls the full power of Mathematica while allowing an informal syntax that is flexible enough to be used as a backend for Apple’s Siri feature. (“Siri what is the graph of x squared minus 4?”) For learning purposes, computer algebra systems model very well the algebraic/symbolic treatment of the material while providing means to illustrate the numeric aspects. These notes are a bit different in that Julia is primarily used for the numeric style of computing and the algebraic/symbolic treatment is added on. Doing the symbolic treatment by hand can be very beneficial while learning, and computer algebra systems make those exercises seem kind of redundant, as the finished product can be produced much more easily.
Our real goal is to get at the concepts using technology as much as possible without getting bogged down in the mechanics of the computer language. We feel Julia has a very natural syntax that makes the initial start up not so much more difficult than using a calculator, but with a language that has a tremendous upside. The notes restrict themselves to a reduced set of computational concepts. This set is sufficient for working many of the problems in calculus, but do not cover thoroughly many aspects of programming. (Those who are interested can go off on their own and Julia provides a rich opportunity to do so.) Within this restricted set, are operators that make many of the computations of calculus reduce to a function call of the form action(function, arguments...). With a small collection of actions that can be composed, many of the problems associated with introductory calculus can be attacked.
These notes are presented in pages covering a fairly focused concept, in a spirit similar to a section of a book. Just like a book, there are try-it-yourself questions at the end of each page. All have a limited number of self-graded answers. These notes borrow ideas from many sources, for example Strang (n.d.), Knill (n.d.), Schey (1997), Hass et al. (2018), Rogawski et al. (2019), Angenent (2012), several Wikipedia pages, and other sources.
These notes are accompanied by a Julia package CalculusWithJulia that provides some simple functions to streamline some common tasks and loads some useful packages that will be used repeatedly.
These notes are presented as a Quarto book. To learn more about Quarto books visit https://quarto.org/docs/books.
Compiling these notes into a pdf file with Quarto is possible with some piecing together of parts. The result is less than optimal and also quite large.
To contribute – say by suggesting additional topics, correcting a mistake, or fixing a typo – click the “Edit this page” link and join the list of contributors. Thanks to all contributors.
A very special thanks goes out to @fangliu-tju for their careful and most-appreciated proofreading and error spotting spread over a series of PRs.
Running Julia
Julia is installed quite easily with the juliaup utility. There are some brief installation notes in the overview of Julia commands. To run Julia through the web (though in a resource-constrained manner), these links resolve to binder.org instances:
Calculus with Julia Squared version 0.25+cwjsn.1, produced on August 20, 2026.