Overview of Mathematical Processes Covered in this Course

 

In this segment, we'll talk about an overview of the mathematical process which I covered in this course. So, we are going to develop numerical methods for different mathematical processes. For example, we're going to have methods to solve nonlinear equations, different numerical methods, simultaneous linear equations, curve fitting, under which you get two categories, one is the interpolation, and one is regression. Then we will cover differentiation, integration, and ordinary differential equations. There are other advanced mathematical procedures or processes which are of interest also, such as partial differential equations, optimization, and fast Fourier transforms but that's not what we cover at the course at USF, but they are available at the website. So, the first one which we are talking about is a nonlinear equation. So, everybody is familiar with the quadratic equation like this one for which the exact solution is given here. And what do we do about other equations? So, you can have a cubic equation like this one. And for this you can find an exact solution, but it's cumbersome. You can have a fourth order polynomial equation which looks like this and for this also you can find an exact solution but again it's very cumbersome. However, for anything which is a fifth order polynomial or higher you cannot find a general exact solution for the problem. So, you’ve got to resort to numerical methods. And also, I want to make sure that people don't think that hey the only kind of nonlinear equations we have are polynomial equations that's not the case. You could have tan(x) = x, for example x equal to 0 is a simple solution to it, but there are infinite number of solutions for this particular problem which also have to be found numerically. Let's take this applied example here what we have is a floating ball in water and we want to find out the distance to which this floating ball is under water. So, if we are given the radius of the ball and especially gravity of the ball that's enough to set up the problem. So, the way you set up the problem to keep it short is that we simply say that hey the weight of the ball is compensated by or is balanced by the buoyancy force. And the buoyancy force is given by the weight of the water displaced corresponding to this volume when you apply all these you apply the Archimedes’ principle, what you're going to get is you're going to get a cubic equation like this one where x is in meters. So, you can very well see now you have a cubic equation yeah you can solve it exactly but it's going to take you a long time to do so. So, it's better to maybe solve it numerically and find the solution. Also keep in mind that since the cube equation will have three roots and those three roots can be all real or maybe one real and two complex so that's a possibility which you have to always think about. You have been exposed to simultaneous linear equations ever since high school, so let's look at an applied problem here so let's put somebody saying that hey the velocity profile of this rocket is given the velocity is given at different times here and what we are trying to do is to find out what the velocity profile would be so if we take a second-order polynomial which gives us the velocity profile between 5 and 12 seconds how can we find out what the values of a b and c are so that we can find the value of the velocity at some other point? So this gives you the graph of the problem, and so in order to find a b and c, all you have to do is to say that hey since at t=5, the velocity is equal to 106, this equation right here has to this equation right here has to be valid at 5, so if you put t = 5, then on the right-hand side I can put 106. Same process here at t=8, the velocity is 177, at t=12 the velocity is equal to 600. what this basically gives me is three equations and three unknowns. So, it gives me three equations and three unknowns, And that's the three simultaneous linear equations you're getting. Now people might say hey I have solved three simultaneous linear equations in high school why do I need to learn numerical methods? Yeah, surely three equation three unknowns is doable even with the maybe a fancy calculator. But once you have, let’s suppose, hundred equations hundred unknowns uh what are you going to do then? So, in order to be able to solve large number of equations you will have to use some kind of a numerical method to solve simultaneous linear equations. So this brings us to the point that numerical methods are used for two reasons; one is to solve problems which cannot be solved exactly and the other one is to solve problems which can be solved exactly but might take a long time to do so. So, I can tell you right now that if somebody gives you simultaneous in these equations you can solve those problems all by hand even without a calculator but it's going to take you a long, long time to do so. The next mathematical process we're talking about is interpolation so here what we have is somebody's giving us let's suppose the velocity at three different times what interpolation simply means is that hey using these three values what I would like you to do is to find the value of the velocity at some other times so say seven seconds. So that's what interpolation is all about. Any curve which you're going to draw for interpolation has to go through the points which you have chosen for this. So for example in this figure here what you are doing is that if you remember the previous slide, we had the same three data points and what we did was we inter we use the velocity profile of a*t^2 + b*t + c between 5 and 12, so that's the interpolant which we're using, and if we find a, b, and c, as we did from the previous slide we can find out what this velocity profile would be. And now based on that I can find out here what the value of the velocity will be at seven seconds. So, the value of the velocity of the seven seconds will be right here. What you got to also think about is that hey you know you might have taken a course in thermodynamics or some other or statistics class where you simply said hey you know to find the value at some point which is not given to me I simply draw a straight line, you can see that the value for the velocity which you're getting is is right here. So that is not enough because in those courses you are basically finding an interpolated value, but you do not know how good it is. So by doing interpolation with different polynomial orders, you might you will be able to get that information as well. So that's why it's important to talk about interpolation beyond what you may have learned in other classes. The next topic or the next process for which we're going to deal with in numerical methods is called differentiation so you've taken a whole course on differential calculus as a prerequisite to this course, and if somebody gave you the expression for velocity and asked you to find the acceleration you would simply use your differential calculus knowledge to take the derivative of this velocity term and substitute t = 7 in order to get the value of the acceleration 7, good. However, if you want to find the value of the acceleration approximately because you're writing a computer program for it, then in that case what's going to happen is that you will have to use numerical methods to be able to do so.  So that's what differentiation is uh differentiation of continuous functions is all about. So many times, what's going to happen is that your function may not be given as a continuous function, but might be only given at discrete points such as this here. So, you are given the value of the velocity at three points you're asked to find the acceleration at seven seconds. So, what do we do in that particular case? So, somebody might say hey I can use the same kind of shortcuts which I learned in my previous classes where I simply draw a straight between two points and I can find what the what the straight line is and then the slope of that straight line will give me what the value of the derivative of the function is at this point, 7 let's suppose, and we're done. However you might be looking for more accurate methods if you're looking for more accurate methods you might say okay three points are given to me so I might what I'll do is I will take a velocity profile which looks like this and based on knowing the velocities at three points I can find the value of a_0, a_1, and a_2 by setting up three simultaneous linear equations and once I've done that then I can take the derivative of the velocity expression this second order polynomial, and find out what the acceleration expression is and then I can plug in the value of t = 7,  and get the value of the acceleration. So, the next math process we're talking about is regression. So what regression is about is also curve fitting just like interpolation but in interpolation what you do is you choose a certain number of points you're going to use for interpolation but the curve which you're going to draw through those points uh has to go pass through all the points. That's not the case in regression. In regression, what you do is you take the points are given to you and you try to draw a simplified curve to explain the data and it does not have to go through all the data points; so, for example here I’m given thermal expansion coefficient as a function of temperature, and I want to relate the thermal expansion coefficient versus temperature to each other. So, what I might do is I might say hey, let me draw a straight line which explains the data here. Now you don't draw the straight line randomly but there are certain criteria by which you're doing that but the main thing to understand is that the curve which you just drew does not have to go through any of the points but of course it has to be close to it and there's criteria to be able to do that. When we use that criteria, let's suppose for linear regression, then this is the curve which we are getting by doing that. Now keep in mind the regression is not just linear it can be nonlinear as well. You can have a relationship which is exponential in nature, or you can have a polynomial of a higher order other than the straight line which we have just shown you here, and that's something which we'll talk about in the regression chapter. So, the next uh mathematical process for which we're going to find numerical uh techniques uh will be integration. Look at this particular function and you must have seen this in your in your statistics class it's the standard normal cumulative distribution function, and when you are doing this integration right here, you're going to find out that only for x equal to 0 or x approaching infinity can this particular integral be solved exactly. But for any other value of x, let's suppose if I want to take the value of x to be -1 in this case, this particular amount of area has to be calculated numerically because it cannot be found exactly for values of x other than 0 and approaching infinity. Let's take an applied problem right here. Here is what we're asked to calculate is let's suppose a diameter contraction a steel shaft when dipped in liquid nitrogen. So, you are the formula is given by whatever is the diameter of the steel shaft and you're going to integrate this function right here from the room temperature to the fluid temperature; so, let's suppose you put in liquid nitrogen the room the room temperature might be 80 degrees Fahrenheit, let's suppose. The fluid temperature liquid nitrogen might be at -321 degrees Fahrenheit and in order to do that what you'll have to do is you'll have to calculate this integral. Now the data points for alpha versus temperature are not given as a continuous function are not given as a continuous function but are only given at specific points. So, you will have to somehow be able to integrate this function. So, let's suppose if I’m integrating from -321 to 80 degrees, I want to somehow find some kind of a curve which goes through all these points here to be goes through all these points or regressed to these points to be able to find out the area under the curve here. But no matter what you are going to do is that you are going to be numerically finding out what that area under the curve is to us to be able to calculate the value of the integral. And the last mathematical process which we will talk about is in this course is ordinary differential equations. So, here's a good example of this steel shaft or this trunnion right here and somebody has to cool it down. And let’s suppose somebody puts it in a liquid nitrogen bath, the typical question some people might ask is that hey how long is it going to take for it to cool down? How long do I need to keep this trunnion in the liquid nitrogen bath? Typical differential equation would look like this that if theta is the temperature and t is the time, then you can find out the relationship between the rate of change of temperature to with respect to time given by this first order ordinary differential equation, where m is the mass, c is the specific heat, h is the convection coefficient, A is the surface area, and theta a is the ambient temperature which will be the temperature of the let's suppose the liquid nitrogen which it has been put in. And of course, we need to know what the initial temperature would be as the initial condition. But what I’m trying to say is there are two things which you have to think about here is that of course you might say hey oh I have taken ordinary differential equation course and I could solve this particular differential equation exactly yes you can only if these quantities m, c, h, and A are constants; they don't change with respect to time. But when you when we are taking things from room temperature to cryogenic temperatures or dry ice and alcohol mixture or liquid nitrogen, you'll definitely find out that what happens is that this specific heat which you have itself will be a function of temperature this convection coefficient itself will be a function of temperature. Suddenly this differential equation which seem to be benign to begin with becomes a non-linear ordinary differential equation which cannot be solved exactly, but you will have to use numerical methods to do so. So, what we have done is that we have talked about these different mathematical processes for which we will find numerical methods, and this becomes some sort of introduction to it, you may still wonder hey what are these numerical techniques and how are these problems related to those numerical techniques. That's the whole point of the course itself. So, think about these things whenever we are talking about numerical methods, and also keep in mind these two things all the time whenever you are learning numerical methods. That numerical methods are used for two reasons: one is that we are going to solve problems which cannot be solved exactly, and we are solving problems which can be solved exactly but might take a long time to do so otherwise.