Updated Atom Builder

A couple of my students asked for worksheets to practice drawing atoms and electron shells. I updated the Atom Builder app to make sure it works and to make the app embedable.

So now I can ask a student to draw 23Na+ then show the what they should get:

Worksheet

Draw diagrams of the following atoms, showing the number of neutrons, protons, and electrons in shells. See the example above.

  1. 14C: answer.
  2. 32K+: answer.
  3. 18O2-: answer.
  4. 4He2+: answer.
  5. 32P: answer.

I guess the next step is to adapt the app so you can hide the element symbol so student have to figure what element based on the diagram.

Differentiation Using Limits

We can use the idea of limits to come up with some general relationships between functions and their slopes. Take, for example, the last project where we found the slope of the function y = x2 at the point where x = 3:

The green line is the curve y = x2 and the straight red line is the tangent to the curve at the point where x = 3 (i.e. at (3,9)).
The green line is the curve y = x2 and the straight red line is the tangent to the curve at the point where x = 3 (i.e. at (3,9)).
Finding the approximate slope using a forward difference.
Finding the approximate slope using a forward difference.

We found the slope of the tangent line at the point (3,9) by a series of approximations. First we took two points on the curve, (3,9) and (4,16) and found the slope between those two points.

The equation for slope can be written in any of these three ways:

slope-line

we find the exact slope by taking points on the line closer and closer together (which means that Δx is getting smaller and smaller). In math-speak, we’re saying that we’re taking the limit of the slope equation as Δx approaches zero.

slope-limit

Since we’re taking Δx to zero we might as well ask what happens to the slope when Δx is equal to zero.

slope-undef

As we can see from the equation, we end up with zero on the denominator, which makes the whole thing undefined, which we really do not want.

But what if we can rearrange things to get the Δx out of the denominator?

Let’s rewrite the equation y = x2 as a function:

 f(x) = x^2

So the point we’re interested in find the slope at is just (x, f(x)), which in this case happens to be (3, 9), but we’re not going to be using the actual numbers anymore so we can come up with a more general relationship.

To find the slope we find the point where the value on the x-axis is x and the value on the y-axis is f(x).
To find the slope we find the point where the value on the x-axis is x and the value on the y-axis is f(x).

Now, and this is often the tricky part, the second point we use is going to have an x value of x + Δx:

For the second point, the x value we use is the first x offset by Δx.
For the second point, the x value we use is the first x offset by Δx.

which means that the value on the curve is f(x+Δx):

Our second point is where the x value is x+Δx and the y value is f(x+Δx).
Our second point is where the x value is x+Δx and the y value is f(x+Δx).

So lets carefully observe the notation here. To find the slope of a line we can use the equation:

slope-basic
But with the function notation:

  • y1 = f(x)
  • y2 = f(x+Δx)

so:

slope-f

Now watch very carefully as I replace the function notation with the actual functions, specifically:

  • f(x) = x2
  • f(x+Δx) = (x+Δx)2

to give:

slope-f2

and if you understand how this, we’re almost all there, because the rest is algebra.

We simplify the equation above by expanding the numerator.

slope-f3

now we can subtract the similar terms (x2) and divide through by Δx to get:

slope-f4

But remember we don’t just want the slope, we want to find the slope where Δx approaches zero:

slope-lim2

The problem before was that if we made Δx = 0 the equation would be undefined. But now, however, as Δx = 0 the second term in the equation just goes to zero:

slope-f5

leaving us just with the first term 2x:

slope-diff

Remember that we were trying to do this at the point where x = 3. So if we put x = 3 into this equation we get:

slope-diff2

Which we know is the right answer because we did the very problem by hand already.

but now however we’ve come up with a more general equation for the slope. With it we can easily find the slope of our curve at any point along the curve!

For example, what is the slope of the curve when x = 0:

slope-diff4

Notation

Now it’s a bit cumbersome to write the limit as Δx goes to zero every time, so we’ll instead call our equation for the slope of the line the differential, and we’ll give it the notation as the function prime:

i.e. if we have a function f(x) = x2:

diff_notation-1

we write its differential as:

diff-notation-2

