Essentials of Calculus

El Fiji Grande

Over 40000 km and counting
-
-
-
Pronouns
he/him
TNP Nation
El_Fiji_Grande
Discord
El Fiji Grande (#3446)


This lecture was requested by @Janus. I will do my best to describe an overview of calculus, and possibly provide a deeper understanding in future posts.​

Calculus in a Nutshell

Why Calculus?
Calculus is a field of mathematics that was designed with the intent of answering two fundamental questions: how do you find instantaneous rate of change, and how do you find the area under a curve? The answers to these questions have wide-ranging applications from engineering to statistics to physics to biology to economics to astronomy to architecture to ... you name it, and there are applications of calculus which could effectively be applied to the field. It can seemingly predict the future and reconstruct the past. Your parents know calculus, your colleagues know calculus, computers know calculus, everyone knows calculus. You need to know calculus!

Instantaneous Rate of Change
Well, let's start simply with rate. Rate is defined as the change in distance over a given period of time. Or, said another way, distance equals rate multiplied by time. If you plot distance (or displacement) with respect to time, you get a curve of various positions at various moments in time. You can draw a line between any two points, and the slope of that line is the average rate of change. This line is often referred to as a secant line. So that's exactly it - rise over run. Distance over time. Average rate of change is the slope of the secant line drawn between any two points of that graph. But to find the instantaneous rate of change, you have to find the rate at a given instant in time. You can imagine this by minimizing the change in time such that the secant line only just touches the graph at one point. This new type of line is called the tangent line. Instantaneous rate of change is the slope of the tangent line to the curve.

Finding the slope of a tangent line
Again, slope is rise over run - in this case, distance over time, or more broadly, delta y over delta x. (Delta is a common term that simply means "change in"). The tangent line is located at a single point, so change in distance is zero, and change in time is zero. What the heck! 0/0 is called an indeterminate form. This term is completely meaningless, so we have to take a different approach.

Introducing Limits
This may seem a bit unrelated to this problem, but I'll get back to it in just a minute. If you look at a function, and cover up just one bit of it, you can see that the function approaches that point from the left and from the right. Interestingly, we're not really interested in what's actually happening at that point, but rather at what we expect to happen were the function continuous. A limit is the value that a function or sequence approaches. Solving limits can involve some interesting algebra, such as multiplying by conjugates and so forth.

Back to the problem: instead of directly finding the slope at a given point, we can instead take a series of secant lines that get closer and closer to the point we want to find the tangent at. We know how to find the slope of secant lines, so we just compute the slope of each of these lines as they approach what we know to be the tangent line. To find the instantaneous rate of change, you find the limit as the change in time approaches zero.
zA3ybCX.png
In the equation shown above, h is defined as change in x. This is a common notation, so it is important that you become comfortable with it. The dy/dx at the start is an abbreviation of delta y over delta x, or change in y over change in x, which in our case is change in distance over change in time. This is really the same thing as we did before with the secant line, in which we calculate distance over time between the two points, just in this case, we're finding the limit as the change in time approaches zero. It doesn't have to be distance in time though, it can be the way any function is changing at a given point. This more general definition is the definition of a derivative. In short, if you need to know the instantaneous rate of change, you find the slope of the tangent line to the curve, and to do that you simply take the derivative of the function and evaluate it at the point you want. What makes the derivative so powerful is that not only does it find the slope of the tangent line at the point you want, it finds the slope of the tangent line at all points on the function.

Derivatives
It's important not to lose sight of the goal when we start to talk about derivatives. Taking the derivative of a function and evaluating it at the point you want gives the instantaneous rate of change at that point. Interestingly, this means that if you take the derivative of distance, you get the instantaneous rate of change which is velocity. If you take the derivative of velocity, you find the rate at which velocity is changing, which is acceleration. If you take the derivative of acceleration, you find the rate at which the acceleration is changing, which is called jerk. And you can keep going. The fourth derivative of distance is the rate of change of jerk, which is called jounce. In this way, calculus can be used to describe anything that moves, and derivatives are integral to this process. (wink - math joke right there).

At this point, we're going to start to get into the weeds, but the following rules are really important to finding derivatives correctly. So let's dive in!

Oh, and one sec - you often have to memorize these for class. I'm sure you can look up what the mathematical form of these rules are online, so I'm just going to tell you the chants that help make sense of these rules.

To take a standard derivative of a function in the format f(x) = x^n, the derivative is simply n*x^(n-1).

The Product Rule: the first times the derivative of the second plus the second times the derivative of the first (not the product of the derivatives!)
f(x)g'(x) + g(x)(f'(x)
Oh - and I should mention that ' symbol is called "prime," and it just means that the derivative of that function has been taken.

The Quotient Rule: the bottom times the derivative of the top minus the top times the derivative of the bottom all over the bottom squared.
(g(x)f'(x) - f(x)g'(x))/g(x)^2

Oh, and my favorite - The Chain Rule: There isn't really a cool chant for this one, folks. It's better stated as an analogy: peeling an onion. This is used if you have a function that has another function inside. f(g(x)). The derivative is g'(x)*f'(g(x)). So in plaintext, the derivative of f of g of x is equal to the derivative of g times the derivative of f of g of x. Or as I like to put it, f(g(x)) is the function f(the guts). So you take the derivative of the guts times the derivative of the function, but keep the guts intact inside. I don't know if that makes any sense.

Oh, and I haven't mentioned, but the derivative of a constant is always zero.

Review of Syntax
dy/dx - (noun) - the derivative of a function with respect to x
d/dx - (verb) - please take the derivative of a function with respect to x
dx - (noun) - some change in x
dy - (noun) - some change in y
dz - (noun) - some change in z
' - ("prime") - a shorthand to show that one derivative has been taken of the function. So, g'(x) is the derivative of g with respect to x. Likewise, g''(x) is the second derivative of g with respect to x.

Implicit Differentiation
If you need to take the derivative of something that isn't a function, like an expression, use implicit differentiation. Implicit differentiation takes advantage of the chain rule. So if you have an equation in terms of x and y, you simply take the derivative of x with respect to x, take the derivative of y with respect to x (and use the chain rule in so doing, getting a dy/dx term), and then solve for dy/dx algebraically, you're done.

Linear Approximation
This is when you don't know the value at a point, but you do know the value of another point close to the one you're looking for. In that case, you just take the point you know and follow the tangent line some dx over to where the other point is. You can approximate the value of the point you're looking for by taking the value of the point you know and adding the derivative times the dx distance. Mathematically, that is f(x+dx) = f(x) + f'(x)dx.

Optimization
Sometimes, the derivative of a function at a point is equal to zero. What this means graphically is one of three things: the function has a local maximum, a local minimum, or a saddle point. It's also possible for maxima and minima to be present at locations at which a given function is not differentiable - at cusps, corners, and breaks. This can be seen with the behavior of absolute values, asymptotes, and step functions. To solve optimization problems, you first take the derivative of a function, then find all the points where it equals zero or is undefined. These points are candidates for where you could find local maxima and local minima. You then apply something called the First Derivative Test. You write down each of your points on a number line, in order, creating a series of intervals. Check if the points you're checking are on the function over the domain you're interested in. Then, evaluate the derivative on each side of the candidate points. Where the derivative is positive to the left and negative to the right / \ you get a local maximum. Where the derivative is negative to the left and positive to the right \ / you get a local minimum. It can help to draw lines like the slashes I've done above to imagine either hills or canyons, and this accurately describes what is going on on your graph. When the derivative is negative on both sides \\ or positive on both sides // you get a saddle point. Saddle points can be thrown out. Among the local minima and maxima, the lowest and highest ones are the absolute minimum and absolute maximum, respectively. Optimization is an incredibly important application of Calculus. You can minimize cost, maximize profits, minimize volume, maximize area, and so on.

Graphing
Sometimes, you'll be given a function, but you don't know what it looks like. You can use derivatives to help plot it. First, do the same steps I outlined above under optimization and use the First Derivative Test to find minima and maxima. Next, take the second derivative (take the derivative of the derivative) of the function to find curvature. Find all the points at which the second derivative equals zero, and this will give you potential inflection points. Like before, you have to analyze the intervals between these points. Naturally, this is called the Second Derivative Test. At inflection points, the concavity of the function changes. You can use the knowledge granted to you by the first and second derivative tests to very accurately plot curves. It's also possible that a given function has asymptotes. If the function has a denominator, find the locations at which the denominator equals zero. It makes sense that the vertical asymptotes would be located at these points because the function is trying to divide by zero, so is undefined at these points, with the value of the function approaching either positive or negative infinity. Horizontal asymptotes are a bit harder to remember. To find these, take the limit as x goes out to infinity. If it approaches a given value, then that is where the horizontal asymptote is.

Related Rates
This is when you have a problem in which two things are moving in a way that is related to one another. The problem you'll often see in textbooks is a ladder leaning against a wall that is slowly sliding away from the wall. You're given the rate at which the base is sliding and need to find the rate at which the ladder is sliding down the wall. You can use geometry and trigonometry to find that the relation between these rates is the Pythagorean theorem. To solve, you use implicit differentiation and take the derivative with respect to time and evaluate the result. While that is the famous problem, there are tons of other applications of related rates. My favorite related rates problem is pretty similar, and has to deal with a person walking on the sidewalk at night, and there is a streetlight. How fast is the shadow moving relative to the rate at which the person is walking? You can do cool stuff like that with Calculus.

Area Under A Curve
When people say "area under a curve," they mean the area between a given function and a given axis. Classically, you can think of trying to approximate the area under a curve by taking little rectangles and summing their area. This is useful because we know the formula to find the area of a rectangle: height times width. We know the height at a given point because we can substitute that point into our function to find what the function equals at that point. We then slide over some dx to a new point, and calculate the height at that new point. The value dx can either be constant (fixed) or varied, and represents the width. So, by taking the sum of all rectangles f(x)dx, we can approximate the area under the curve. By increasing the total number of rectangles (by decreasing the size of dx), we can more closely approximate the shape of the function and thereby gain a better estimation of the area under the curve. As the limit of the number of rectangles approaches infinity, the area of the rectangles is the area under the curve. Naturally, you don't have to use rectangles for this task - you can much more quickly estimate the area by using trapezoids. This is called the Trapezoidal Rule.

While seemingly unrelated, finding the area under a curve is intrinsically the same idea as a derivative, only backwards. Basically, if we're given a function f(x), we're trying to find some function capital F(x) whose derivative of f(x). In other words, we have to take the antiderivative of f(x) to find F(x). Another word for antiderivative is the integral.

There are a few general rules for finding the integral of a given function. For instance, the integral of x^n is (x^(n+1))/(n+1). To convince yourself of this, take the derivative of that, and see that it just equals x^n. That is, unless n is -1, in which case you're looking at the integral of 1/x, which is equal to the natural log of x (ln(x)). And don't forget to always put a +C at the end of your new F(x) function, which is called the constant of integration. This makes up for the fact that there may be some missing information, because when you take the derivative of a constant, it becomes zero. Since we don't know what this constant is, we just write C. However, it is possible to solve for C by involving any boundary conditions there might be.

u-substitution
It's like the chain rule of integrals. You have to recognize a certain pattern to see if you can use this method of integration. That method is that you have to recognize a bit of function that also has its derivative later in the function. You can simplify this form by setting the first bit equal to u, and its derivative equal to du. You integrate the standard way, then sub what u actually equals into it at the end.

There are a few weird forms you have to memorize, which when integrated are trigonometric in nature. You just have to recognize them - it's not something I can really help with here.

Once you can integrate, you can solve some more of math's cool problems. You can start with jounce to get jerk, and integrate to get acceleration, and integrate again to get velocity, and integrate again to get displacement. You can find the total distance traveled. Literally anything that moves can be described in these ways.

For the next lexture posts:
There are also a few other neat applications of integration, from finding the area between two curves to finding the surface area of strange shapes to finding the volume of revolved solids. You can define functions parametrically, calculate path (arc) length, make use of hyperbolic trigonometry, and work in alternative coordinate systems, such as polar, cylindrical, and spherical reference frames. You can determine if sequences and series converge or diverge. You can expand your understanding of calculus into more dimensions, which is called multivariate calculus.

 
Last edited:
Back
Top