#### Posted January 10, 2017

#### by Lensyl Urbano

Paths of a projectile.

I had my Numerical Methods student calculate the angle that would give a ballistic projectile its maximum range, then I had them write a program that did the the same by just trying a bunch of different angles. The diagram above is what they came up with.

It made an interesting pattern that I converted into a face-plate cover for a light switch that I made using the laser at the TechShop.

Face plate cover.

**Citing this post**: **Urbano**, L., 2017. Projectile Paths, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in Physics, Programming.

Tags: ballistics, math, numerical methods, programming, TechShop.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted December 18, 2016

#### by Lensyl Urbano

One of the middle schoolers built a potato gun for his math class. He was looking a the mathematical relationship between the amount of fuel (hair spray) and the hang-time of the potato. To augment this work, I had my Numerical Methods class do the math and create analytical and numerical models of the projectile motion.

One of the things my students had to figure out was what angle would give the maximum range of the projectile? You can figure this out analytically by finding the function for how the horizontal distance (x) changes as the angle (theta) changes (i.e. x(theta)) and then finding the maximum of the function.

Initial velocity vector (v) and its component vectors in the x and y directions for a given angle.

## Distance as a function of the angle

In a nutshell, to find the distance traveled by the potato we break its initial velocity into its x and y components (v_{x} and v_{y}), use the y component to find the flight time of the projectile (t_{f}), and then use the v_{x} component to find the distance traveled over the flight time.

Starting with the diagram above we can separate the initial velocity of the potato into its two components using basic trigonometry:

,

so,

,

Now we know that the height of a projectile (y) is given by the function:

(you can figure this out by assuming that the acceleration due to gravity (a) is constant and acceleration is the second differential of position with respect to time.)

