Transcript for:
Lecture Notes on Mathematical Functions

Hello and welcome to the Maths 2 component of the online B.Sc. program on Data Science and Programming. In this video, we are going to do a review of the some of the ideas you have learnt in Maths 1. So, you have seen some ideas of calculus already in maths 1, at least you have seen the ideas of functions and function of one variable and then the ideas of tangents and so on.

So, you have seen some of the geometry and you have seen some examples of functions. The first couple of videos, including this one, we are going to do a little bit of a review of what you probably should have seen in Maths 1. So, if you do not remember, this will help you to remember. And also, we may end up doing a little bit extra in each of those videos.

And then once we have refreshed ourselves with some of the basic concepts of related to functions and the geometry corresponding to those, the graph and so on. we will go on from there and study the idea of, how to capture these ideas in terms of calculus. So, let us quickly look at some topics that you have seen in Maths 1. So, you have seen what is the straight line in Maths 1. We will be reviewing it.

I am just sort of quoting the topics right now. You have seen what are quadratic equations. You have seen what are polynomials in general.

You have seen what is the function. So, in particular, this is This includes functions from real numbers to real numbers. You have also seen other kinds of functions, but those will not show up in this particular course.

Well, I should take that back. What I meant was you have seen other functions which are, which have, which are on natural numbers and so on, those kinds of functions will not be studied here, but we will study other kinds of functions on Rn and so on. And then I think you have also seen what are exponentials and logarithms. So, this is again something that we will review in this, in these couple of videos that we are going to do.

So, let us start with what is a function of one variable. So, a function is defined to be a relation between, a relation from a set of inputs to a set of possible outputs, where each input is related to exactly one output. This is a slightly cumbersome definition, but in a minute we will make more sense of that.

In fact, this is not exactly a definition, but a heuristic about what a function is. This means that if the object x is in the set of inputs, which is called the domain, this now you may remember. number, then a function f will map the object x or take the object x or change the object x or translate the object x, you can use any of these words or transform the object x to exactly one object fx in the set of possible outputs. This is called the codomain. So, this is a very general idea of a function.

And so, maybe at this point, we should say not function of one variable, but what is a function? This is about what is a function. So, if you have f x to y, so pictorially this set of sentences, these sentences are represented by this picture here, f x to y, which says that f is a function from x to y, x is the domain, y is the co-domain. And then we have something called the range of a function.

This means it is a set of values that f takes. In other words, it is a set of values, it is a set, the subset of y of the codomain such that there is some x such that f of x is equal to that particular value. So, now what is the function of one variable?

Here we have said something about one variable. So, function of one variable means we are thinking, so for the purpose of this video, video and the next few videos, when we say function of one variable, we mean a function f from R or some subset of R, need not be the entire R. So, a subset of R to R. So, maybe I should draw this better. So, a subset D to R where D is a real, a subset of the real numbers.

So, why is this a function of one variable? Because typically we represent this by f of x, where x is a real number. Hence, one variable. if it was a function of in where d is in R2, then we would say it is a function in two variables and so on. So, those are things we will study in the next coming few weeks.

But for now, we have the domain which is a subset of R and we have the codomain which is again the set R. So, we know examples of such functions. So, for example, we have seen in Maths 1 the idea of a linear function.

So, linear function looks like mx plus c. So, m and c are real numbers. And then when you evaluate this for every x, it gives you some real number.

So, for example, if you have f of x is 5x plus 2, then f of 0 when you evaluate this at 0, you get f of 0 is equal to 5 times 0 plus 2, so that is 2 and then f of 20 is equal to 5 times 20 plus 2, so that is 100 plus 2, so 102. So, I hope you remember what what is a linear function and there is a picture associated with it. This is the graph of that function. So, you plot the point x and you plot the corresponding point f of x on the y axis.

So, you plot the points x comma f of x. And in other words, this is the line y is equal to f of x which is the line, the bold line in in black which is drawn here. So, this is called the graph of the function.

So, this is the graph of the function. And one reason to call it a linear function is that the graph is a line. So, linear has something to do with the fact that this is a line.

So, for a linear function, we have f of x is mx plus c and here m is called the slope of this line and it calculates. has something to do with this angle, which you may have seen in maths 1 and this is supposed to represent the y intercept. So, if you put x equals 0, you get f of 0 is equal to c.

