Introduction to the Basic Ideas of Calculus

This is an introduction to the basics of Calculus taught using my personal perspective on how to teach Calculus. Prerequisite is Algebra (as in algebraic manipulation). If you can solve a small linear system and plot easy functions by hand, you're in good shape.

This is meant to be a practical glimpse of the issues Calculus lets you tackle, not a textbook. There's very little theory and no exercises. To gain true competency, you must supplement this by solving similar and real-world problems. That is, I will give an overview of the topics and provide intuition, but the reader will need to consult other sources to understand how to actually compute derivatives and integrals. Frankly, you should probably just take a proper course.


Some Real Calculus: A Touch of Differentiation

Suppose I give you a smooth function \(f(x)\). Like all smooth functions, it has a slope (the rise over the run) at each point. That is, if I give you some input \(x\), you should be able to look at a graph of \(f\) and give me a pretty good guess for what the slope of the function is at the point \(\vecinline{x,f(x)}\).

Graph of a parabola with a tangent line.

Figure 1

: Graph[1] of parabola \(f(x):=-x^2+3 x\) with tangent line at \(x=1\).

For example, suppose that I give you \(f(x):=-x^2+3 x\). If you graph \(f\), you get an inverted parabola. Now, I can ask you what the slope of that parabola is at some point. Say, at the point \(\vecinline{x,y}=\vecinline{1,2}\), which is a point on that parabola (see Figure 1).

From looking at the graph, you can see that the slope of the parabola at that point is the same as the slope of that additional diagonal line I drew. That line looks like it has a slope of \(1.0\), which turns out to be exact.

Congratulations! What you have just done is found the derivative \(g(x)=\frac{d}{d x}f(x)\) for \(x=1\), which is sometimes written more compactly as \(\frac{d}{d x}f(x)\Big|_{x=1}\). It's nothing but the slope!

Now, we would like to get the slope at more points than just \(x=1\), and this is what the 'derivative' allows us to do. In general, 'differentiation' takes some function \(f\) and makes a new function \(g(x):=\frac{d}{d x}f(x)\), called the 'derivative'. This function \(g\) is a black box that returns the slope of \(f\) at whatever \(x\)-coordinate you pass into it.

In our example, the derivative turns out to be \(g(x)=\frac{d}{d x}f(x)=-2 x+3\). Nevermind how I got that function (there are rules and theory you should follow); I want to show you what it does. Notice that if you put in \(x=1\), we get the slope we just got with the line: \(g(1)=1.0\). The derivative function can be queried for other inputs \(x\) too, though. For example, the top of the parabola is at location \(x=1.5\). If we put that into our derivative, we get \(g(1.5)=0\). This makes sense; the apex of the parabola is flat (i.e. slope \(0\))!

Fun fact: the tops of peaks and floors of valleys are flat, so you can find them by solving for where there's a \(0\) derivative[2]. In the above example, \(g(x)=-2x+3\), so we solve \(0=-2x+3\), giving us \(x=1.5\).

Note: you will also see the other notations \(f'(x)\), \(f^{(1)}(x)\), \(\dot{f}(x)\), and \(D_x f\) instead of \(\frac{d}{d x}f(x)\). For the single-variable case, these are all the same, but I chose the last one because it always works and it makes it clear what is happening: the function \(f\) is being differentiated with respect to \(x\). You can also write it as \(\frac{d f(x)}{d x}\) or \(\frac{d f}{d x}\). (Note: notations like \(\frac{\partial}{\partial x}f(x)\) mean something a little different. Don't use that until you know why you should!)


Some Real Calculus: A Touch of Integration

Integration is the opposite of differentiation, but it might not be clear why. What it is is a continuous summation. It would be like instead of adding up a finite list of ordinary numbers, you could add up an infinite number of infinitely small numbers. The best we can do is try to build up some intuition, but please note that this section is unavoidably harder.

Graph of a constant function.

Figure 2

: Graph[3] of constant function \(f(x):=b\).

In Figure 2, we have a graph of \(f(x):=b\), where \(b\) is some constant. Look at the blue horizontal line that is the function. Starting from the origin and continuing toward the right to some \(x=a\), we might like to ask what the area between the blue line \(f(x)\) and the \(\vec{x}\)-axis is. For example, let's consider \(b=2.7\) and look at some example values of \(a\). For \(a=0\), the area is \(0\). For \(a=1\), the area is \(2.7\), since we are looking at a \(1 \times 2.7\) rectangle. For \(a=2\), the area is \(5.4\), since we are looking at a \(2 \times 2.7\) rectangle. So, it looks like in general the formula for the area is just \(b \cdot a\).

Congratulations! What you have just done is calculated:

\[ \int_0^a f(x) \cdot d x = \int_0^a b \cdot d x = b \cdot a \]