To find the flight time we assume we’re starting with an initial height of zero (y_{0} = 0), and that the flight ends when the potato hits the ground which is also at zero ((y_{t} = 0), so:

Factoring out *t* gives:

Looking at the two factors, we can now see that there are two solutions to this problem, which should not be too much of a surprise since the height equation is parabolic (a second order polynomial). The solutions are when:

The first solution is obviously the initial launch time, while the second is going to be the flight time (t_{f}).

You might think it’s odd to have a negative in the equation, but remember, the acceleration is negative so it’ll cancel out.

Now since we’re working with the y component of the velocity vector, the initial velocity in this equation (v_{0}) is really just v_{y}:

so we can substitute in the trig function for v_{y} to get:

Our horizontal distance is simply given by the velocity in the x direction (v_{x}) times the flight time:

which becomes:

and substituting in the trig function for v_{x} (just to make things look more complicated):

and factoring out some of the constants gives:

Now we have distance as a function of the launch angle.

We can simplify this a little by using the double-angle formula:

to get:

## Finding the maximum distance

How do we find the maxima for this function. Sketching the curve should be easy enough, but because we know a little calculus we know that the maximum will occur when the first differential is equal to zero. So we differentiate with respect to the angle to get:

and set the differential equal to zero:

and solve to get:

Since we remember that the arccosine of 0 is 90 degrees:

And thus we’ve found the angle that gives the maximum launch distance for a potato gun.

**Citing this post**: **Urbano**, L., 2016. Maximum Range of a Potato Gun, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in Mathematics, Programming.

Tags: math, math and programming, numerical methods, physics, projectile motion.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted December 9, 2016

#### by Lensyl Urbano

Two of my first dry-erase erasers.

I painted the wall on my new space in the basement to make it a dry-erase surface. Unfortunately, I did not have an eraser to use on it, so, I decided to make my own down at the TechShop. And what started as a simple project turned into a bit of a rabbit hole.

The Shopbot CNC router is great for cutting shapes out of wood. I started with simple rectangular 2 inch by 4 inch blanks with designs and patterns, but that truly does not take advantage of the technological possibilities. Map projections can have some interesting shapes, so I tried a few that I could find black and white vector-graphic maps for on the Wikimedia commons (Mollweide and Sinusoidal projections).

The Shopbot CNC mill cutting out a blank for a Mollweide map projection.

After a little sanding (of the edges and sides in particular) I put the wooden blanks on the laser. It helped to cut out a template for the wooden blanks to sit in so I could do multiple blocks at the same time.

Lasering on the maps.

I put on a few coats of polyurethane to protect the wood surface (I also tried a spray on sealer I had sitting around–we’ll see which one works better) and then attached velcro strips to the bottom.

Adding velcro to the erasers.

One of my old sweatshirts served as material for the erasing.

A few of the first erasers with a rectangular form.

Erasers with different map projections.

**Citing this post**: **Urbano**, L., 2016. Making Dry-Erase Erasers, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in TechShop.

Tags: TechShop.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted December 4, 2016

#### by Lensyl Urbano

Laser-etched map projections on wood.

This September a TechShop branch opened up in St. Louis. I’ve been aware of these neat Makerspaces for a few years now, so it was a pleasant surprise when one turned up in town. Even more surprising (and just as pleasant) was that a parent at our school, who was so excited by the opportunities that a place like the TechShop would offer to a school that tries to emphasize hands-on, experiential education, donated four memberships to the school–one for a faculty member and three for students.

Since there are some age restrictions on which machines minors can use–a lot of the woodshop is off limits until they’re 16 and even then adult supervision is required, I arranged a small application for the student memberships that was only open to middle and high-schoolers. Based on the response I got back, we split the annual memberships by semester, so we have three students using it this fall and three more will have access to them in the spring.

The way the TechShop works is that they have a wide range of equipment under one roof and once you take a safety and basic usage (SBU) class on the particular machine you want to use you can reserve time on the machines. There’s a wood shop with saws, sanders, a lathe, and a CNC machine; a metal shop with the same; a set of 3d printers; a set of laser cutters/etchers; a fabric shop with some serious sowing machines, including one that is computer controlled; an electronics shop; a plastics work area with vacuum forming and injection molding machines. They also do a set of interesting classes on using the design software and some interesting projects that can take advantage of the tools available–I have my eye on the Coptic Bookbinding, and the Wooden Bowl making classes. Finally, they’re set up with classrooms where you can bring students in for small STEAM classes, which includes things like using Arduinos.

Students etching an anodized aluminum luggage tag during their SBU class on the laser cutter/etcher.

So far, we’ve all taken the Laser class, and there’s just so much that you can do with the laser that we’ve been spending a lot of time experimenting. The students have been etching signs–including a grave marker for our goat MJ who recently passed away–as well as pictures, luggage tags, and making presents. Since this is a machine that the older students can use independently I’ve lost track of everything they’ve been doing.

I’ve also taken the woodshop wood CNC class, so my own experiments have been a bit more expansive, including making dry-erase erasers, floor-holders for quivers for the archery program, simple chemistry molecular model sets (just 2d), boxes for Ms. Fu’s math cards, and I’m trying to figure out how to make a clock.

**Citing this post**: **Urbano**, L., 2016. TechShop, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in 3d Print, Abstract Thinking, Experiential.

Tags: experiential, TechShop.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted November 29, 2016

#### by Lensyl Urbano

This TedEd video explains a few common sorting methods used in computer science. Sorting can be a challenging computational problem because of the enormous number of comparisons between items that can be involved, so computer scientists has spent a lot of time looking into it.

The video below shows the Quick Sort method using Hungarian folk dance.

**Citing this post**: **Urbano**, L., 2016. Sorting algorithms (with Hungarian Dance), Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in Programming, video.

Tags: programming.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted November 18, 2016

#### by Lensyl Urbano

Tyler Vigen has a great website Spurious Correlations that shows graphs of exactly that.

A spurious correlation.

Great for explaining what correlation means, and why correlation does not necessarily mean causation.

**Citing this post**: **Urbano**, L., 2016. Spurious Correlations, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in Mathematics.

Tags: curious, statistics.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted November 4, 2016

#### by Lensyl Urbano

A nice animation showing the inner workings of a cell. There is a narrated version.

**Citing this post**: **Urbano**, L., 2016. Inner Workings of a Cell, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in Biology, video.

Tags: biology, cells.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.

#### Posted November 3, 2016

#### by Lensyl Urbano

Previously, I showed how to solve a simple problem of motion at a constant velocity analytically and numerically. Because of the nature of the problem both solutions gave the same result. Now we’ll try a constant acceleration problem which should highlight some of the key differences between the two approaches, particularly the tradeoffs you must make when using numerical approaches.

**The Problem**

- A ball starts at the origin and moves horizontally with an acceleration of 0.2 m/s
^{2}. Print out a table of the ball’s position (in x) with time (every second) for the first 20 seconds.

**Analytical Solution**

We know that acceleration (*a*) is the change in velocity with time (*t*):

so if we integrate acceleration we can find the velocity. Then, as we saw before, velocity (*v*) is the change in position with time:

which can be integrated to find the position (x) as a function of time.

So, to summarize, to find position as a function of time given only an acceleration, we need to integrate twice: first to get velocity then to get x.

For this problem where the acceleration is a constant 0.2 m/s^{2} we start with acceleration:

which integrates to give the *general solution*,

To find the constant of integration we refer to the original question which does not say anything about velocity, so we assume that the initial velocity was 0: i.e.:

at *t = 0* we have *v = 0*;

which we can substitute into the velocity equation to find that, for this problem, c is zero:

making the *specific* velocity equation:

we replace *v* with *dx/dt* and integrate:

This constant of integration can be found since we know that the ball starts at the origin so

at *t = 0* we have *x = 0*, so;

Therefore our final equation for x is:

### Summarizing the Analytical

**To summarize** the analytical solution:

These are all a function of time so it might be more proper to write them as:

Velocity and acceleration represent rates of change which so we could also write these equations as:

or we could even write acceleration as the second differential of the position:

or, if we preferred, we could even write it in prime notation for the differentials:

## The Numerical Solution

##

As we saw before we can determine the position of a moving object if we know its old position (*x*_{old}) and how much that position has changed (*dx*).

where the change in position is determined from the fact that velocity (*v*) is the change in position with time (*dx/dt*):

which rearranges to:

So to find the new position of an object across a timestep we need two equations:

In this problem we don’t yet have the velocity because it changes with time, but we could use the exact same logic to find velocity since acceleration (*a*) is the change in velocity with time (*dv/dt*):

which rearranges to:

and knowing the change in velocity (dv) we can find the velocity using:

Therefore, we have four equations to find the position of an accelerating object (note that in the third equation I’ve replaced *v * with *v*_{new} which is calculated in the second equation):

These we can plug into a python program just so:

*motion-01-both.py*

from visual import *
# Initialize
x = 0.0
v = 0.0
a = 0.2
dt = 1.0
# Time loop
for t in arange(dt, 20+dt, dt):
# Analytical solution
x_a = 0.1 * t**2
# Numerical solution
dv = a * dt
v = v + dv
dx = v * dt
x = x + dx
# Output
print t, x_a, x

which give output of:

>>>
1.0 0.1 0.2
2.0 0.4 0.6
3.0 0.9 1.2
4.0 1.6 2.0
5.0 2.5 3.0
6.0 3.6 4.2
7.0 4.9 5.6
8.0 6.4 7.2
9.0 8.1 9.0
10.0 10.0 11.0
11.0 12.1 13.2
12.0 14.4 15.6
13.0 16.9 18.2
14.0 19.6 21.0
15.0 22.5 24.0
16.0 25.6 27.2
17.0 28.9 30.6
18.0 32.4 34.2
19.0 36.1 38.0
20.0 40.0 42.0

Here, unlike the case with constant velocity, the two methods give slightly different results. The analytical solution is the correct one, so we’ll use it for reference. The numerical solution is off because it does not fully account for the continuous nature of the acceleration: we update the velocity ever timestep (every 1 second), so the velocity changes in chunks.

To get a better result we can reduce the timestep. Using *dt = 0.1* gives final results of:

18.8 35.344 35.532
18.9 35.721 35.91
19.0 36.1 36.29
19.1 36.481 36.672
19.2 36.864 37.056
19.3 37.249 37.442
19.4 37.636 37.83
19.5 38.025 38.22
19.6 38.416 38.612
19.7 38.809 39.006
19.8 39.204 39.402
19.9 39.601 39.8
20.0 40.0 40.2

which is much closer, but requires a bit more runtime on the computer. And this is the **key tradeoff** with numerical solutions: *greater accuracy requires smaller timesteps which results in longer runtimes on the computer*.

### Post Script

To generate a graph of the data use the code:

from visual import *
from visual.graph import *
# Initialize
x = 0.0
v = 0.0
a = 0.2
dt = 1.0
analyticCurve = gcurve(color=color.red)
numericCurve = gcurve(color=color.yellow)
# Time loop
for t in arange(dt, 20+dt, dt):
# Analytical solution
x_a = 0.1 * t**2
# Numerical solution
dv = a * dt
v = v + dv
dx = v * dt
x = x + dx
# Output
print t, x_a, x
analyticCurve.plot(pos=(t, x_a))
numericCurve.plot(pos=(t,x))

which gives:

Comparison of numerical and analytical solutions using a timestep (dt) of 1.0 seconds.

**Citing this post**: **Urbano**, L., 2016. Numerical and Analytical Solutions 2: Constant Acceleration, Retrieved September 25th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .

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

Posted in Calculus, Mathematics, Programming.

Tags: motion, numerical methods, physics, physics and calculus, programming.

**No Comments » **

Share and remix for non-commercial use, but cite and share alike.