So, this is supposed to represent, so f of 0 is over here, this point here is 0 comma f of 0 and we just saw that f of 0 is c, so this is the point 0 comma c, so c is exactly this length here. So, this m is supposed to have something to do with the angle, so this is theta and m is supposed to be, tangent of theta. And if you have not seen this before, we will be studying this in the next video. The point I wanted to make is that the m and the c have something to do with the geometry of this line. So, one represents the slope, by the slope we mean the angle at which it is inclined to the x axis and the other determines the distance where it hits the y axis from 0. Well, I, so when I say distance, I mean it could be a positive distance which is in the positive side of the y axis or it could be a negative distance which is in the negative side of the y axis.

So, you have seen this idea of a linear function and this is the graph of such a function, it is a line. Let us recall what are quadratic functions. So, a quadratic function is a function of the type a times x minus b squared plus c.

So, we could expand this and I will write it in a minute how to, how it looks like. And here is an example of a quadratic function. So, the quadratic function typically looks like it is been drawn here.

This is called a parabola and that is the figure in red, it is called a parabola, maybe I should use red. And this is the graph of the function f. which means it is the set of values x comma f of x as x runs over the real number.

Of course, we have not plotted all the values. If you plot all the values, mean or these two arms of the parabola will shoot off. So, this is an example of a curve. So, this is not a line. So, typically things which are not lines, but have this kind of shape of a single, you can Think of it as being drawn by without raising your pen or pencil, such things are called curves.

So, a line is a particular case of a curve, but if you have a line, then you usually do not use the word curve, you use the word line. So, when you say curve, typically you mean that it is something which is not a line, but which you can draw by a stroke of your pencil or pen. And of course, when you draw such a thing, in principle, you could draw more complicated figures or curves are more general than, so graphs are particular kinds of curves. So, curves, this could also be a curve, but this is not a graph. So, this is the graph of f of x with some particular values for a, b and c.

So, again how do I read off what the values of a, b and c are from the picture or can I say something about this picture? Well, you can see that the smallest value of this f of x is taken when x is equal to b, that is when this part contributes the least which is 0. And So, I mean, so when you have drawn, so the first thing is when the graph is like this, this a is going to be positive. So, this a is positive if the graph is parabola like this and a is negative if the graph is a parabola like this. And then further, So, once it is greater than 0, then the smallest value of this function is taken when x is equal to b. So, in this particular case here, b is equal to 2. And then once we know b is equal to 2, you substitute x equal to b, then you get f of b is equal to a times b minus b squared plus c.

So, b minus b squared is 0. So, that gives you f of b is equal to c. So, in other words, this distance here, maybe I will draw this some other color, this distance here is exactly. f of b is c. So, in this case, it is f of 2. So, again, we see that these b and c and a have something to do with the geometry of the parabola or the geometry of the graph.

And we can go back and forth from the graph, we can determine the a, b and c and from the a, b and c, once we know a, b and c, we know the function and hence we can draw the graph. So there is an interplay here between the algebra which is is the functional form a times x minus b squared plus c and the geometry which is the actual picture that you can see. And what we are going to do more and more is try to understand how these two relate to each other. That is the sort of goal of this part of what we are doing.

So, along the way we are going to, so the way to do this or one way to do this is to study calculus which is what we are going to do. So, let me expand. this and also see what we get. So, this is a times x squared minus 2bx plus 2b squared plus c, which if you write is ax squared minus 2abx plus ab squared plus c.

So, I can use some other notations for ab and ab squared plus c, maybe I will call this a prime, sorry b prime and maybe I will call this c prime. So, I can write it as ax squared plus b prime x plus c prime. And so, the other way of thinking of this is that this is a polynomial in x of degree 2. So, this is something that you may have seen earlier and we are going to see very shortly. So, what are polynomial functions?

So, a function f from r to r, you define f of x to be an times x to the power n plus an minus 1 times x to the n minus 1 all the way up to a0. So, this is a polynomial of degree n and these ai's are the coefficients of the polynomial and they belong to the real numbers. So, the example is So, the function here you can look at x cube minus 4x and here is the graph.

So, this is where you are plotting the graph x comma f of x. So, in other words, where x runs over r, this is that set. So, in this case, this example, this is x comma x cube minus 4x as x runs over r.