This is called a 'definite integral'. The bottom number on the integral sign is the 'lower limit of integration' and the top number is the 'upper limit of integration'. They define the range of input to the function we want to sum over. The left hand side above means: "Find the area under \(f(x)\) starting at \(x=0\) and continuing to \(x=a\)".

Note: what does the \(d x\) mean? It (sortof) means you're taking very small steps in \(x\), but really it has no function. It needs to be there to be a valid integral over \(x\) though.


The other kind of integral is the 'indefinite integral', and it's really not any different. It's the same thing, except without the bounds of integration. It's a way of solving all the definite integrals with all the different bounds all at once by making a new function. Let's clarify with our example:

\[ F(x) := \int f(x) \cdot d x = \int b \cdot d x = b \cdot x + C \]

This looks pretty similar to the above integral, doesn't it? In the above, \(F\) is the new function, called the integral of \(f(x)\). Notice, however, that \(a\) doesn't appear anywhere in the definition of \(F\)! The other thing to notice is the \(C\). This is a magical constant that you don't know. It is added when evaluating indefinite integrals only. You should think of it as expressing that you don't know how far offset the \(x\) is. It describes the initial value of the problem. More on all this stuff later; for now, just remember to add it.

How can we use the indefinite integral to solve a definite integral? The first definite integral was to find the area under \(f(x)\) from \(0\) to \(a\). With the indefinite integral, we can plug in those limits and subtract:

\begin{align*} \int_0^a f(x) \cdot d x ~~=~~ F(x) \Big|_{x=0}^{x=a} ~~&=~~ F(a) - F(0)\\ &=~~ (b \cdot a+C) - (b \cdot 0+C)\\ &=~~ b \cdot a \end{align*}

With an indefinite integral, we can plug in any two limits, though. Also notice how \(C\) canceled out. This will always be the case when using an indefinite integral to solve a definite integral.


Graph of a linear function.

Figure 3

: Graph[3] of linear function \(f(x):=b \cdot x\).

In Figure 3, we have a very slightly more complicated example with a new function \(f(x):=b \cdot x\). The area under \(f(x)\) is now the area of a triangle. Recall that the formula for the area of a triangle is \(A=\frac{1}{2}B\,H\). Here, \(B\), the base, is the distance along the \(\vec{x}\)-axis to \(a\) while \(H\), the height, is the value of \(f(a)\). Here's an example of calculating the discrete integral for this \(f\):

\begin{align*} \int_0^a f(x) \cdot d x ~~&=~~ \frac{1}{2} B\,H\\ &=~~ \frac{1}{2} a f(a)\\ &=~~ \frac{1}{2} a \cdot b a ~~=~~ \frac{1}{2} b a^2 \end{align*}

The indefinite integral for this function is:

\[ F(x) := \int f(x) \cdot d x = \frac{1}{2} b x^2 + C \]

