hello everybody and welcome to this introduction to differentiation and integration okay so this is going to be a fairly short intro introduction but we're going to look at the derivative and the integral okay now this is going to be um a very very brief introduction we're not going to go into the um nuances of limits um and we're only going to give a brief overview okay so this video is built to give you the uh necessary information of some basic calculus to do some introductory calculus based physics okay so this is not going to be a video for mathematicians this is a video for physics students to get a little bit of the Machinery necessary to do some things with physics So to that end we're going to start that's terrible we're going to start with the derivative okay and at the end of the day the derivative is just a rate okay the derivative is just a rate it relates how one variable will change with respect to another variable or in in more technical language it refers to how a function changes as one of its variables changes okay the rate at which the function changes uh with respect to a given variable okay we'll we'll see what this means um so to kind of give the motivation of the derivative the derivative is also the slope of a function okay so when we take the derivative we are taking the slope of a function and we can either take the derivative of a function and just keep that result or we can take the derivative of a function and then evaluate that result at a particular point okay and we will do some examples of this but to kind of motivate what the definition of the integral does okay suppose I have a function and let's say that my function my function f of x is on my y-axis and my independent variable X is on my horizontal axis and we we don't know what the function is yet we will we'll define specific functions here shortly but let's just say I have a function that's like increasing like this okay um and as you can see okay if we kind of look um in this region right here the slope the the slope of this red line is not as steep as here and this part of the the function is not as steep as up here so this whole notion of taking a derivative is to evaluate what the slope of your function is at different points okay so um with that being said I didn't want to erase the whole thing but in any case so suppose I want to know specifically I'll call this point x naught and I'll call this point X1 okay and so the value f of x has these two values okay F of X1 and F of X2 and the slope is going to be of course the the slope of a line um between two points is equal to its rise over its run Okay so whatever the change in the vertical um or the change along the vertical axis is between my two points divided by the change in the horizontal distance then this gives me an estimate of the slope between these two points right um but what you'll notice is that the slope between these two points doesn't necessarily fall right along this line okay so when my points X naught and X1 um are finite okay when they're somewhat distant apart than the the dashed Line That's supposed to represent the slope imagine that straight by the way okay the red dashed line there imagine that straight um then the The Wider Delta X's or the farther apart X naught and X1 are the less accurately the red dashed line will fall along the black uh curve that actually represents the function okay but to start we say the slope of a function the rise over the Run well the rise is the difference between my um function values and the run is the difference between my X values okay so this represents Delta y and this represents Delta X right um but to make things a little bit more accurate right what we actually want to end up doing is we want to in order to get the red dashed line to fall right along the curve what we want to do is we want to make this quantity small and in fact we want to make it infinitesimally small I gotta remember how to spell infinitesimally okay we want it to be infinitesimally small so what that means is we want to bring X1 as close to X naught as we possibly can until they're an infinitely small distance away from each other and then I want to evaluate the function through those two points and if we do that so let's zoom in okay let's put now X1 right here let's shift it over so this is my new X1 and then the distance between them is now going to be my new Delta X and now this looks a whole lot like a straight line right so if I zoom in on that function in that region I now have something that looks pretty close to a straight line and when I measure the slope between these okay now that will be very very close to being a straight line and if I make the distance between X naught and X1 infinitesimally small then it will be a straight line right as if I keep on zooming in on a curve it will eventually become a straight line and so the difference in my uh y values again is going to be the function evaluated at my second point minus the function evaluated at the first point Okay so we still have this right and we will still have Delta X well if we truly make this infinitesimal okay then here's what we do here's the way that math books would Define this let your two points be infinitesimally far away so that your whatever your curve is it's uh more or less a straight line pick a point x I'm then going to move an infinitesimal distance along the x-axis to a new point X plus h and we call this distance h okay and now we have a straight line between our two points and so the slope let's see if we can actually sharpen that up a little bit the slope along this line is going to be the function evaluated at my point just a little bit beyond my original point minus the point evaluated at the original point then divided by the width between X and X plus h so my new slope whoop slope doesn't have two e's my new slope is going to be f of x plus h minus f of x divided by h and without going too deep into limits um what we say is that this the the true derivative is in the limit let me write that a little bit better in the limit that H goes to zero okay so here's where here's where we're not going to be too formal with what the definition of what this is but what this means is that this width we're going to let become very very small infinitesimally small such that it is effectively zero um and then we'll see what happens okay and when that when this condition is met we evaluate this entire expression as H goes to zero then this isn't just the slope anymore this is now the derivative okay this is now the derivative we call this F Prime of x and it's also written take the differential of x divided by the differential of f divided by the differential of x DF DX is the derivative of f with respect to X and F is our function remember and X is our variable so let's do an example here and see how this actually works so let's let f uh let's go ahead and be let's make this f of x equals x squared okay so let's see what happens if I take the derivative of f squared so the derivative DF DX is going to equal f of x plus h minus f of x [Music] apologies I forgot to turn off my air and I don't need excess noise um so we're going to take f of x plus h minus f of x and we're going to divide that by H in the limit that H goes to 0. okay so what is f of x plus h well if f of x is x squared then f of x plus h is going to equal x plus h quantity squared so what this means is basically you just replace your argument everywhere there's an X you replace it with an X Plus H and you you then do whatever algebraic um function needs to happen okay whether it is squaring something multiplying something by a constant taking square root whatever the case may be okay so this is going to be X plus h quantity squared minus x squared divided by h in the limit that H goes to zero okay so now we expand X Plus H squared by foiling it so this becomes x squared plus two x times h plus h squared minus x squared divided by H and once again in the limit that X goes right not X but h goes to zero okay um and what you can see is that my x squared everything in the denominator I I can now add subtract so on so I have an x squared minus an x squared and then I have a 2xh uh plus h squared over h and in the limit that H goes to zero and so when I divide by H I now have 2X plus h in the limit that H goes to zero and if H goes to zero then I'm just left with 2 x okay so this is the most important result the derivative um of x squared we also write the derivative like this if you want to write out the entire function D DX I'm going to take the derivative of x squared with respect to X that's what this notation means and it's the exact same notation as DF DX the derivative of f with respect to X is just 2 x okay so this leads to what is known as the power rule and this is the most important um rule in differentiation okay if you have a function that is some constant times x to some exponent okay um then your result you'll notice okay the the the relationship between x squared and 2x 2x is the same thing as 2 times x to the one okay two times x to the first so what we've effectively done is we've taken the exponent and brought it down front and then we've subtracted one from the exponent okay so your derivative is going to be whatever your original coefficient was times your original exponent and then your variable X is just going to be raised to a new exponent that's one less than what it was before so for example let's do like three explicit examples here let's say I have three x cubed the derivative of this bring your power down so that's going to be 3 times 3 times x to the 3 minus 1 or x squared so this is the same thing as nine times x squared right um if I have um 2 times x to the fourth then the derivative of that is equal to 8 times x cubed right bring your power down multiply and then subtract one uh from your exponent and if I have let's say 3 times x to the tenth okay then the derivative of this would be 30 times x to the ninth okay now it also happens that if you have a um polynomial expression something like ax squared let's say a quadratic plus BX plus c okay and I want to take the derivative of this then I just take the derivative of each term and keep my addition or subtraction signs where they are okay um and so the derivative of my first term would be 2ax plus if I have x to the first Power then I bring that power down and this is the same thing as B times 1 times x to the zero and C is a constant so C doesn't have any X dependency on it and therefore the derivative of constants is zero actually I shouldn't put an exclamation point there because I don't want to give you the impression that it's a factorial um okay and remember that anything to the zeroth power is one so this is the same thing as B times 1 times 1 which is the same thing as B so this is just 2ax plus b okay so for example if we had um o quadratic that looks like this and I want to take the derivative uh F Prime of X or DF DX the notation means the exact same thing this would be six x plus four all right and so this is by far the most important rule all right this is by far the most important rule is this power rule now that takes care of polynomials now there are some very special functions so for example um what is the derivative of special functions okay um so for example if I have a sinusoidal function uh let's well actually I won't I I won't go here yet we'll just we'll just leave this as X and as a matter of fact let's leave this coefficient out front let's just make this sine X okay if I have sine of x then the derivative of that is going to be cosine of x I'm not going to go through the proofs here you'll do this in your Calculus classes I just want to give you the results so you know them so you'll have them if you need them for the physics all right um the derivative of cosine is equal to negative sign um if I have an exponential function then its derivative is actually itself the derivative of e to the x is e to the X um and finally the other very special function that we really need to be worried about that might crop up is the logarithmic function so if I have the natural log of x then the derivative of the natural log of x is 1 over X okay so you can derive these using the original definition of the derivative okay this is definitional so really in that sense this could be a three liner because it's a definition and you can derive the results I just gave you using this but for the special functions you actually have to do some particular expansion techniques to get the X Plus H and so we're not going to worry about those we're just going to hand you the results now um there's an extra piece of this called The Chain rule and the chain rule says well what if I have a composite function okay so here we have something like this okay so here I have a sine function but I also have a function 2x so this is a function within a function how do I take the derivative of a function within a function well what the chain rule says is if I want to take the um derivative of this then what I do is take the derivative of the first function so I'm going to take the derivative of the sine and I'm going to leave the argument alone I'm going to leave the argument whatever it is but I know the derivative of sine is cosine so the first step is that this is going to be the cosine of 2x I've left the argument alone and then I take the derivative inside which is 2 and I multiply the 2 together so this is 2 times the cosine of 2x okay so the derivative of sine 2x is 2 times cosine 2X um and you can get more exotic functions no doubt for example what if I have f of x equals 3 times sine 2X plus 4 Ln times x okay if I want to take the derivative of this function so remember plus signs are left alone so I'm going to take the derivative of this and then I'm going to add it to the derivative of this and I can take them both individually um and so what I'm going to do is I'm going to take the derivative now the derivative of 3 3 gets left alone right it's a constant so it gets left alone when it's a multiplicative Factor if it were by itself its derivative would be zero so this is going to be left alone and this is going to be 3 times the cosine of 2x times 2 for the derivative inside the argument Plus 4 times the derivative of Ln X which is 1 over X so this is going to be equal to 3 times 2 is 6. oh cos plus 4 over X okay okay so that will get you started on the derivative okay there are uh more nuanced things um actually I will make one more um uh note here and that there's another rule called the product rule and there's there's another rule called the quotient rule but in fact you can derive the quotient rule from the product rule so if you know the product rule you actually know the quotient rule or at least can get it so I'm not going to go into the details of the quotient rule but we will mention the product rule and the product rule says if I have a composite function so let's say my function f of x is actually two functions multiplied together say G of x and P of x okay whatever they might be and so let's say that um let's let G of X for example be 3x and P of x is equal to sine of 2x okay so in this example f of x is going to be equal to well let me let me State what the rule says and then we'll do the example so the rule says that if you have two functions multiplied together then the derivative of those two functions is equal to the derivative of the first times the second plus the first times the derivative of the second okay so in this case f Prime of x would be G Prime the derivative of 3x is going to be 3 times the original function of P and then I have my original function for G and then I'm going to multiply that by the derivative of P and the derivative of p is sine 2x times 2 I'm sorry cos two x times 2 okay so this is going to be the same thing as 3 times sine 2X plus 6 x cos 2 x okay so that is the product rule um that's pretty much it for differentiation this is the uh um this is the most important rule to remember okay that when we take the derivative of something we're just going to bring down the power uh if it's a polynomial which it very often will be for a lot of our purposes that's why this rule is so important um because it's the one we will encounter the most often until we get to sound waves uh oscillations and things um this will be the the rule that we follow the most um and by that point if you haven't had if you haven't completed calculus yet but you're in the calculus course then it will be uh you'll have done this several times over you'll understand exactly what's going on um so that brings us to the integral okay so the integral does the opposite of what differentiation does in fact sometimes it's referred to as the antiderivative foreign sometimes it's referred to as the antiderivative so the integral what an integral does okay um instead of evaluating a function at two points and then taking the slope what an integral does okay if I have a function like this what an integral does is an integral adds okay an integral represents a sum all right and um what it really represents is an area under a curve okay so an integral represents an area under a curve but the process of integration is exactly opposite of what you do when you differentiate okay so if you can figure out a function if let me let me rephrase if you are tasked with taking an integral the very first thing you want to do is ask yourself is the function that I'm trying to integrate is it a result of differentiating a function if so you can reverse engineer that differentiation and you can then find the integral and that is the bulk of integrating okay now there's a lot of individual special techniques to arrive at those things because a lot of your functions may not be obvious what the um uh original function was and and there's a lot of different techniques to find those there may be the case where your function doesn't have uh an original function that you took the derivative of or it could take the derivative of there are a lot of functions that are said to be non-integrable they don't have a function who's taking their derivative equals that function and when that's the case if you want to actually integrate you usually have to do some sort of numerical analysis with a computer but um for the moment we're going to avoid that okay but what an integral does let's say I am going to look at two points once again X1 and X2 and I look at the Shaded region here okay the integral will find the area of that shaded region okay and so what we do when we integrate we use kind of an S looking shape and say I want to integrate f of x and I have to integrate it with respect to a given variable so this DX represents a differential variable and it represents the exact same thing um that the DX in DF DX represents okay this DX represents the infinitesimal length along the x-axis or the variable that you're differentiating with respect to and so when you're integrating you're saying okay I'm going to multiply my function here at some point and then I'm also I'm going to multiply that by some width DX and length times width represents an area okay and then I multiply then I find my next f of x and I multiply that by DX again and a very small width and I find the next area and I keep doing that process and that is when I complete doing that process across the entire interval that I'm looking at then I will eventually obtain the entire area under the curve here so the integral represents just taking sums but if my DX is truly infinitesimally wide okay technically I guess I should have mentioned this but this whole H where we let H be a really really small width along the x-axis that is what DX also represents okay DX is the same thing as h right so what this says is evaluate your function at a given point multiply it by a really really tiny width to get an area and then the integral sign says do that for an entire given interval and then that will represent the sum of all of the little tiny areas that you have calculated okay um and so what this means is we have two types of integrals we have an indefinite integral and we have a definite integral okay so in an indefinite integral means there are no limits no X naught and X1 that you're taking the integral with respect to you're just finding the antiderivative of a function you're just finding um whatever function represents uh taking the derivative of the function that you find represents the function you are taking the integral of I know that's a heck of a sentence but um this is just the antiderivative okay your definite means evaluate your integral between two specific points now one of those points could be infinity or in fact both of those points could be Infinity technically what we would do is say negative Infinity to Infinity but um there are times when you're going to want your upper bound to be Infinity okay but Infinity is a specific point from a mathematical point of view nonetheless okay now um let's just do some examples and kind of dive in here so let's say I want to take the integral of x squared okay so I want to find a function that when I take the derivative of I get x squared so if I want to take the antiderivative of this I basically have to find the function that when I take the derivative of will give me x squared well if I come up here come back to the come back to the power rule if I have a function that's of this form then the antiderivative will be in this form so what that means is I want to add 1 to my exponent to go from here to here and then I'm going to divide by that new exponent so when I have the power divided by the new Power I recover just a times x to the n so doing that adding 1 to my power and then dividing by my new power gives me this and we can see that if um my original function f of x was indeed x cubed over three that taking the derivative of this is the same thing as one-third times three times x squared which in fact is of course x squared so that's great now there's one extra point about indefinite integrals and that is we always have to add a constant okay and this is because uh well this is because the derivative of a constant is zero so there can always be a constant at the end of a polynomial chain or really any any function there can be a constant at the end of it with a plus sign and the derivative of this will always be zero so when I take the antiderivative I don't know if there was a constant hanging out there or not so we always just add one obligatorily okay so the official result for the indefinite integral of x squared DX is X cubed over 3 plus c okay uh let me write it a little bit cleaner if we have the integral of let's say x cubed plus 2 okay and I want to find the indefinite integral of this then do the power rule on each term oop I need the DX I need to know what variable I'm integrating with respect to um and so for the X cubed I'm going to add a power I'm going to add 1 to the power and then divide by that new number and then I'm going to take the 2 and this is the same thing under the integral sign as 2 times x to the 0. okay so if I have x to the zeroth power then if I add a power this becomes 2X and then I have to add the constant because I don't know if there was a constant hanging out or not all right and once again we can see that this is in fact the integral if my original function was indeed x to the fourth over four plus two X plus c then if I take the derivative then bring my first power down 4 over 4 times x cubed Plus two times one times x to the zero plus zero since the derivative of a constant is zero and this becomes x cubed plus two which is the function that I was taking the integral of originally so these agree okay so integration actually has the advantage that in in many cases if not most cases you can check your result by taking the derivative of your results of your integration and that will help you check and make sure that you've done your integration properly okay um so to that end some Integrations of special functions okay um some Integrations of some special functions well the integral of cosine X DX is equal to sine X the integral of negative sine X is cosine X the integral of e to the x is e to the x and the integral of 1 over X is equal to Ln X now I should mention that 1 over X is the only Power for which the integration um the the power rule on the integration and differentiation doesn't work okay uh it it 1 over X I can differentiate 1 over X but I can't integrate 1 over X using the power rule because this is the same thing as saying x to the negative 1 DX um and that is that would be equal to if I used the power rule on this this would be negative one bring that uh I don't want to bring that down um I want to add so this would be x to the negative one plus one over my new power which is zero so this is X to the 0 over 0 and of course that is a bad result so the fact that you would end up dividing by zero here means that this is not a valid thing that you want to do so that's why you cannot use the power rule here okay um all right so last thing um is to talk about definite integration and definite integration says what if I take the derivative or take the integral of a function and let's actually do an explicit example here let's say I have the function f of x equals x squared and I want to calculate the area under the curve between x equals 1 and x equals 3. okay so I want to calculate the area inside that box represented by this shaded region here okay I want to calculate the area under that curve right so what we do is we write our integral sign and the function we're going to integrate our integration variable that we're going to integrate with respect to and then our limits go on the ends of our s here so this is going to be from 1 to 3. okay so here's what this means take the antiderivative as you normally would and so this is going to be X cubed over 3 but instead of adding that obligatory plus c what we do is we now say that we're actually going to evaluate this expression from one to three okay so this line with the numbers at the bottom and top means evaluate this function from one to three so what we're going to do what this means is that I'm going to plug in my top value or my upper limit in for my x value and then I'm going to subtract the result of plugging in my lower limit in for x okay so definite integrals say find your anti-derivative evaluate your function at your upper limit evaluate your function at your lower limit and then take the difference between the two okay so this is going to be nine thirds minus one third or eight thirds so the area under this curve is eight thirds that's what this represents okay let's do another example here so let's evaluate um the cosine function from 0 to Pi halves okay that's a terrible pie that's a much better pie um so if I want to integrate cos x DX come back to our list of results and the integral of cos x DX is sine of x and I'm going to evaluate that from 0 to Pi halves so this is going to equal the sine of Pi house minus the sine of zero and if we assume that we're in radians which these measurements are radial in radian in nature anyway so uh it's a very very safe assumption the sine of Pi halves is of course one the sine of zero is zero so the area under a sine curve if I look at one cycle here the area 0 Pi halves would be here and Pi would be here three halves Pi would be here and Pi 2 pi would be here so the area of this shaded region right here the area of that shaded region is equal to one okay that's what that result is telling you the area of that shaded region is one if this is X and if this is f of x okay so um those are the major tools that you will need um everything else that that might crop up you'll you'll get in your Calculus classes but these are the two major things that we're going to need sooner rather than later so that's why I wanted to put these in front of you um and if you have questions you can always ask me in class and we will see you in the next lecture [Music]