That is what this red line, red curve is giving you. So, this is the function and it is a very nice symmetric function. I mean, not symmetric about the x or the y axis, but symmetric in some axis. And you can see that as x becomes large, this function is shooting off to infinity. And as x becomes small, the function is becoming smaller and smaller and shooting off towards what is called minus infinity.

Well, what else do we get from the picture? We can see that there are three points where it becomes 0. So, how do we find those three points? Well, you solve this equation. So, here is where the algebra kicks in. So, to get those points for which f of x is 0, we So, f of x is 0, that means x cube minus 4x is 0, that means x times x squared minus 4 is 0, that means x times x minus 2 times x plus 2 is 0. So, this happens, so f of x is 0 exactly when x is minus 2, 2 or 0 or maybe I should just minus 2, 0 or 2 just to be, just for the symmetry to sort of be clear.

So, minus 2, 0 and 2, give you the zeros of this polynomial. And so in general, of course, a polynomial may not have zeros. And we will see this such a polynomial later on, maybe not in this video, but in the next one. And then we can use this.

The form of the polynomial to get some interesting properties of the graph. So, this is something that we saw for linear and quadratic functions that the coefficients had some role in the geometry of the. graph. And similarly, over here also, the coefficients have a role in the geometry of the graph.

So, such things are going to come on, come in and this is one of the starting points of calculus. We will study more as we go ahead. Well, let us look at the exponential and the logarithmic functions. So, this is maybe something that was touched on in Maths 1. So, I have missed a g.

So, f is a function from r to r and g is also a function from r to r. f is a function from r to r and g is also a function from r to r. And what is f? f is defined as a to the power x.

So, what is the meaning of a to the power x? This is a question in itself. And when a and x are both Well, at least when x is an integer, the value is clear. If I say 2 square, then the value is clear, it is 4. Or even if I say 0.5 square, then the, we know how to compute this. So, this is 0.5 times 0.5, which is 5 by 10 multiplied by 5 by 10 or half multiplied by half, which is one fourth, which is 0.25.

But I could, if I do something like pi square, well, this is just pi square, it means you take the number pi and multiply it by itself. So, this is pi times pi and we, if we want to know what it is, we can approximate it to as good a value as we want. So, we still have some understanding of what are numbers like pi squared.

But if you change the exponent, so here this is the exponent. So, if you change the exponent to a number which is not So, if you have something like 2 to the power minus 2, I still know what this is, this is 1 by 2 to the power 2, which is one fourth or if I have 0.5 to the power minus 2, then this is 1 by 0.5 to the power 2, which we know is 1 by one fourth, which is 4. And similarly, if I do pi to the minus 2, this is 1 by pi squared, which again we can approximate to whatever degree of precision we would like. So, we understand how to do this process when we have integers.

What happens when we do not have integers? example, if I take a rational number, so if I take 2 to the power 1 third, what does this mean? Well, So, the idea here is that this is a cube root of 2. So, what this means is this is some number such that when you take the third power you get 2 and does such a number exist? Indeed it does, that is something that needs proof. We are not going to get into such things, but there is something I think you can believe.

Similarly, on similar grounds lines we can now answer things like what is 0.5 to the power 5 sixth. because we know what is 0.5 to the power 5 and then we have to evaluate that to the power 1 by 6. So, it is that number such that when you take the sixth power you get 0.5 to the power 5. So, for rational numbers also we know how to understand a to the power such a rational number. So, But now we are saying you look at the function f of x is a to the power x, where x is running over all real numbers. So, we also have to deal with things which are not rational. For example, if you take 2 to the power root 2, what is the meaning of such a thing?

So, this is a little tricky. We have to really scratch our brains about what is the meaning of this. And still I think with a little bit of thought, which I will leave to you, you should be able to figure out what is 2 to the power root 2. So, what may be really not so easy is what is 2 to the power something which is even worse something which is irrational.

So, sorry, not just irrational, but not even of this form like root 2, what is say 2 to the power pi. So, this you have to understand by understanding that when you have things like these. in the exponent, what you do is you take, so suppose I want to define 2 to the power root 2, what I do is I take some numbers which are rational numbers. So, take rational numbers which approximate root 2. as closely as you would like or maybe let me change this to say take a rational number, take a rational number which approximates root 2 as closely as we desire.

