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 talk about functions of one variable. So, this was an idea that we introduced in the previous video, namely these are functions from some subset of R to R. And here is an example of such a thing.
So, the common examples that we have seen, I mean that we have heard of, but we may not have studied in maths 1 are the trigonometric functions. So, I am going to do a large part of this video is going to be about the trigonometric functions and then we will study some other generalities. So, the sine function. So, it is a function from r to r defined as sine x.
And how do you define it? Well, let me first draw the graph and then you the definition. So, here is the graph. It is a very nice graph. It looks like a, it is periodic.
So, such graphs are called periodic or sinusoidal. And it varies between minus 1 and 1 and it has period 2 pi. So, as you can see, if you look at its trajectory between minus 2 pi and 0, we start like this and come here and then come here and then it restarts. So, again, go back and again 2 pi. So, it has period 2 pi, that is what we mean.
So, if you shift it by 2 pi, it does not really change. So, this here is the graph of that function f of x is sin x, which means it is a set of values x, f of x, where x is in R. Of course, the entire graph, it keeps going, it does not end at minus 2 pi and 2 pi, it keeps going over the entire real length. And how do we define this?
So, when you give a real number, when you input a real number x, what does, what do I actually do to compute this? So, to compute this, what you do is you first define it between 0 and 2 pi. So, I mean, I am giving you the heuristic definition. There is another definition, which is a technical one, which I am not, I want to avoid in this course till later on where we may be forced to use it.
So, between 0 and 2 pi, what you do is, or at least let us say between 0 and pi by 2. So, suppose x is between 0 and pi by 2. So, this is x. Now, we know what is sin of x. So, sin of x is the opposite side by the hypotenuse, the length of the opposite side by the hypotenuse.
So, length of the opposite side. by the length of the hypotenuse. This was exactly how we define sin of x. So, we know what is sin of x when x is between 0 and pi by 2. And now if you carefully look at the picture that should tell you how to define sin for any number because once I know what it is between 0 and pi by 2, for pi by 2 to pi, I use the fact that this is sin of x.
So, I from there I will be able to say what is, if you give me let us say this value here, this point here, then I look at the corresponding value here and that value is what I get here. So, I then I know what it is between 0 and pi and again for between pi and pi, sorry pi and 2 pi. you kind of, you reflect it like this and then you reflect it like this or if you want you rotate it like this and that gives you, so you either reflect like this and like this or you rotate it like this. So, that tells you what is the sign of any particular point. So, hmm.
So, this definition will be able to tell you what is sign for between 0 and 2 pi. And then if you have something which is not between 0 and 2 pi, you just add or subtract multiples of 2 pi, so as to get it within 0 to 2 pi. And then you define the, we know what the definition is over there and you use that to define this function. So, I am giving you a heuristic definition of what is the sine function. There is a more formal mathematical definition which I will avoid for now.
But the main point is it is a very beautiful definition. Beautiful looking function and it is a very useful function as well. The next function that we may have already encountered before not as a function, but as cosine of an angle is, so that is a cosine function. And again, the idea is the same. We define it between 0 and pi by 2 and for the rest of the picture, we extend it by some, from the picture, we can see how to extend it.
And between 0 and pi by 2, what is cosine of x? So you, if x is between 0 and pi by 2. then you draw x over here. This is the adjacent side, this is the hypotenuse and then cosine of x is the length of the adjacent side divided by the length of the hypotenuse.
So, this defines it between 0 and pi by 2 and now from the picture you will be able to see how to extend it beyond that and because of the periodic nature of the function. So, we will study some relations like this later on in this video. So, the cosine function has similar properties to the sine.
The cosine function is periodic of period 2 pi. It is an example of a sinusoidal function and it takes values between minus 1 and 1. that part is clear because the adjacent side cannot have larger length than the hypotenuse. So, this value can be at most 1, but of course, there is, we are also allowing minus because we kind of flip it below. So, the minus is for example, to keep track of which quadrant we are talking about.
This we have, these ideas we have seen in when we did We changed our orthonormal basis, if you remember that video. So, I will suggest you go back and check that video. Here is how the sine and the cosine function look when we put them together.
It is a very beautiful picture. And you can see that the cosine function or the sine function, whichever you prefer, is just a shift of the other one. So, if you shift it by pi by 2, then you get the other one. So, this is something you can keep in mind and we will Yes, we will use this.
Well, we will not use it directly, but we will mention this later on also in the properties. So, what are the other trigonometric functions that you may have heard of? The tangent function often called the tan of an angle. So, f is from r to r, it is f of x is tan x and now here we need a little bit of a caveat because this f is actually not defined on the entire r.
So, here let me first make this Yes, let me first show this graph and then make the statement I want to. So, as you can see this, this is again a function which is periodic and here from minus pi by 2 to pi by 2, it rises very rapidly. So, it increases very, very, very fast until it hits a point, then it is relatively slower, it passes through 0, 0 and then again it it shows the opposite kind of behavior.
So, again it rises slightly slowly and then takes off. and what happens on this red line, which the two red lines which are on. So, those are the lines minus pi by 2 and pi by 2. So, at minus pi by 2 and pi by 2, this function takes the values minus infinity and infinity. So, you can either think of it as taking those values or you can think of it as an undefined function.
So, since we are talking about real numbers, we think of these as undefined, which means that this function is not really defined on the entire real line, it is defined on the entire line. defined on r minus n pi by 2 where n runs over odd numbers, odd integers. So, we do not ask what is f of minus pi by 2 or f of pi by 2 or minus 5 pi by 2 or f of 7 pi by 2. So, for such numbers tangent is not defined.
For the other numbers, it is defined by these graphs and it is again this is periodic of period pi. So, if you want something in here, you just shift it by pi each time and then you can find the value. And how do we define it between minus pi by 2 and pi by 2? So, for this again, we will define it only between 0 and pi by 2 and the symmetry of the function will allow you to say what is it for minus pi by 2 to 0. So, now this is if x is between 0 and pi by 2, this time you look at the adjacent side. and the opposite side and you define tangent of x as the length of the opposite side by the length of the adjacent side.
So, this function is called the tangent function. So, the main point is here is that we are, I mean, what we are exploiting here is that this ratio is constant, it depends only on the angle, it does not depend on how large the triangle is. I mean, I could, instead of this, I could draw another triangle like this, where this is x, this is of course a right angle triangle. But the ratio will not change.
This is something you can prove by similarity of triangles. So, this is how you get tangent of x. I will also point out that the tangent function should have something to do with the tangent that we have seen in the previous video towards the end and indeed it does and that is something we will explore using calculus. So, let us look at some other the other trigonometric functions and identities governing them. So, we also have the cotangent function cot of x, which is 1 by tan x and then the secant function secx and the cosecant function cosecx.
Here are some identities on these functions. So, if you take sine of minus x, that gives you minus sine. This is exactly how we extended the function beyond 0 to pi by 2. And then cosine of minus x is just cosine of x.
Again, we have used this to expand the, extend the function. And tan of minus x is minus tangent of x. Very important identity, sin squared plus cosine squared is 1. This is a straightforward consequence of the Pythagoras theorem, so called Pythagoras theorem, which of course was known much before Pythagoras in many civilizations. And then what is tangent of x? That is the sin of x divided by the cosine of x.
Here of course, there is a caveat, the denominator has to be non-zero. So, we do not talk about it when the denominator is 0. And when is the denominator 0, that is exactly those points where you have n times pi by 2, where n is odd. That is exactly where cosine function takes 0 values. That is, so we have already ruled those out when we define the tangent.
So, that we have to keep in mind when we write down this identity. And then 1 by cosine of x is secant of x, you can think of this as the definition. And 1 by sine of x is cosecant of x, again one can think of this as the definition. And of course, again in these cases, we have to be careful about what is the domain because not all of R will work.
So, you have to throw out those points where cosine or sine are 0. So, these are some identities. There are other identities, I am not writing down all of them. For example, if you take sin of x plus pi by 2, we can express that in terms of sin of x or if you take cos of x plus pi by 2, you can write that in terms of cos of x and so on. So, I am not getting into that, but the picture should tell you what the identities, if you go back to the graph.
So, finally, so we have studied some nice functions, the trigonometric functions. Finally, let us study some general properties of functions of one variable. So, these are all remember functions of one variable. You have input x, which is a real number.
not be all real numbers, it may be in some smaller set, that is what we saw for example, for the tangent function. And the same thing happens by the way for secant and cosecant, they are not defined on all of R because it will depend on where these become 0 and that we know from the graphs of cosine and sine. So, these are all functions of one variable. So, now some general definitions.
So, arithmetic operations on functions, so we would like to add and subtract and divide and multiply functions and indeed we can do that without any Any problem? So, if d is in R, it is a subset of R and we have two functions f and g, both of which have domain d. So, the sum function f plus g is defined on d by f plus g of x is fx plus gx, where x is in d.
So, for example, if you take sine plus cosine, then that is just sine of x plus cosine of x when you evaluate it at x. Already we have seen this idea of the sum when we constructed polynomials because we know what monomials are and then polynomials are sums of monomials with coefficients. with scalar multiplication. So, look at the product function, so f times g. So, this is where you take fx and you multiply it to gx, that gives you the product function fg.
So, sometimes this is, maybe not even sometimes, maybe often this is written as fx times gx. So, be aware of that, this is often written like this. the times is removed. Let C be in R, the function C times f is defined on D by C times f of x is C times f of x.
So, again this is often denoted by C times f of x. And finally, if gx is non-zero, we can divide by g. So, f by g is defined on x by looking at f of x by g of x and it makes sense because g of x is not 0. So, the quotient is always defined when g of x is not 0. So sometimes what may happen is that f and g are both defined on the domain D, for example, sine and cos are defined on the entire real line, but there are values on which cosine cosine, for which cosine is 0. So, when you divide sine by cos, you have to restrict your domain to those values where cosine of x is not 0. So, that is why the tangent function is defined on all values of r except those points which are odd multiples of pi by 2. That is an example.
So, it is not defined on all of t. So, here also the same thing, that is an example of this fourth arithmetic operation. So, again this is f of x times g of x and this is c times f of x.
So, I hope these are clear. So, in particular the fourth one you can use this to create rational functions. For example, you could take h of x to be x divided by x squared plus 1. X squared plus 1 is never 0 because you have a square plus 1, so it is always bigger than equal to 1. So, this function makes sense, it is a function from r to r.
And how did I get it? I got it by looking at f of x is x, g of x is x squared plus 1 and then looking at f by g. So, finally, let us look at functions obtained by composition.
So, let D be a subset of R and f be a function on D. G is a function from E to R where the range of f is in E. This is very important that the range of f is in E.
Then for each x in D, we have f of x is in E and so we can talk about g of f of x. So, this yields a well-defined number in R. And thus we obtain a function g composed f d to r which is called the composition of f and g defined as g composed f of x is g of f of x.
So, here is an example. Let us take f of x to be x square plus 1. This is a function from r to r. So, let us take g of x to be root x.
This is again a function. from the positive side of the or non-negative side of the real line to R. So, again note here that the domain of g is restricted. Then we can talk about g composed f and that is just root of x squared plus 1. So, why can we talk about g composed f? Well, let us look at what is the range of f.
So, range of f is all those values y in R such that y is equal to x square plus 1 for some x. But x square plus 1, what values does it take? So, the smallest value it takes is 1 and then after that it takes all values. So, this is exactly, we said 1 comma infinity.
So, it does not contain negative numbers and that is why taking square root makes sense. So, therefore, this belongs to the domain of G. which we know is 0 comma infinity.
So, this that is why we can do this idea of composition. So, we have seen in this video the trigonometric functions. I have not defined them, but I have told you how to think of them and how to compute using them. We have seen some identities.
concerning trigonometric functions. So, these are all functions of one variable. And then in the last two slides, we saw some general properties of some general operations we can do on functions of one variable.
And we can add them, we can scalar multiply them, we can multiply them and if they have the same domain all this and we can even divide one by the other provided the denominators are non-zero. And then if you have two functions with the range and the domain sort of match nicely, then you can compose them. That is what we did at the end. Thank you.