To confuse things (at least for the moment) there are a number of ways of writing the differential (the different methods are useful in different contexts), so you will see things like:

diff-notation-3

So now that we know how to find the differential using limits, we’ll practice finding the differential of polynomial functions and see if we can find a general pattern that allows us to bypass the whole limits thing altogether.

Finding the Limit (Following up the Guitar Project)

Following up on the project to find the volume (and surface area) of a guitar, and the slope at a point along the outline of the guitar, I asked students to use the same techniques to estimate the area under a curve (y = x2) and find the slope at a point along the curve. Specifically:

y = x2
y = x2
  1. Draw the function y = x2
  2. Find the area bounded by the function, the lines x = 1 and x = 4, and the x-axis
  3. Find the slope of a tangent to the y = x2 function at the point where x = 3.

The point of the second question is to test if students have internalized the idea that they can approximate curved shapes with trapezoids, but they have to weigh the time it will take to do a lot of trapezoids, versus the reduction in error that will result from more trapezoids. It’s interesting to see students’ character come through in this assignment: some choose to make one big trapezoid and are done, while other will go so many trapezoids that they run out of time to get them done.

It just occurs to me, however, that an interesting way to assess this assignment would be to give them a fixed time, and tell them that their score will be the 100 minus the percent error in their calculations.

Limits

The point on the function where x = 3.
The point on the function where x = 3.

The third question–about finding the slope of a tangent line at x = 3–is our jumping off point into the mathematics of limits and calculus.

Some students do a single approximation–either forward or backward–, while others do both and take the average.

Finding the approximate slope using a forward difference.
Finding the approximate slope using a forward difference.

The forward approximation involves finding the values for the function y = x2 at x = 3 and x = 4 and finding the slope between the two points:

  1. when x = 3, y = 9, so we have the point (x1,y1) = (3, 9)
  2. when x = 4, y = 16, so we have the point (x2,y2) = (3, 16)

The slope (m) between two points is found with the equation they learned back in algebra:

 \text{slope} = m = \frac{\Delta y}{\Delta x} = \frac{y_2-y_1}{x_2-x_1} = \frac{y_2-y_1}{\Delta x}

Where Δx = x2-x1 and Δy = y2-y1.

Using the two points above gives:

 \text{slope} = m = \frac{\Delta y}{\Delta x} = \frac{16-9}{4-3} = \frac{7}{1} = 7

Those who use the backward approximation simply use the point when x = 2 instead of x = 4, and they end up with a value for the slope of 5.

Averaging the forward and backward approximations give a slope of 6.

Now, since they know that the closer you make the points the better the approximation, I ask them to make a table to see what happens as they do so. This means reducing the value of Δx. In both the forward and backward approximation shown above, Δx = 1.

This can be done very quickly in Excel (or any other spreadsheet program), however, this time at least, most students chose to do it by hand. They end up with a table that looks like this:

y=x2-dx-to-zero

As dx gets smaller the calculated slope approaches 6.
As dx gets smaller the calculated slope approaches 6.
As the difference in x gets smaller and approaches zero, the slope approaches 6.
As the difference in x gets smaller and approaches zero, the slope approaches 6.

As you plot slope versus the change in x (Δx), you can see that as Δx gets smaller and smaller and approaches zero, the slope gets closer and closer to 6. So we could say that:

the limit of the slope as Δx approaches zero is 6.

Mathematically this can be written as:

limit-slope

or using the equation for slope:

limit-dx

Now, we can work on taking the limit in a more general way to do differentiation.

Calibration Curves for Salt (NaCl) Solutions

Calibration curves produced by different student groups to determine the relationship between density and concentration of salt (NaCl) solutions.
Calibration curves produced by different student groups to determine the relationship between density and concentration of salt (NaCl) solutions.

To start with chemistry class, we’re studying the properties of substances (like density) and how to measure and report concentrations. So, I mixed up four solutions of table salt (NaCl) dissolved in water of different concentrations, and put a drop of food coloring into each one to clearly distinguish them. The class as a whole had to determine the densities of the solutions, thus learning how to use the scales and graduated cylinders.

However, for the students interested in doing a little bit more, I asked them to figure out the actual concentrations of the solutions.