Let us call it n or maybe that is a bad notation, rational number q, which approximates root 2 as closely as we desire. So, for example, if you look up root 2 in a table, you will be able to see its 1 point something something and then you can write it as approximately equal to something by 100. So, that is a rational number. So, 1 point something something is a rational number. And then you can do 1, 2 to the power that rational number q, which we know how to do. This was exactly what we discussed over here.

So, we understand how to do 2 to the power q. So, 2 to the root 2 is very closely approximated by 2 to the power q. And if you want a better approximation, you choose a rational number which is closer to it.

And that is how you define things like 2 to the power root 2 or even worse things like 2 to the power pi. So, using this, this, you can make sense of f of x is equal to a to the power x that was a real point. How do you define for every x what is a to the power x? You do it in this way.

If x is an integer, we know what it means. It just if x is 2, then it is a squared, so that is a times a. If x is 10, it is a to the power 10, which means you multiply a to itself 10 times.

If x is minus 5, that means it is 1 over a to the power 5 and so on. And if, now if x is a rational number, you raise a to the power whatever there is in the numerator and in the denominator you are taking that root, that ith root. So, if x is m by n, where m and n are integers, then you are looking really at a to the power m which we know what it is, the nth root of that. So, it is the nth root of a to the power m. So, it makes sense.

make sense. And now for any other number, we can define it by getting rational numbers as close as we want to that. So, that is how we define this. And what is the logarithm?

Logarithm is the reverse process. When you reverse out the exponential function, you get logarithm. So, I am not defining these carefully in terms of the mathematics involved, but I want you to understand that even the definitions here, they are a little involved when you have to actually formally define them.

So, there is some work to do. So, here is two examples. y is 2 to the power x.

So, that is how this function looks like. So, the exponential is a very rapidly growing function. So, this is the exponential function with respect to 2. And this is the logarithm function. So, the logarithm function is also increasing, but it increases very slowly. They are exactly sort of, they play the opposite role to each other.

So, I hope these pictures shed some light on what these functions are. And I have to point out one thing, a is in whatever I said, this a here better be a positive number, because if you have a negative number, then we are going to really struggle when we take roots and when we, when if it is 0, then when you divide, we will have trouble. So, for this to make sense on the entire domain number, a better be a positive number. So, here a is greater than 0. Similarly, the logarithm is defined only on that part, because it is the sort of reverse function of a to the power x. That means, and you can see a to the power x takes values which are only positive, a is positive.

That means the logarithm takes positive values and gives you values across the real line, that is what it means. So, here is the function y is log x to the base 2. So, when we do it with the particular base, when a is a particular number, that is with respect to that base. And what is the relation between these two? The relation between these two is that if you take logarithm of with respect to 2 of 2 to the power x, then you exactly get back x. This is the relation between them.

So, this is called composing. the exponential and the logarithm and we will see what composing means in the next video. So, I hope this picture is again a little helps you to understand what is happening. I am not defining the exponential and the logarithm in a technically sound manner.

A function f is said to be monotone increasing if, well, it is increasing, I mean, I hope increasing should make sense, as x increases, f of x increases. So, it says, if x1 is less than or equal to x2, then f of x1 is less than or equal to f of x2. And similarly, it is monotone decreasing if the opposite happens, that as x increases, f of x should decrease.

So sometimes we also say monotonically increasing or monotonically decreasing. They mean the same thing. So, here is an example of a function which is monotonically increasing.

So, this is similar to the line that we saw in the one of the previous slides. So, this line is increasing. an increasing function, namely as x is increasing, the value of fx is increasing.

That is what is demanded by this definition here, in this definition here. And the line in red, f2 of x, the graph of f2 of x. that is a monotonically decreasing function.

So, here as x increases, the corresponding f value decreases. So, these are definitions that are worth keeping in mind because eventually we are going to study maximum values and minimum values and so on. So, we should know where functions are increasing and decreasing. So, in particular what are increasing and decreasing functions. So, let us compare various functions.

So, here is a comparison of functions which are like powers and an exponent function. So, I will Point out that this function here. is the exponential function and all the others are monomial functions, y is x, y is x squared, y is x cube, y is x to the power 4. And as you can see, by the way, even before I go there, the axis here, the x axis here and the y axis, the Labeling is a bit, I mean, you should be careful that here the steps are 0 to 2, 2 to 4, 4 to 6 and so on, whereas here the steps are of order 20. So, this y is x should, I mean, if both sides were drawn in an equal way, it should have been a line of with 45 degrees angle, but because of the So, because we wanted more values on the y side, I have shrunk it and that is why y is equal to x does not appear as 45 degrees, but appears like this because it as x increases, it increases. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. So, I have drawn 0. to 8 and y also goes from 0 to 8, but here we have 0 to 20, so and 20 to 40 and so on. So, keep this in mind and why did we do that?

