# Embeddable Graphs

#### April 3, 2013

Going beyond just polynomials, I’ve created a javascript graphing app that’s easily embeddable.

At the moment, it just does polynomials and points, but polynomials can be used to teach quadratic functions (parabolas) and straight lines to pre-algebra and algebra students. Which I’ve been doing.

Based on my students’ feedback, I’ve made it so that when you change the equation of the line the movement animates. This makes it much easier to see what happens when, for example, you change the slope of a line.

P.S. You can also turn off the interactivity if you just want to show a simple graph. y = x2-1 is shown below:

Citing this post: Urbano, L., 2013. Embeddable Graphs, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.

# Introducing Polynomials

#### March 27, 2013

If you recall, straight lines have a general equation that looks like this:

$y=mx+b$ (1)

This is called the slope-intercept form of the equation, because m gives the slope, and b tells where the line intercepts the y-axis. For example the line:

$y=2x-3$ (2)

looks like:

Now, in the slope-intercept form, m and b represent numbers. In our example, m = 2 and b = 3.

So what if, instead of calling them m and b we used the same letter (let’s use a) and just gave two different subscripts so:

$m = a_1$ and,
$b = a_0$

therefore equation (1):

$y=mx+b$

becomes:
$y = a_1 x + a_0$ (3)

Now, in case you’re wondering why we picked m = a1 instead of m = a0, it’s because of the exponents of x. You see, in the equation x has an exponent of 1, and the constant b could be thought to be multiplying x with an exponent of 0. Considering this, we could rewrite our equation of the line (2):

$y=2x^1-3x^0$ (4)

since:
$x^1 = x$ and,
$x^0 = 1$

we get:
$y=2x-3(1)$
$y=2x-3$

So in equation (3) the subscript refers to the exponent of x.

Now we can expand this a bit more. What if we had a term with x2 in an equation:

$y=\frac{1}{2}x^2 + 2x - 3$ (5)

Now we have three coefficients:

$a_0 = -3$ ,
$a_1 = 2$ and,
$a_2 = \frac{1}{2}$ ,

And the graph would look like this.

Because of the x2 term (specifically because it has the highest exponent in the equation), this is called a second-order polynomial — that’s why the graph above has a little input box where the order is 2. In fact, on the graph above, you can change the order to see how the equation changes. Indeed, you can also change the coefficients to see how the graph changes.

A second order polynomial is a parabola, while, as you’ve probably guessed, a first order polynomial is a straight line. What’s a zero’th order polynomial?

Finally, we can write a general equation for a polynomial — just like we have the slope-intercept form of a line — using the a coefficients like:

$y = a_n x^n + ... + a_2 x^2 + a_1 x + a_0$

You can use the graphs to tinker around and see what different order polynomials look like, and how changing the coefficients change the graphs. I sort-of like the one below:

## References

WolframAlpha has more details on polynomials.

The embedded graphs come from my own Polynomial Grapher.

Citing this post: Urbano, L., 2013. Introducing Polynomials, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.

# Euler’s Method for Approximating a Solution to a Differential Equation

#### March 3, 2012

Based on Euler's Method, this interactive graph illustrates a numerical method for solving differential equations. This approach is at the core of many sophisticated computer models of physical phenomena (like climate and weather).
• Starting point: (x,y) = (   ,   )
• Step size:
• Direction:
Your browser does not support the canvas element.
• Slope equation: dy/dx =   x +
• Show analytical solution:
If you know the equation for the slope of a curve (the red line for example),
and a point that the curve passes through, such as , you can integrate to find the equation of the curve:

If you don't have a starting point (initial condition), you can draw a slope field to see what the general pattern of all the possible solutions.

Even with a starting point, however, there are just times when you can't integrate the slope equation -- it's either too difficult or even impossible.

Then, what you can do is come up with an approximation of what the curve looks like by projecting along the slope from the starting point.

The program above demonstrates how it's done. This approach is called Euler's Method, and is gives a numerical approximation rather than finding the exact, analytical solution using calculus (integration).

So why use an approximation when you can find the exact solution? Because, there are quite a number of problems that are impossible or extremely difficult to solve analytically, things like: the diffusion of pollution in a lake; how changing temperature in the atmosphere gives you weather and climate; the flow of groundwater in aquifers; stresses on structural members of buildings; and the list goes on and on.