One group chose to evaporate the liquid and measure the resulting mass in the beakers. Others considered separating the salt electrochemically (I vetoed that one based on practicality.

Most groups ended up choosing to mix up their own sets of standard solutions, measure the densities of those, and then use that data to determine the densities of the unknown solutions. Their data is shown at the top of this post.

Finding the mass of solution in order to calculate its density.
Finding the mass of solution in order to calculate its density.

The variability in their results is interesting. Most look like the result of systematic differences in making their measurements (different scales, different amounts of care etc.), but they all end up with curves where the concentration increases positively with density.

I showed the graph above to the class so we could talk about different sources of error, and how scientists will often compile the data from several different studies to get a better averaged result.

Then, I combined all the data and added a linear trend line so they could see how to do it using Excel (many of these students are in pre-calculus right now so it ties in nicely):

Trend line from combined data.
Trend line from combined data.

What we have not talked about yet–I hope to tomorrow–is how the R-squared value, which gives the goodness of the fit of the trend line to the data, is more a measure of precision rather than accuracy. It does say something about how internally consistent the data are, but not necessarily if the result is accurate.

It’s also useful to point out that the group with the best R-squared value is the one with only two data points because two data points will necessarily give a perfectly straight line. However, the groups that made more solutions might not have as good of an R-squared value, but, because of the multiple measurements, probably have more reliable results.

As for which group got the most accurate result: I added in some data I found by googling–it came off a UCSD website with no citation so I’m going to need to find a better reference. Comparing our data to the reference we find that team AC (the red squares) best match:

The straight line shows my (currently) accepted values for the concentration/density relationship.
The straight line shows my (currently) accepted values for the concentration/density relationship.

Introducing Limits (Calculus) with a Guitar

Creating the outline of a guitar.
Creating the outline of a guitar.

One of the assigned tasks from last summer’s guitar building workshop was to create a few modules for use in class. I worked on an assignment that has students calculate the volume of a guitar body using trapezoidal approximation methods that can be a bridge between pre-calculus and calculus.

The first draft of this module is here: volume-activity-v01.pdf (the LaTeX file is volume-activity-v01.tex.zip ). It has made contact with the enemy students and the results have so far been very good.

A method for finding the area of a guitar body by fitting trapezoids.
A method for finding the area of a guitar body by fitting trapezoids.

There were two things that I need to add for next time:

  1. How to find the area of a trapezoid: I should have some more detail about how I came up with the formula for calculating the area of each trapezoid (see the figure above). I multiply the average of the heights of the two sides of the trapezoid by the width of the base to get the area. Students tend to want to find the area of the lower rectangle, then add the area of the upper triangle. Their method gives the same answer for area, but results in a more complicated equation that takes more effort to generalize.
  2. Have them also find the slope of a tangent line to the outline of the guitar at a certain point. This assignment is intended to lead students up to the concept of limits with the idea that if you make the trapezoids thinner you’ll get less error in your calculation of the total area. So, as the width of the trapezoid approaches zero, you should get the exact area (with no error). The seemed to get that fairly well, however, when I get into the calculus, I actually first use limits to show them how to find derivatives of functions before I talk about finding areas under curves. As a result, I did ask the students to find the slope at a point on their guitar outline (I randomly chose a point from their outlines), and was very glad I did so. This should be included in the module.
Students drawing trapezoids to fit the outline of the guitar, and calculating their areas.
Students drawing trapezoids to fit the outline of the guitar, and calculating their areas.

Finally, in addition, I also showed them how to quickly calculate the trapezoid areas once they’d entered the coordinates of each point on their graphs into Excel. I did not test them on this afterward, so I’m not sure how much of it they absorbed.

Certified Naturally Grown

While our farm program is nascent and small, we’ve been trying to minimize the use of synthetic chemicals. Yet it would still be difficult and require a lot of paperwork to acquire an “organic” certification. One alternative that looks promising is the Certified Naturally Grown (CNG) program that uses peer certification (other CNG farmers do inspections) and has a much lower bureaucratic burden.

Naturally grown tomatoes from the TFS farm.
Naturally grown tomatoes from the TFS farm.