# Entries Categorized as 'Calculus'

#### March 3, 2014

Finally, relatively easy interactive 3d on the web. You can rotate and zoom into the scene. (Although it may not yet be compatible with all browsers it does work with Firefox at least).

Your browser does not support iframes.

This method uses the three.js Javascript library. Here I use it to show the volume of a rotated surface using the disk method. It’s almost identical to my calculus student’s project, except here I’m finding the volume between *x=1* and *x=3*, using disks that are 0.5 units in height (Δx).

Since the volume of cylinder is:

where r is the radius of the cylinder.

We’re finding the volume created by a function that’s rotated around the x-axis. Using the function:

The radius of each cylinder is the value of the function for that x value, so you could write the radius as:

Therefore the volume of each disk is:

There are four disks and we use the function value at the far end of the disk to draw the disk so the total volume is:

Factoring out the π and the Δx gives:

Since *Δx = 0.5*, *a = 1.0*, and *b = 3.0*, we can define the number of disks as *n = 4* then we can rewrite using summation formula:

reverting back to *a* and *b* gives the general equation:

where:

**Citing this post**: **Urbano**, L., 2014. Volumes of Rotation: The Disk Method: 3d with Javascript Three.js, Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Calculus, Mathematics, TechnologyNo Comments » - Tags: 3d, calculus, javascript, programming

#### December 11, 2013

This is my quick, and expanding, reference for easy-to-do experiments for students studying different types of functions.

Linear equations: y = mx + b

- Bringing water to a boil (e.g. Melting snow)
- Straight line, motorized, motion. (e.g. Movement of a robot/Predicting where robots will meet in the middle)
- Current versus Voltage across a resistor as resistance changes.

Quadratic equations: y = ax^{2} + bx + c

Exponential functions: y = ae^{kx}

Square Root Functions: y = ax^{1/2}

Trigonometric Functions: y = asin(bx)+c

**Citing this post**: **Urbano**, L., 2013. Experiments for Demonstrating Different Types of Mathematical Functions, Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Calculus, MathematicsNo Comments » - Tags: experiential learning, experiments, functions, math

#### April 20, 2013

Numerically integrating the area under the curve using four trapezoids.

I gave a quick introduction to programming for my calculus class, which has been working on numerical integration.

Numerical integration is usually used for functions that can’t be integrated (or not easily integrated) but for this example we’ll use a simple parabolic function so we can compare the numerical results to the analytical solution (as seen here).

With the equation:

To find the area under the curve between *x = 1* and *x = 5* we’d find the definite integral:

which gives the result:

For numerical integration, we break the area of concern into a number of trapezoids, find the areas of all the trapezoids and add them up.

We’ll define the left and right boundaries of the area as **a** and **b**, and we can write the integral as:

The left and right boundaries of the area we’re interested in are defined as *a* and *b* respectively. The area of each trapezoid is defined as A_{n}.

We also have to choose a number of trapezoids (**n**) or the width of each trapezoid (**dx**). Here we choose four trapezoids (*n = 4*), which gives a trapezoid width of one (*dx = 1*).