As with most types of numerical approximations, you get better results if you can reduce the step size between projections of the slope. Try changing the numbers and see.

A more detailed version, with solutions, is here: Euler's Method.

A good reference: Euler's Method by Paul Dawkins.

Citing this post: Urbano, L., 2012. Euler's Method for Approximating a Solution to a Differential Equation, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.

#### February 29, 2012

So here we have a little grapher that solves quadratic equations visually. Just enter the coefficients in the equation.

Quadratic Equation:       y = a x2 + b x + c

Enter:                               y = x2 + x +

Your browser does not support the canvas element.

# Solution:

Analytical solution by factoring (with a little help from the quadratic equation if necessary).

Hopefully, this can help students learn about factoring and quadratics in a more graphical way.

## Notes:

This is my first interactive post. I use Javascript in combination with HTML5. Now I need to figure out how to interact with the image itself, instead of the textboxes.

Citing this post: Urbano, L., 2012. Solving Quadratic Equations, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.

# Equations of a Parabola: Standard to Vertex Form and Back Again

#### November 27, 2011

Highlighting the Vertex Form of the equation for a parabola.

The equation for a parabola is usually written as:
Standard form:
$y = ax^2 + bx + c$
where a, b and c are constants. This is the form displayed in both the VPython Parabola and Excel parabola programs. However, to make the movement of the curve easier, the VPython program also uses the vertex form of the equation internally:
Vertex Form:
$y = a(x-h)^2 + k$
where the point (h, k) is the location of the vertex of the parabola. In the example above, h = 1 and k = 2. To translate between the two forms of the equation, you have to rewrite them. Start by expanding the vertex form:
y = a(x - h)2 + k
becomes:
y = a(x - h)(x - h) + k
multiplied out to get:
y = a(x2 - 2hx + h2) + k
now distribute the a:
y = ax2 - 2ahx + ah2 + k
finally, group all the coefficients:
y = (a)x2 - (2ah)x + (ah2 + k)
This equation has the same form as y = ax2 + bx + c if: Vertex to Standard Form:
a = a b = -2ah c = ah2+k
And we can rearrange these equations to go the other way, to find the vertex form from the standard form: Standard to Vertex Form:
$a = a$
$h = \frac{\displaystyle -b}{\displaystyle 2a}$
$k = c - ah^2 = c - \frac{\displaystyle b^2}{\displaystyle 4a}$

# Summary

In sum, you can write the standard equation for a parabola as:
Standard form:
And you can write the equation for the same parabola in vertex form as:
Vertex form:

UPDATE 1: This app will automatically convert from standard to vertex form (or back again). UPDATE 2: Automatically generate and embed graphs using this parabolic grapher app.

Citing this post: Urbano, L., 2011. Equations of a Parabola: Standard to Vertex Form and Back Again, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.

# Parabola Program

#### November 26, 2011

Animation showing the widening and shrinking of the parabola.

So I put together this interactive parabola program using VPython (code here) for students encountering these curves in Algebra.

Simple Excel program to graph a parabola.

It's a more interactive version of the Excel parabola program in that you can move the curve by dragging on some control points, rather than just having to enter the coefficients of the equation. The program is still in development, but it is at a useful stage right now, so I thought I'd make it available for anyone who wanted to try it. The program is fairly straightforward to use. You can move the curve (translate it) up and down, and expand or tighten the area within the parabola. The program also displays the equation of the curve in standard form:
$y = ax^2 + bx + c$
.

What the buttons do.

# Next Steps

I'm also working making the standard equation editable by clicking on it and typing, and am considering showing the x-axis intercepts, which will give algebra students a nice, visual way to of checking their factoring.

# References

Coffman, J., 2011 (accessed). Translating Parabolas. http://www.jcoffman.com/Algebra2/ch5_3.htm Math Warehouse, 2011 (accessed). Equation of a Parabola Standard Form and Vertex Form Equations, http://www.mathwarehouse.com/geometry/parabola/standard-and-vertex-form.php# WolframAlpha.com, 2011 (accessed). http://www.wolframalpha.com/input/?i=a^2+x^4%2Bx^2-r^2%3D0

Citing this post: Urbano, L., 2011. Parabola Program, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.