A Crash Course on Derivatives

A quick sketch showing the change in a function. This is the basis of the derivative. A quick sketch showing the change in a function. This is the basis of the derivative.



There you are in your introductory physics course. The course requirements say that you have to be in Calculus 101 (it’s probably not called that) in order to enroll in Physics 101. Why? There are two mathematical things you will likely need to know to survive your physics course. You need to understand derivatives and integration (and vectors too – but that’s usually covered in physics also).


But what if your math course hasn’t covered derivatives by the time you need them in physics? Well, that’s what I’m here for. This is your crash course in derivatives (I’ll write about integration later).


Derivatives: All About Change


Suppose you have some function (it doesn’t have to be x vs. y, it could be anything). What if I want to know how this function changes as the variable changes? That’s what the derivative tells you. Let me start with a couple of examples.


There is a car moving and its position in the x-direction can be described by the following function.


La te xi t 1


If I plot this function, it looks like this (I am adding two points so that we can look at the change in position).


Sketches Fall 14 key


How does this function change with time? If I take two points (t1 and t2) I can calculate the change in x divided by the change in t. Yes, this would be the slope of the function.


La te xi t 1


That gives me the average rate of change of position during the time interval t1 to t2. In physics, we would also call this the average x velocity. In this case, it doesn’t matter what two points I pick on the graph. I will always get a slope of 2.5 m/s (yes, slope and derivatives have units). I could plot the horizontal velocity and it would look like this.


Figure 1sdf png


Ok, that was fairly simple and not that interesting. How about another example? Suppose I have this function for the position of an object in the x-direction?


La te xi t 1


Here is a plot of that function along with some points on the curve.


Sketches Fall 14 key


In this case, the average velocity (the slope) going from point 2 to 3 is different than the average slope going from points 4 to 5. Then how do we make a graph of velocity vs. time? What time would we associate the average velocity with? Probably the only fair thing would be to take two time points and find the slope and then associate the slope with the average of these two points. In fact, this works perfectly with the above function. When you do that, you get the following plot of slope (velocity) vs. time.


Figure 1sdfsdfdeeeee png


That “average time” trick doesn’t always work. However, I can make it almost work if I use very tiny time intervals. In that case, it doesn’t matter which time (beginning, end, middle) is associated with the time. So, tiny time intervals are nice.


What if you use a zero second time interval? Well, you can’t do that. However, you can do some thing close to a zero second interval. You can find the value of the average velocity in the limit as Δt goes to zero seconds. This is in fact what we call a derivative. We can write it as:


La te xi t 1


Yes, that’s not the way mathematicians would define the derivative but I’m ok with that. It shows the important point that the derivative is just a way to express how a function changes.


Example: The Sine Function


You know the sine function right? Remember you met it at that party last year? Ok, since you already know each other suppose that a mass is oscillating back and forth with the following position function.


thisisatest


Now let me plot this along with some points.


figure_1lkjhkj_png


Here you can see that by just picking some point (evenly spaced) on the function, I could find the slope between these points. However, there are several instances where this rate of change for these points is not a good representation of the slope of this function. Yes, we can make this better by putting the points much closer together. If I use a time interval of 0.01 seconds, I get the following for the velocity as a function of time.


Figure Sdfsdwee 1 png


Yes, that looks like a cosine function and NO I did not just plot the cosine function. In fact, here is the exact program I used to make this program.


 Derivativesplot 1 py Users Rjallain Projects Python Derivativesplot 1 py


If you don’t understand everything in there, don’t worry. The important part just goes through the points and calculates the slope (the “for i in range.. part”). If you want, you could change the number of points used to calculate the slope – it would be fun.


If I wanted, I could also plot the following function.


La te xi t 1


I would get EXACTLY the same plot as above. So you can see two things. First, the derivative is just the rate the function changes for very tiny time intervals. Second, this derivative can usually be written as another actual mathematical function. In general, we write the derivative as:


La te xi t 1


Here the Δs are replaced with d‘s to indicate that we are looking at the limit as Δt goes to zero. That’s it.


But how do you take a derivative?


Ummm…didn’t I just do that above? Oh, you think it’s cheating to use a computer? Ok, I can understand that. But really, it’s not cheating. A numerical program takes a derivative by using finite (but very tiny) time intervals. In real life, this is always what we are dealing with and science deals with the real world.


But how do you get a mathematical function without using a computer? I’m not going to go over all the details – that’s what your math class is for. All I care about (as a physics coach) is that you understand what a derivative is and how to find it. So, here are some “rules”.


Product rule. You never have just a plain function. They will typically be two smaller functions multiplied (like a*t – even if a is a constant). Suppose I have a function g and f (both are functions of t). Now I have a position function (x(t)) such that:


La te xi t 1


I can find the derivative of this function by finding the derivative of g(t) and f(t) in the following manner.


La te xi t 1


I will use this in an example in a short bit.


Power rule. If you have a polynomial, it’s pretty easy to find the derivative. Suppose I have a function like this:


La te xi t 1


Where n is just a constant. In that case, the derivative of this function will be:


La te xi t 1


Trig functions. Remember, I am not deriving these. I am just telling you “the answer” – so here are derivatives of the two most common trig functions.


La te xi t 1


I cheated – I skipped a small step above. Sorry. In order to really understand the trig derivatives, you also need the chain rule.


Chain rule. What if you have a function of a function (a composite function)? Here is an example.


La te xi t 1


In this case, I can take the derivative of x as:


La te xi t 1


That one might be a little harder to explain – let’s just hope you cover that in your math course soon.


Why do we need derivatives in physics?


Remember that the derivative is really just a rate of change. We usually think of rate of change in physics as a derivative with respect to time. This leads to some of the familiar quantities:


La te xi t 1


But it’s not just time derivatives that we use. If you know the potential energy as a function of position, you can find the force that goes along with this potential with a space derivative.


La te xi t 1


If you knew the potential energy function for a spring, you could use that to find the force exerted by a spring (in the x-direction).


la_te_xi_t_120


That’s not actually the best example since you normally determine the spring force as a function and use that to derive the spring potential energy function – but anyway, it’s still an example.


All of these examples are from the first semester of physics (mechanics and stuff). Hopefully by the time you are in the second semester of introductory physics you will have seen lots of derivatives in your math class. Trust me, there are many more cases where you have to use derivatives in the second semester of physics.


One final warning. Remember, this was just a “crash course” in derivatives. This should not be used as a substitute for an actual mathematics course in calculus.



No comments:

Post a Comment