The area of the first trapezoid can be calculated from its width (dx) and the height of the two upper ends of the trapezoid (f(x_{0}) and f(x_{1}).

So if we define the x values of the left and right sides of the first trapezoids as *x*_{0} and *x*_{1}, the area of the first trapezoid is:

For this program, we’ll set the trapezoid width (*dx*) and then calculate the number of trapezoids (*n*) based on the width and the locations of the end boundaries *a* and *b*. So:

and the sum of all the areas will be:

We can also figure out that since the x values change by the same value (dx) for every trapezoid, it’s an arithmetic progression, so:

and,

so our summation becomes:

Which we can program with:

*numerical_integration.py*

# the function to be integrated
def func(x):
return -0.25*x**2 + x + 4
# define variables
a = 1. # left boundary of area
b = 5. # right boundary of area
dx = 1 # width of the trapezoids
# calculate the number of trapezoids
n = int((b - a) / dx)
# define the variable for area
Area = 0
# loop to calculate the area of each trapezoid and sum.
for i in range(1, n+1):
#the x locations of the left and right side of each trapezpoid
x0 = a+(i-1)*dx
x1 = a+i*dx
#the area of each trapezoid
Ai = dx * (func(x0) + func(x1))/ 2.
# cumulatively sum the areas
Area = Area + Ai
#print out the result.
print "Area = ", Area

And the output looks like

>>>
Area = 17.5
>>>

While the programming is pretty straightforward, it was a bit of a pain getting Python to work for one of my students who is running Windows 8. I still have not figured out a way to get it to work properly, so I’m considering trying to do it using Javascript.

# Update

The javascript functions for numerical integration:

function numerically_integrate(a, b, dx, f) {
// calculate the number of trapezoids
n = (b - a) / dx;
// define the variable for area
Area = 0;
//loop to calculate the area of each trapezoid and sum.
for (i = 1; i <= n; i++) {
//the x locations of the left and right side of each trapezpoid
x0 = a + (i-1)*dx;
x1 = a + i*dx;
// the area of each trapezoid
Ai = dx * (f(x0) + f(x1))/ 2.;
// cumulatively sum the areas
Area = Area + Ai
}
return Area;
}
//define function to be integrated
function f(x){
return -0.25*Math.pow(x,2) + x + 4;
}
// define variables
a = 1; // left boundary of area
b = 5; // right boundary of area
dx = 1; // width of the trapezoids
// print out output
alert("Area = "+ numerically_integrate(a, b, dx, f));

This is a demonstration of a full html file that uses the function, and should work in any modern browser (download files: numerical-integration.zip).

# Update 2

I've added the above javascript code to the embeddable graphs to allow it to calculate and display numerical integrals: you can change the values in the interactive graph below.

**Citing this post**: **Urbano**, L., 2013. Programming Numerical Integration with Python (and Javascript), Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Calculus, Mathematics, ProgrammingNo Comments » - Tags: calculus, embeddable graphs, integration, javascript, math and programming, numerical methods, programming, python

#### March 13, 2013

Animation showing the motion of the ballistic motion of a soccer ball.

If you throw a soccer ball up into the air and take a quick series of photographs you can capture the motion of the ball over time. The height of the ball can be measured off the photographs, which can then be used for some interesting physics and mathematics analysis. This assignment focuses on the analysis. It starts with the height of the ball and the time between each photograph already measured (Figure 1 and Table 1).

Figure 1. Height of a thrown ball, measured off a series of photographs. The photographs have been overlaid to create this image of multiple balls.

*Table 1: Height of a thrown soccer ball over a period of approximately 2.5 seconds. This data were taken from a previous experiment on projectile motion.*

Photo |
Time (s) |
Measured Height (m) |

P_{0} |
0 |
1.25 |

P_{1} |
0.436396062 |
6.526305882 |

P_{2} |
0.849230104 |
9.825317647 |

P_{3} |
1.262064145 |
11.40310588 |

P_{4} |
1.674898187 |
11.30748235 |

P_{5} |
2.087732229 |
9.657976471 |

P_{6} |
2.50056627 |
6.191623529 |

# Assignment

- Pre-Algebra: Draw a graph showing the height of the ball (y-axis) versus time (x-axis).
- Algebra/Pre-calculus: Determine the equation that describes the height of the ball over time:
*h(t)*. Plot it on a graph.
- Calculus: Determine the equation that shows how the velocity of the ball changes over time:
*v(t)*.
- Calculus: Determine the equation that shows how the acceleration of the ball changes with time:
*a(t)*
- Physics: What does this all mean?

**Citing this post**: **Urbano**, L., 2013. Analyzing the Motion of Soccer Ball using a Camera and Calculus, Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Algebra, Calculus, Mathematics, Natural World, PhysicsNo Comments » - Tags: algebra, ballistics, calculus, experiments, math applications, physics

#### February 22, 2013

The first stage rocket booster separates. Image from NASA via Wikipedia.

Fully loaded, the first stage of the Saturn V rockets that launched the Apollo missions would burn through a liter of fuel for every four centimeters it moved. That’s 5 inches/gallon, which, for comparison, is a lot less than your modern automobile that typically gets over 20 miles/gallon.

**Citing this post**: **Urbano**, L., 2013. Rates of change: 4 cm/liter, Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Algebra, Calculus, MathematicsNo Comments » - Tags: algebra, calculus, math, rates of change

#### February 19, 2013

Approaching a change in slope.

We took a school trip to the ski slopes in Hidden Valley. It was the interim, and it was a day dedicated to taking a break. However, it would have been a great place to talk about gradients, changes in slopes, and first and second differentials. The physics of mass, acceleration, and friction would have been interesting topics as well.

Calculus student about to take the second differential.

This year has been cooler than last year, but they’ve still struggled a bit to keep snow on the slopes. They make the snow on colder nights, and hope it lasts during the warmer spells. The thermodynamics of ice formation would fit in nicely into physics and discussion of weather, while the impact of a warming climate on the economy is a topic we’ve broached in environmental science already.

The blue cannon launches water into the air, where, if it’s cold enough, it crystallizes into artificial snow. The water is pumped up from a lake at the bottom of the ski slopes.

**Citing this post**: **Urbano**, L., 2013. Ski Trip (to Hidden Valley), Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Algebra, Calculus, Environmental Science, Mathematics, Natural World, PhysicsNo Comments » - Tags: algebra, calculus, climate change, global warming, interim, math, physics applications, skiing

#### January 27, 2013

The website Influence Explorer has a lot of easily accessible data about the contributions of companies and prominent people to lawmakers. As a resource for civics research it’s really nice, but the time series data also makes it a useful resource for math; algebra and pre-calculus, in particular.

**Citing this post**: **Urbano**, L., 2013. Influence Explorer: Data on Campaign Contributions by Politician and by Major Contributors, Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Algebra, Calculus, Natural World, Social WorldNo Comments » - Tags: algebra, data sources, math, politics, pre-Calculus, real data, real data source

#### January 20, 2013

To figure out if the climate is actually warming we need to extract from the global temperature curve all the wiggles caused by other things, like volcanic eruptions and El Nino/La Nina events. The resulting trend is quite striking.

I’m teaching pre-Calculus using a graphical approach, and my students’ latest project is to model the trends in the rising carbon dioxide record in a similar way. They’re matching curves (exponential, parabolic, sinusoidal) to the data and subtracting them till they get down to the background noise.

Carbon dioxide concentration (ppm) measured at the Mona Loa observatory in Hawaii shows exponential growth and a periodic annual variation.

**Citing this post**: **Urbano**, L., 2013. Wiggle Matching: Sorting out the Global Warming Curve, Retrieved July 21st, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.

Posted in Calculus, Environmental Science, Mathematics, videoNo Comments » - Tags: climate change, global warming, math, pre-Calculus, science, video