Again, you should notice that \(F(x)\) is very similar to the integral above (and again notice that \(a\) doesn't appear in its definition).

Let's use this indefinite integral to find a more interesting area, the trapezoid from \(x=2\) to \(x=4\):

\begin{align*} \int_2^4 f(x) \cdot d x ~~=~~ F(x) \Big|_{x=2}^{x=4} ~~&=~~ F(4) - F(2)\\ &=~~ \left(\frac{1}{2} b \cdot 4^2+C\right) - \left(\frac{1}{2} b \cdot 2^2+C\right)\\ &=~~ 8 b - 2 b ~~=~~ 6 b \end{align*}

An Easy Practical Example

Everyone understands position along a line. It's also pretty obvious how speed works. It turns out that speed is the derivative of position with respect to time.

Say you're walking at a constant speed. As you walk past position \(x=2\), I start a timer. When you walk past \(x=14\), I stop the timer. Suppose it takes you \(4\) seconds. If I graph your position with respect to time, it looks like a slanted line. The slope of this line—its derivative—is \(3\). This is also your speed (\(3\) units per second)! I'd write these functions describing position and velocity, respectively, like so:

\[ \begin{alignat*}{2} x(t) &= 3 t + 2\\ v(t) &= \frac{d}{d t}x(t) = 3 \end{alignat*} \]

Here's how you apply integration. Suppose you're traveling at \(3\) units per second and you travel for \(4\) seconds. Where are you? To answer that, we need to know where we started from (this is where \(C\) will come in; it represents the initial condition of the system).

We know that speed is the derivative of position, so we know that position is the integral of speed:

\[ \begin{alignat*}{2} x(t) &= \int v(t) d t\\ &= \int 3 \cdot dt = 3 t + C \end{alignat*} \]

By comparing with the differentiation example above, we know that \(C=2\):

\[ x(t) = 3 t + 2 \]

Notice that in this case we actually know the value of \(C\), so now we can use the integral (\(x(t)\)) to figure out where we are at any point in time! When we pass in \(t=4\), for example, we see that an answer of \(14\) falls out, which indeed is our position at time \(t=4\).

Another question you might ask is, how far did you go in that time? To solve this, we can use a discrete integral:

\begin{align*} \int_0^4 v(t) \cdot d t &= x(4) - x(0)\\ &= (3 \cdot 4 + C) - (3 \cdot 0 + C)\\ &= (3 \cdot 4 + 2) - (3 \cdot 0 + 2) = 12 \end{align*}

This says that moving at \(3\) units per second from time \(t=0\) to time \(t=4\) will make you travel \(12\) units (in this case, from \(x=2\) to \(x=14\)).

Again, notice that, even though we knew the value of \(C\), it cancels, so it doesn't matter. Intuitively, this means that we don't care where you started from if we just want to know how far you traveled.


Fun fact: just as speed is the derivative of position, acceleration is the derivative of speed. Even higher, we have jerk, and then jounce. Jounce together with the next two are called snap, crackle, and pop[4], but since no one really uses such high derivatives of position these names are meant only humorously. Symbolically:

\[ \frac{d^6 x}{d t^6} = \frac{d^5 v}{d t^5} = \frac{d^4 a}{d t^4} = \frac{d^3~\text{jerk}}{d t^3} = \frac{d^2~\text{snap}}{d t^2} = \frac{d~\text{crackle}}{d t} = \text{pop}(t) \]

An Important Example of Integration

Composite photograph of a jumping motorbike tracing out a parabolic arc in the sky.

Figure 4

: Composite photograph[5] showing that the path of a motorbike is a parabola.

When an object flies through the air, it follows a nearly parabolic path (see Figure 4). Why? We can answer this question with calculus!

From basic physics, we know that the only significant force acting on this motorbike is that due to gravity. This force is proportional to the object's mass, which, when combined with Newton's law \(\vec{F}=m\cdot\vec{a}\) means that the acceleration of any object downward is roughly constant. This constant is known as 'standard gravity': \(9.80665\) meters per second per second downward. Since no (significant) force pushes horizontally, we can write the approximate accelerations in the \(\vec{x}\)- and \(\vec{y}\)-axes as:

\[ \begin{alignat*}{2} a_x(t) &= 0.0\\ a_y(t) &= -9.80665 \end{alignat*} \]

We can now integrate the accelerations to find the velocities:

\[ \begin{alignat*}{4} v_x(t) &= \int a_x(t) \cdot d t &&= \int 0.0 \cdot d t &&= 0.0 ~t + v_{0x}\\ v_y(t) &= \int a_y(t) \cdot d t &&= \int -9.80665 \cdot d t &&= -9.80665~t + v_{0y} \end{alignat*} \]

Those new terms \(v_{0x}\) and \(v_{0y}\) at the end are constants—just like \(C\)—that correspond to our initial conditions. Let's say the motorbike flew into the air at a horizontal speed of \(v_{0x}:=30\) m/s and a vertical speed of \(v_{0y}:=10\) m/s. The velocity equations then become:

\[ \begin{alignat*}{2} v_x(t) &= 30\\ v_y(t) &= -9.80665~t + 10 \end{alignat*} \]

We can now integrate the velocities to find the positions:

\[ \begin{alignat*}{4} x(t) &= \int v_x(t) \cdot d t &&= \int 30 \cdot d t &&= 30 ~t + x_0\\ y(t) &= \int v_y(t) \cdot d t &&= \int (-9.80665~t + 10) \cdot d t &&= -4.903325~t^2 + 10~t + y_0 \end{alignat*} \]

For simplicity, let's say the motorbike started at the origin (so that \(x_0:=0\) and \(y_0:=0\)). This gives our final equations:

\[ \begin{alignat*}{2} x(t) &= 30~t\\ y(t) &= -4.903325~t^2 + 10~t \end{alignat*} \]

Substitute the first into the second to get an equation relating \(x\) and \(y\):

\[ y(x) = -\frac{4.903325}{900} x^2 + \frac{1}{3} x \]

Look what happened! The \(x(t)\) function increases linearly with time. This means that the motorbike is still moving steadily over the ground while it's jumping. However, at the same time, the \(y(t)\) value is following an inverted parabola with respect to \(x\)! This means that the motorbike is following a parabola through the air!

The parabolic motion of objects through the air falls out of the math this way as an inevitable fact, even though we would probably not have guessed beforehand that objects move like this!


Conclusion

I hope this tutorial has been helpful. As I mentioned, you must practice these concepts to assimilate them. If you've spotted an error, let me know!


Notes