Because the other functions are very rapidly increasing. So, the picture looks better like this. So, when we are, x is small, you can already see that as your monomials grow, so the exponent in the monomial grows.

So, y is x, this is y is x and then this is y is x squared and then this is y is x cube, x to the power 4. So, you can see that f of x is increasing as the exponent grows after a point. So, initially of course, something else happens, y is x is actually larger up till 1. So, up till 1, the others are below, but at 1 they change, they all become equal to 1. And then after that x square starts going faster than x and x cube even faster and x to the power 4 even faster. And then we have this exponential function 2 to the power x, which is also going quite fast as you can see it started above 0 first of all and then it was caught by almost all the functions except y is x. So, it always beats y is x.

But then after some time, y is x squared, beat it for a short time. But after that y is 2 to the power x suddenly started taking off with respect to x squared. And you can see the way it is changing, it will change and change and change. And what happens if you increase your scaling further?

So, now we have 0 to 60 on the x axis and this is 10 to the power of 0. 5. So, which means 10 cube is 1000. So, this is 1 lakh. So, here we have plotted values like 20,000, 40,000, 60,000, 80,000 and 1 lakh. And now you can see how rapid this function y is 2 to the power x is.

This is y is x, on this scaling it almost looks like a flat line. And even y is x squared looks somewhat flat, but it is not actually flat. If you draw the scaling nicely, then it looks like our parabola.

We have seen this. parabola figure before in our previous slide. And y is x cube is fairly fast, even in this scaling.

And then you have y is x to the power 4, which is this brown line. But now if you look at y is 2 to the power x, you see that it it further tilts and it beats y is x to the power 4. So, it goes faster than y is x to the power. And the point I want to make here is that if you have y is x or y is x to the power n, then there And as n increases, these functions sort of go towards infinity more and more rapidly. But all of them, all of them are eventually overtaken by the exponential function.

The exponential function is a terrifically fast growing function after something, after some time it is always going to beat any polynomial. So, this is what this picture is trying to tell you. So, this is just intuition, this is not strictly required for our course, but it is good to know how these behave.

And then on the other side, we have slow growing functions. So, here is y is x, here is y is x to the power 0.8, which is the line in brown, not the line, sorry, it is y is x is actually a line, but y is 0.8. point, x to the power 0.8 is actually a curve, but it is a very slow glowing curve. So, it might look somehow what linear. And then you have y is root x, which is you can otherwise write as x to the power 0.5 or x to the power half.

So, you can see that is below, that is below x to the power 0.8 and then you have the logarithm function which towards, I mean it is defined only on the positive side and it starts sort of very, very far below and then slowly it comes up and then it changes its direction. direction and it starts going very slowly. And the same thing that happened for the exponential happens here, but in the opposite direction, namely that the logarithm goes slower than any polynomial.

So, that is something you should keep in mind just for your intuition. So, let us close with some final ideas of things you may have seen in Maths 1, namely what are tangent lines. So, tangent lines if you remember are lines which one obtains when you take a line which intersects the curve that you have, it may intersect in many points, but then you start moving it slowly parallely until maybe sometimes what happens is it intersects the points in which it intersects all sort of come together. So, it comes to a single point.

And so, if a line intersects a curve at exactly one point, such a line is called a tangent line. So, this is an example of a tangent line. So, this is the parabola y is x squared and this is a tangent to that parabola at the point 1, I think.

And we will soon understand using calculus how to find the equation of such a line. So, we know that such a line is given by y is equal to mx plus c. So, we will ask how do I find the equation of such a line and we will use calculus to study that.

Here is an example of y is x cube and a tangent line to that. And here is an example of y is, the exponential function of y is 2 to the power x and a tangent line to that. So, I, this was mainly to recall ideas that have been studied in some detail in Maths 1. So, if you feel somewhat uncomfortable, go, please do go back and check your Maths 1 videos or the tutorial problems. Thank you for now.