- How To Get Second Derivative Graph For Logger Pro Mac
- How To Get Second Derivative Graph For Logger Pro Mac Os
To take the second derivative, we need to start with the first derivative. To take the derivative of this equation, we can use the power rule. The power rule says that we lower the exponent of each variable by one and multiply that number by the original exponent. We are going to treat as since anything to the zero power is one. Last week I got the chance to titrate a polyprotic acid. I found this a refreshing diversion from the annual acetic acid titration I do with my honors chemistry class. Lectures 17/18 Derivatives and Graphs When we have a picture of the graph of a function f(x), we can make a picture of the derivative f0(x) using the slopes of the tangents to the graph of f. In this section we will think about using the derivative f0(x) and the second derivative f00(x) to help us reconstruct the graph of f(x). Mistake: Duplicating a table in order to make a second graph of those values. Prism automatically makes a graph of each data table. So when you want to make a second graph of that same data, people commonly copy the data and paste onto a new table which is automatically graphed. Numerical time-shifted second derivative. Calculates the second numerical derivative of 'Y' with respect to 'X'. The values are shifted so that the derivatives are calculated at the midpoints between each two values. If you don't supply an 'X' column, the program will find one.
A few weeks ago, I wrote about calculating the integral of data in Excel. This week, I want to reverse direction and show how to calculate a derivative in Excel. Just like with numerical integration, there are two ways to perform this calculation in Excel:
- Derivatives of Tabular Data in a Worksheet
- Derivative of a Function using VBA (or Visual Basic for Applications)
For this post I'm going to focus on calculating derivatives of tabular data, with a post about calculating the same using VBA coming at a later date.
This is the kind of derivative calculation that is typically performed on experimental data. It can be especially useful when you were not able to directly measure the quantity of interest, but were able to measure its integrand.
[Note: Want to learn even more about advanced Excel techniques? Watch my free training just for engineers. In the three-part video series I'll show you how to easily solve engineering challenges in Excel. Click here to get started.]
The classic example, of course, is position and velocity:
Say for instance, you performed some experiment where it was difficult to obtain the velocity directly. So instead, you measured the position at various times, t. You could import the data into Excel and calculate the velocity as the derivative of position with respect to time.
The method used to perform this calculation in Excel is the finite difference method.
To use the finite difference method in Excel, we calculate the change in 'y' between two data points and divide by the change in 'x' between those same data points:
This is called a one-sided estimation, because it only accounts for the slope of the data on one side of the point of interest.
A better estimation would be to calculate the average slope at the point of interest by averaging the slope directly before and after that point.
So, if we wanted to find the slope at y2 (z), we could use this calculation:
Let's look at how to calculate a derivative in Excel with an example. We can use the position data that was calculated by integrating velocity data in the previous post and use it to calculate both the velocity and the acceleration. As a check, we will compare the calculated acceleration data to the initial acceleration data.
To make things easier for now, I've hidden the old acceleration and velocity data. We'll look at how they compare at the end.
First, I calculate the velocity using the finite difference equation above. Since we need a y3 and a y1, I start the calculation in Cell E5 and fill it down.
[Note: Want to learn even more about advanced Excel techniques? Watch my free training just for engineers. In the three-part video series I'll show you how to easily solve engineering challenges in Excel. Click here to get started.]
Next, using the calculated velocity, I can calculate the acceleration using the same method. This time, the calculation is started in Row 6.
In theory, if we differentiate data obtained by integration then we should end up back at the original data. Of course, all numerical methods impart some kind of error into the data.
But how bad is the error? Let's compare.
In this case, we can see some slight differences between the initial acceleration data and that obtained by differentiation. There are also some slight differences in the two velocity data sets. Fortunately, the error in numerical differentiation is not cumulative, unlike with numerical integration.
Tables of data are not an ideal way to examine this data, so let's look at the plots:
It's hard to see because the two lines are on top of each other, but for all practical purposes the velocities are identical.
How about the acceleration?
Here we can see that during periods of steadily increasing or constant acceleration, the two data sets are very similar. However, when there is a discontinuity in the acceleration data (i.e. at times 0.1, 0.45, 0.5, 0.7, and 0.75 sec) the acceleration obtained by differentiation (orange) does not match the original acceleration data (blue).
This is due to the equation that we used to perform the differentiation. Remember how we obtained the derivative at a point by averaging the slope on either side of that point? We're seeing the results of that here.
If you've followed along with the instructions, then congratulations! You've just performed numerical differentiation using Excel. Of course, calculating a derivative in Excel isn't that difficult once you know how to do it.
Have you used this method on some data? Tell me about it in the comments below.
[Note: Want to learn even more about advanced Excel techniques? Watch my free training just for engineers. In the three-part video series I'll show you how to easily solve engineering challenges in Excel. Click here to get started.]
The second derivative is what you get when you differentiate the derivative. Remember that the derivative of y with respect to x is written dy/dx. The second derivative is written d2y/dx2, pronounced 'dee two y by d x squared'.
Stationary Points
The second derivative can be used as an easier way of determining the nature of stationary points (whether they are maximum points, minimum points or points of inflection).
A stationary point on a curve occurs when dy/dx = 0. Once you have established where there is a stationary point, the type of stationary point (maximum, minimum or point of inflexion) can be determined using the second derivative.
If | d2y | is positive, then it is a minimum point |
dx2 |
If | d2y | is negative, then it is a maximum point |
dx2 |
If | d2y | = zero, then it could be a maximum, minimum or point of inflexion |
dx2 |
If d2y/dx2 = 0, you must test the values of dy/dx either side of the stationary point, as before in the stationary points section.
Example
Find the stationary points on the curve y = x3 - 27x and determine the nature of the points:
At stationary points, dy/dx = 0
dy/dx = 3x2 - 27
If this is equal to zero, 3x2 - 27 = 0
Hence x2 - 9 = 0 (dividing by 3)
So (x + 3)(x - 3) = 0
So x = 3 or -3
How To Get Second Derivative Graph For Logger Pro Mac
d2y/dx2 = 6x
When x = 3, d2y/dx2 = 18, which is positive.
When x = -3, d2y/dx2 = -18, which is negative.
How To Get Second Derivative Graph For Logger Pro Mac Os
Hence there is a minimum point at x = 3 and a maximum point at x = -3.