Recursively Generated Spirals

A few weeks, ago I dug out a problem which had puzzled me for over three years.  I finally decided that now it was time to really dig in — and to my surprise and delight, not only did I solve the problem, but I’ve already got a draft of a paper written!  The figure below is from that paper.

Spiral

The problem is yet another variation on the recursion which produces the Koch snowflake.  I discussed the Koch snowflake in one my first posts, so visit my Day007 post on this fascinating fractal for a refresher.

So what is the variation here?  Consider the general recursive scheme

{\sf F}\ +\alpha_1\ \ {\sf F}\ +\alpha_2\ \ {\sf F}\ +\alpha_3\ \ {\sf F},

where {\sf F} represents a forward move and the \alpha_i indicate counterclockwise turns, which would be common instructions in a turtle graphics setting.

The Koch curve is generated by choosing

\alpha_1=60,\quad \alpha_2=240,\quad \alpha_3=60.

Previously I’ve studied cases where \alpha_1=\alpha_3 and the resulting image possesses central symmetry, unlike the Koch curve (see my Day008 post for examples).  But this is my first venture into exploring instances where \alpha_1\ne\alpha_3.  Things work a bit differently here….

So let’s investigate the example illustrated above in more detail.  The recursive scheme which generates this spiral is given by

\alpha_1=30,\quad \alpha_2=180,\quad \alpha_3=330.

How does this scheme draw a spiral arm?  Let’s look at the figure below.SpiralArm.png

We begin at the origin, and then draw a segment at 0^\circ, labeled “1” in the figure.  Next, we turn counterclockwise 30^\circ (since \alpha_1=30) and draw the segment labeled “2”.

The next turn is 180^\circ, so we turn completely around and begin retracing the arm in the opposite direction.  Then turn counterclockwise 330^\circ and move forward.  Note that since 330=360-30, this has the effect of taking us right back to the origin.

What next?  It is at this point that we invoke a recursive call — and so the next angle tells us what direction the next arm will be drawn in.  Of course, like before, the three angles after that will continue drawing the arm and then bring us back to the origin, awaiting the next recursive call.

This behavior can be illustrated in the following chart.

alphas.png

Here, the angles turned are listed in rows of four, one after another.  The first three angles in each row are the same, and their job is to complete the arm once a direction is chosen.  But the direction chosen is determined by the fourth column (separated by the divider), whose behavior is not periodic and highly recursive.

So where do we go from here?  The next chart we’ll look it is a chart of the directions the arms are drawn in.

Sigma4k

We read this chart in rows as follows:  the first arm is drawn at an angle of 0^\circ, directly to the right.  The second arm is drawn at an angle of 210^\circ, as can be seen in the figure above.

But the third arm exactly retraces the second arm drawn, since it is pointed in the direction of 210^\circ as well.  The fourth arm drawn — at an angle of 0^\circ — exactly retraces the first arm drawn.

So you can see what’s going on.  One important consequence of the recursive algorithm is that the arms keep being retraced over and over again.

When will the complete spiral be drawn?  Well, we need to see every multiple of 30^\circ in the chart above.  Of course eight rows isn’t enough.  But what is really surprising is that it takes over 1,000,000 rows before every multiple of 30 is encountered!

How would you show this?  We can’t go into all the details here.  The important observation is that if you read across the chart one row at a time, you get the same sequence of angles by reading down the first column of the chart.

But it isn’t enough to just observe this — it has to be proved.  This is where some elementary number theory comes in.  No more than what might be seen in an undergraduate number theory course, but beyond the scope of this post.

Slight step up on my soapbox — while I usually deplore the definition of mathematics as the “science of finding patterns” (as this only scratches the surface), in this case, finding patterns is critically important.  With some trial and error, you hit upon making charts in rows of four, and then putting the directions the arms are drawn in rows of four, and then stare at the numbers until you notice patterns in the charts.  The trick is knowing what to prove — once stated properly, the results almost prove themselves.

You’ll have to wait for the paper to come out for all the details.  But here is a brief summary.  Suppose you divide the circle into n parts, where n is even.  Then devise a recursive scheme using the turning angles

\alpha_1=\dfrac{360}n,\quad\alpha_2=180,\quad\alpha_3=360-\dfrac{360}n.

Now define

\sigma(k)=\dfrac13\left(4^{k-1}+2\right),\qquad k\ge1.

When n is divisible by 4, the spiral has n arms, and you need to draw exactly \sigma(n+1) segments to render the entire spiral.  In our case, with 12 arms, it takes \sigma(13)=5,\!592,\!406 segments to render the spiral.

But when n is even but not divisible by four, the spiral only has n/2 arms, and it takes \sigma(n/2+1) segments to draw a complete image of the spiral.

Absolutely amazing, in my opinion.  I formulated these conjectures over three years ago, but got stuck.  A few weeks ago I had the house to myself for a while, and I just sat down and said to myself, “Look, you’ve already written one paper on these recursions.  You can do this.”

And within two days, I worked out the patterns.  Then the proofs, and within a week, a draft of the paper.

I am always humbled by such a seemingly innocuous problem — generating a simple spiral .  But there are so many levels to this problem, and so much interesting mathematics to be discovered.  I’ll continue exploring  recursively drawn images, and share the amazing results with you when I find them!

Circle Geometry

Today, I thought I’d share a little more about things learned along the way with my curriculum consulting.  As I mentioned before, I’m creating a series of online lectures for the Geometry unit.  This past week, the section I was working on (and will still be working on into next week) is Circle Geometry.

As I also remarked earlier, I’m using the University of Chicago School Mathematics Project’s textbook on Geometry as a reference.  In this text are many theorems about the measure of the angle between two intersecting lines in terms of the measures of the intercepted arcs.

This image is certainly familiar.

Day153Circle1.png

The question I had to consider was how to organize all these results in a coherent 5–7-minute lecture.  It turns out that there was too much for just one lecture, so I did spread it out into two.  But I still needed a flow.

Although the results were not new to me, I had never taught this topic before.  My main experience teaching geometry at the high school level was designing and teaching a course on spherical trigonometry as it applies to studying polyhedra.  So this gave me an opportunity to stand back and just think about putting it all together.

I was happy with what I came up with — an approach which could be classified under “combinatorial geometry.”  I decided to pose the following question:

Day153Circle2.png

In other words, if you have two intersecting lines, and you draw a circle so that it intersects both lines, what configurations are possible?

Looked at in this way, there are just two considerations:  whether the intersection of the lines is outside, on, or inside the circle, and whether the lines are secant or tangent lines.

It’s not difficult to make the enumeration, so I’ll just give it briefly here.  There is only one configuration if the intersection of the lines lies inside the circle, since both lines must be secant lines.

Day153Circle3.png

When the intersection of the lines is on the circle, one of the lines may be tangent, although both cannot be since there is a unique tangent at any given point on a circle.  And when the intersection of the lines is outside the circle, zero, one, or two of the lines may be tangent to the circle.

This enumeration allows for a systematic approach.  If you’ve ever worked through find the angle measures, you know that starting with the arrangement in the upper right corner is the way to begin.  I won’t go through all the details, but I will just indicate that the following figure is all you need:

Day153Circle4.png

This simple case is analyzed by considering \angle QOR as an angle exterior to \Delta POQ.  The analysis of all the other cases builds from this.

I decided to include a discussion not found in the UCSMP text — continuity.  Of course this is not a topic which can be rigorously discussed at say, the 10th-grade level.  But why not give students an intuition of the idea?

Let’s start with a few diagrams.

Day153Circle5.png

This series illustrates the case that the intersection of the lines is outside the circle, and one of the lines is tangent.  We look at this as the limiting case of a series of pairs of secant lines.

This argument depends upon the fact that the measurement of all arcs and angles varies continuously as S moves around the circle.  While, as mentioned, this cannot be addressed rigorously, it is a very intuitive argument.  Moreover, there are many different software packages you could use to make an animation of this process, and display all the arc and angle measurements as S moves around the circle.

There is no reason not to introduce this argument.  In my pair of lectures, I used more traditional geometrical arguments as well.  It doesn’t hurt students to be exposed to a wide range of proof ideas.

I summarize all of these results in the following graphic.

Day153Circle6.png

The measure of the angle indicated with the red dot is half the measure of the intercepted arc, or the sum/difference of the measures of the intercepts arcs, shown in red and blue.  An arc in blue indicates its measure is to be subtracted rather than added.  I was very happy with this graphic.  I think that if a student followed the lecture, they could state every result just by looking at it.

This also proved to be a great segue into looking at the power of a point.  I thought I’d begin with the figure in the upper left, proving the usual theorem using similar triangles.

And now for another continuity argument!

Day153Circle7.png

This is a nice way to see that the power of any point on the circle is 0.  It is also a nice contrast to the theorems about the angle between the intersecting lines:  when PT and RT eventually reach 0, you’re not able to conclude anything about a relationship between QT and ST.

This means that there is no theorem relating lengths of segments for the two cases when the intersection of the lines lies on the circle.   I use the following graphic to indicate this, with two cases grayed out when the power of the point offers no conclusion.

Day153Circle8.png

Now all of these results are the usual ones found in high school geometry textbooks; nothing new here.  But for me, just having to step back and think about how to put them all together was a fun challenge.

Again, I am surprised at how much I’m learning even though I’m just putting together a few slides on elementary geometry.  The process of writing these lectures is an engaging one, and I hope the students who will eventually watch them will benefit from a perspective not found in more traditional textbooks.

What Is…A Polygon?

A haven’t made a post in quite some time in my “What is a Geometry?” thread.  In working on my online lectures in the section on Polygons, I of course needed to define just what a polygon is.  This turned out to be a little more challenging than I had imagined.  I thought that the issues that arose would make this discussion an interesting continuation of the “What is a Geometry?” thread.

In general, I think that the Wikipedia does a good job with mathematics — but specifically, the definition of a polygon leaves quite a bit to be desired.  I’ll reproduce it here for you:

In elementary geometry, a polygon is a plane figure that is bounded by a finite chain of straight line segments closing in a loop to form a closed polygonal chain, or circuit.  These segments are called its edges or sides, and the points where two edges meet are the polygon’s vertices (singular: vertex) or corners.

OK, maybe not so bad of a start.  There are lots of examples given which fit this definition, but many which do not.  For example, this definition allows consecutive segments to lie on the same line, which is typically disallowed in most other definitions of polygons.

So maybe a clause may be added to the definition which does not allow this.  But then we encounter a polygon like this (I’m using screenshots from my lecture as illustrations):

Day152Polygon1

My definition begins with a list of vertices — but the problem is still the same.  The vertex labeled “4” is on the edge joining the vertices labeled “1” and “2.”  Again, this is usually avoided.

And what about the following figure?

Day152Polygon2.png

With the Wikipedia definition, a vertex can be an endpoint of more than two edges of a polygon.  Again, problematic.  There would be no way to distinguish this figure from a single polygon and two different triangles sharing a vertex.

Moreover, there is no condition saying that the straight line segments need to be distinct.  So the same segment might occur multiple times as an edge of a polygon.

None of these behaviors is illustrated anywhere on the Wikipedia page.  I’ve done some Wikipedia editing a while back, and would be interested in working on this page when I have more time to devote to such things.

So what is the fix?  I’m using the Geometry text of the University of Chicago School Mathematics Project as a reference, which is one of the most rigorous geometry texts around.  Here is their definition:

Day152Polygon3.png

They remark that this is the definition used in 23 out of the 45 geometry text they surveyed.  And in fact, it is the rewrite of a definition in previous editions:  “A polygon is the union of segments in the same plane such that each segment intersects exactly two others, one at each of its endpoints.”  This definition was problematic, though, since by this definition, the following is actually a polygon!

Day152Polygon4.png

Now this revised definition solves all of the problems above — but I couldn’t use it.  Why not?

One of the sections I’ll be writing lectures for is three-dimensional geometry — and (of course) I’ll be saying a lot about polyhedra in this section.  There are Platonic and Archimedean solids, as well as the Kepler-Poinsot polyhedra, like the small stellated dodecahedron shown below.

Fig122.png

The faces of the small stellated dodecahedron are pentagrams, five meeting at each vertex.

But the UCSMP definition does not allow edges to cross.  Each edge meets exactly two others, at each of its endpoints.  So that means that an edge cannot cross another in its interior.

Now I just can’t talk about polyhedra without talking about nonconvex examples.  Sure, it is possible to talk about pentagrams with edges crossing as decagons without crossing edges.

Day152Polygon5.png

But this would be the height of absurdity.  Besides the fact that none of the dozens of books and articles I’ve read on polyhedra in the past few decades ever do such a thing — and I’m sure none ever will.

So I had to go it alone.  I’ll share with you my definition — but I can’t say it’s the best.  The difficulty lies with being mathematically precise while still making the definition accessible to high school students.  Here it is:

A polygon is determined by a list of its vertices. Edges of the polygon connect adjacent vertices in the list, and there is also an edge connecting the last vertex in the list to the first one. All vertices in the list must be different. Finally, no three consecutive vertices of the polygon can lie on the same line, and no vertex can lie in the interior of another edge.

I don’t think this is too bad.  But there is still a subtle glitch, which I haven’t worked out yet, and which doesn’t necessarily need to be worked out at this level.  When I talk about triangles, for example, I allow cases where the sides have lengths 3, 4, and 7, for example.  But I qualify such a triangle by calling it a degenerate triangle.

Since a triangle is a polygon, a degenerate triangle should be a degenerate polygon, right?  The problem is that calling something a “degenerate polygon” gives the impression that it is actually some type of polygon.  But a degenerate triangle, by my definition, is not a polygon.  So when I use the term degenerate polygon, I’m not actually talking about a polygon….

So I’ll let you think this over.  I just wanted to share how surprised I was at how subtle the definition of something so “simple” could be.  An ordinary polygon.

If you find this sort of question intriguing, you might go online and research all the various definitions of polyhedron.  Convex polyhedra are easy to define (as are convex polygons), but when you get into the different types of behavior possible in the nonconvex cases, well, it becomes problematic.  In fact, no one, as far as I know, has ever come up with a satisfactory definition for “polyhedron.”  Might even do a blog post on that some day….

Pythagorean Triples

I recently began writing some lectures for an online course — I’ll talk more about the nature of the course in next week’s post.  The broad topic is geometry, of course a favorite — and the specific topic for this unit is Triangles.

You can’t talk about triangles without talking about the Pythagorean Theorem.  Part of my job is also to compose problems for the lectures as well as for quizzes and exams, and to my surprise, I came up with a few interesting ones.  So I thought I’d share them with you.  I am always a fan of sharing mathematics as it happens!

The questions I wrote are based on the following parameterization of Pythagorean Triples:  Given positive integers p and q, then

(q^2-p^2,2pq,q^2+p^2)

is a Pythagorean Triple.  This parameterization generates all primitive Pythagorean Triples — that is, triples whose sides share no common factor.  But it is not possible to get (9,12,15), for example, using this parameterization.  Of course (9,12,15) is just three times the triple (3,4,5); therefore, if you can generate all primitive Pythagorean Triples, you can take multiples of them to generate all Pythagorean Triples.

I thought of my first problem walking down the sidewalk going to lunch the other day.  The simplest Pythagorean Triple, (3,4,5), has side lengths which are in arithmetic progression.  What other Pythagorean Triples have this property?

The simplest way to approach this is to parameterize such a triple by (a,a+d,a+2d), where a>0 is the smallest integer in the arithmetic progression and d>0 is the common difference.  Since the triangle is a right triangle, we must have

a^2+(a+d)^2=(a+2d)^2,

which we may rewrite as

a^2-2ad-3d^2=0.

Now this factors:

(a+d)(a-3d)=0,

resulting in solutions a=-d or a=3d.  We did assume that d>0, so we eliminate the solution a=-d.  Note that this would generate the triple (a,0,-a), and in fact a^2+0^2=(-a)^2. But one side length is zero and another is negative, so no triangle is possible with these side lengths.

What about the solution a=3d?  Here, we get

(a,a+d,a+2d)=(3d,4d,5d),

which you can observe is just a multiple d of the primitive Pythagorean Triple (3,4,5).

The conclusion?  The only Pythagorean Triples possible whose side lengths are in arithmetic progression are multiples of the (3,4,5) right triangle.

I really didn’t know the answer would come out so nicely — but since the algebra involved was fairly straightforward, I thought I could include this as a non-routine example of an application of the Pythagorean Theorem at the high school level.

The previous problem was part of a lecture.  The next problem was written as a possible exam question for teachers; once I realized I had more than one interesting problem, I thought there would be enough for a blog post….

I was just looking for interesting patterns in Pythagorean Triples, and noticed that with the (6,8,10) triangle, the area and perimeter were both 24.  A coincidence?  Were there other triangles with this property?

Of course there had to be finitely many — as the side lengths get larger, the area gets larger faster than the perimeter, as the area is essentially a quadratic function, while the perimeter is essentially a linear function.  So how many others are there?  Make a mental note of your guess before reading further….

We begin by parameterizing by

(k(q^2-p^2),2kpq,k(q^2+p^2));

the factor of k is necessary since the two-variable version generates all primitive Pythagorean Triples, but not necessarily all Pythagorean Triples.

Setting the perimeter and area equal to each other results in

\dfrac12k(q^2-p^2)\cdot2kpq=k(q^2-p^2+2pq+q^2+p^2),

Cancelling out factors of k, q, and p+q results in

kp(q-p)=2.

This equation clearly has just three solutions, since one of the factors must be 2 and the other two factors must be 1.

None is particularly difficult; let’s take them one at a time.  When k=2, then p=q-p=1, so that q=2.  Substituting back into the parameterization, we obtain the Pythagorean Triple 2(3,4,5), which is the triple (6,8,10).

When p=2, then  k=q-p=1, so that q=3. This generates a new Pythagorean Triple, (5,12,13).

Finally, when q-p=2, then k=p=1 and q=3, so that the Pythagorean Triple (8,6,10) is generated.  Of course this is just a duplicate of the first solution.

Surprised that there was just one more solution?  I was!  It was such a nice, straightforward solution, that I couldn’t help but include it.

There was a third problem which I liked, but the algebra was a little too intense — there was a nice geometrical solution, but it required ideas learned later on in the course.  So here it is if you want a challenge:  suppose you are given two right triangles, and you know that their perimeters and areas are the same.  Prove that they are congruent.

I think you might enjoy solving this purely algebraically.  I did like it so much, though, that I included a simpler version in one of my lectures:  suppose you are given two right triangles, and you know that their hypotenuses are both of length 8 and that their perimeters are equal.  Prove that the triangles are congruent.

To be honest, I never knew I’d find problem solving with the Pythagorean Theorem so interesting.  It’s nice to know that there is always more geometry to learn!  Even with something as apparently simple as the venerable Pythagorean Theorem….

Calculus: The Geometry of Polynomials, II

The original post on The Geometry of Polynomials generated rather more interest that usual.  One reader, William Meisel, commented that he wondered if something similar worked for curves like the Folium of Descartes, given by the equation

x^3+y^3=3xy,

and whose graph looks like:

Day141Folium1

I replied that yes, I had success, and what I found out would make a nice follow-up post rather than just a reply to his comment.  So let’s go!

Just a brief refresher:  if, for example, we wanted to describe the behavior of y=2(x-4)(x-1)^2 where it crosses the x-axis at x=1, we simply retain the (x-1)^2 term and substitute the root x=1 into the other terms, getting

y=2(1-4)(x-1)^2=-6(x-1)^2

as the best-fitting parabola at x=1.

Now consider another way to think about this:

\displaystyle\lim_{x\to1}\dfrac y{(x-1)^2}=-6.

For examples like the polynomial above, this limit is always trivial, and is essentially a simple substitution.

What happens when we try to evaluate a similar limit with the Folium of Descartes?  It seems that a good approximation to this curve at x=0 (the U-shaped piece, since the sideways U-shaped piece involves writing x as a function of y) is y=x^2/3, as shown below.

Day141Folium2

To see this, we need to find

\displaystyle\lim_{x\to0}\dfrac y{x^2}.

After a little trial and error, I found it was simplest to use the substitution z=y/x^2, and so rewrite the equation for the Folium of Descartes by using the substitution y=x^2z, which results in

1+x^3z^3=3z.

Now it is easy to see that as x\to0, we have z\to1/3, giving us a good quadratic approximation at the origin.

Success!  So I thought I’d try some more examples, and see how they worked out.  I first just changed the exponent of x, looking at the curve

x^n+y^3=3xy,

shown below when n=6.

Day141Folium3.png

What would be a best approximation near the origin?  You can almost eyeball a fifth-degree approximation here, but let’s assume we don’t know the appropriate power and make the substitution y=x^kz, with k yet to be determined. This results in

x^{3k-n}z^3+1=3zx^{k+1-n}.

Now observe that when k=n-1, we have

x^{2n-3}z^3+1=3z,

so that \displaystyle\lim_{x\to0}z=1/3. Thus, in our case with n=6, we see that y=x^5/3 is a good approximation to the curve near the origin.  The graph below shows just how good an approximation it is.

Day141Folium4.png

OK, I thought to myself, maybe I just got lucky.  Maybe introduce a change which will really alter the nature of the curve, such as

x^3+y^3=3xy+1,

whose graph is shown below.

Day141Folium5

Here, the curve passes through the x-axis at x=1, with what appears to be a linear pass-through.  This suggests, given our previous work, the substitution y=(x-1)z, which results in

x^3+(x-1)^3z^3=3x(x-1)z+1.

We don’t have much luck with \displaystyle\lim_{x\to1}z here.  But if we move the 1 to the other side and factor, we get

(x-1)(x^2+x+1)+(x-1)^3z^3=3x(x-1)z.

Nice!  Just divide through by x-1 to obtain

x^2+x+1+(x-1)^2z=3xz.

Now a simple calculation reveals that \displaystyle\lim_{x\to1}z=1. And sure enough, the line y=x-1 does the trick:

Day141Folium6

Then I decided to change the exponent again by considering

x^n+y^3=3xy+1.

Here is the graph of the curve when n=6:

Day141Folium7

It seems we have two roots this time, with linear pass-throughs.  Let’s try the same idea again, making the substitution y=(x-1)z, moving the 1 over, factoring, and dividing through by x-1.  This results in

x^{n-1}+x^{n-2}+\cdots+1+(x-1)^2z^3=3xz.

It is not difficult to calculate that \displaystyle\lim_{x\to1}z=n/3.

Now things become a bit more interesting when n is even, since there is always a root at x=-1 in this case.  Here, we make the substitution y=(x+1)z, move the 1 over, and divide by x+1, resulting in

\dfrac{x^n-1}{x+1}+(x+1)^2z^3=3xz.

But since n is even, then x^2-1 is a factor of x^n-1, so we have

(x-1)(x^{n-2}+x^{n-4}+\cdots+x^2+1)+(x+1)^2z^3=3xz.

Substituting x=-1 in this equation gives

-2\left(\dfrac n2\right)=3(-1)z,

which immediately gives  \displaystyle\lim_{x\to1}z=n/3 as well!  This is a curious coincidence, for which I have no nice geometrical explanation.  The case when n=6 is illustrated below.

Day141Folium8

This is where I stopped — but I was truly surprised that everything I tried actually worked.  I did a cursory online search for Taylor series of implicitly defined functions, but this seems to be much less popular than series for y=f(x).

Anyone more familiar with this topic care to chime in?  I really enjoyed this brief exploration, and I’m grateful that William Meisel asked his question about the Folium of Descartes.  These are certainly instances of a larger phenomenon, but I feel the statement and proof of any theorem will be somewhat more complicated than the analogous results for explicitly defined functions.

And if you find some neat examples, post a comment!  I’d enjoy writing another follow-up post if there is continued interested in this topic.

The Geometry of Polynomials

I recently needed to make a short demo lecture, and I thought I’d share it with you.  I’m sure I’m not the first one to notice this, but I hadn’t seen it before and I thought it was an interesting way to look at the behavior of polynomials where they cross the x-axis.

The idea is to give a geometrical meaning to an algebraic procedure:  factoring polynomials.  What is the geometry of the different factors of a polynomial?

Let’s look at an example in some detail:  f(x)=2(x-4)(x-1)^2.poly0b

Now let’s start looking at the behavior near the roots of this polynomial.

poly0c

Near x=1, the graph of the cubic looks like a parabola — and that may not be so surprising given that the factor (x-1) occurs quadratically.

poly0d

And near x=4, the graph passes through the x-axis like a line — and we see a linear factor of (x-4) in our polynomial.

But which parabola, and which line?  It’s actually pretty easy to figure out.  Here is an annotated slide which illustrates the idea.

Day137poly1

All you need to do is set aside the quadratic factor of (x-1)^2, and substitute the root, x=1, in the remaining terms of the polynomial, then simplify.  In this example, we see that the cubic behaves like the parabola y=-6(x-1)^2 near the root x=1. Note the scales on the axes; if they were the same, the parabola would have appeared much narrower.

We perform a similar calculation at the root x=4.

Day137poly2

Just isolate the linear factor (x-4), substitute x=4 in the remaining terms of the polynomial, and then simplify.  Thus, the line y=18(x-4) best describes the behavior of the graph of the polynomial as it passes through the x-axis.  Again, note the scale on the axes.

We can actually use this idea to help us sketch graphs of polynomials when they’re in factored form.  Consider the polynomial f(x)=x(x+1)^2(x-2)^3.  Begin by sketching the three approximations near the roots of the polynomial.  This slide also shows the calculation for the cubic approximation.

Day137poly3.png

Now you can begin sketching the graph, starting from the left, being careful to closely follow the parabola as you bounce off the x-axis at x=-1.

poly1d

Continue, following the red line as you pass through the origin, and then the cubic as you pass through x=2.  Of course you’d need to plot a few points to know just where to start and end; this just shows how you would use the approximations near the roots to help you sketch a graph of a polynomial.

poly1f

Why does this work?  It is not difficult to see, but here we need a little calculus.  Let’s look, in general, at the behavior of f(x)=p(x)(x-a)^n near the root x=a.  Given what we’ve just been observing, we’d guess that the best approximation near x=a would just be y=p(a)(x-a)^n.

Just what does “best approximation” mean?  One way to think about approximating, calculuswise, is matching derivatives — just think of Maclaurin or Taylor series.  My claim is that the first n derivatives of f(x)=p(x)(x-a)^n and y=p(a)(x-a)^n match at x=a.

First, observe that the first n-1 derivatives of both of these functions at x=a must be 0.  This is because (x-a) will always be a factor — since at most n-1 derivatives are taken, there is no way for the (x-a)^n term to completely “disappear.”

But what happens when the nth derivative is taken?  Clearly, the nth derivative of p(a)(x-a)^n at x=a is just n!p(a).  What about the nth derivative of f(x)=p(x)(x-a)^n?

Thinking about the product rule in general, we see that the form of the nth derivative must be f^{(n)}(x)=n!p(x)+ (x-a)(\text{terms involving derivatives of } p(x)). When a derivative of p(x) is taken, that means one factor of (x-a) survives.

So when we take f^{(n)}(a), we also get n!p(a).  This makes the nth derivatives match as well.  And since the first n derivatives of p(x)(x-a)^n and p(a)(x-a)^n match, we see that p(a)(x-a)^n is the best nth degree approximation near the root x=a.

I might call this observation the geometry of polynomials. Well, perhaps not the entire geometry of polynomials….  But I find that any time algebra can be illustrated graphically, students’ understanding gets just a little deeper.

Those who have been reading my blog for a while will be unsurprised at my geometrical approach to algebra (or my geometrical approach to anything, for that matter).  Of course a lot of algebra was invented just to describe geometry — take the Cartesian coordinate plane, for instance.  So it’s time for algebra to reclaim its geometrical heritage.  I shall continue to be part of this important endeavor, for however long it takes….

Geometrical Dissections III: Octagons and Dodecagons

It has been quite a while since I’ve written about geometrical dissections.  For a brief refresher, you might want to look at my first post on dissections.

But recently my interest has been rekindled — to the point that I started writing a paper a few weeks ago!  I often like to share mathematics I’m working on as it’s happening to give you some idea of the process of doing mathematics.  The paper has quite a bit more mathematics in it than I’ll include in this post, but I’ll try to give you the gist of what’s involved.

Recall (again, see my first post for a more thorough discussion) that I’m interested in finding dissections that you can draw on graph paper — I find these more enjoyable as well as being accessible to a wider audience.  So all the dissections I’ll talk about will be based on a grid.

The first example is a dissection of two octagons to one, such as shown below.

Day118Dissection2

In other words, you can take the pieces from the two smaller octagons, move them around, and build the larger octagon.  If you look carefully, you’ll notice that the larger octagon is rotated 45° relative to the smaller octagons.  Geometrically, this is because to get an octagon twice the area of a given octagon, you scale the side lengths by \sqrt2.  Imagine a square — a square with side length S has area S^2, while a square with side length \sqrt2S has area (\sqrt2S)^2=2S^2  — which is double the area.

Now think of a segment of unit length.  To get a segment of length \sqrt2, you need to take a diagonal of a unit square, which rotates the segment by 45° as well as scales it by a factor of \sqrt2.  This is why the larger octagon is rotated with respect to the smaller ones.

But what makes this dissection interesting is that there is an infinite family of very similar dissections.  By slightly varying the parameters, you get  a dissection which looks like this:

Day118Dissection3

Here, you can clearly see the 45° rotation of the larger octagon.  I always enjoy finding infinite families of dissections — it is very satisfying to discover that once you’ve found one dissection, you get infinitely many more for free!

The proof that this always works (which I will omit here!) involves using a geometrical argument — using arbitrary parameters — to show that the green triangles always have to be right isosceles triangles.  This is the essential feature of the dissection which makes it “work” all the time.

The second example I’m including in the paper is a dissection on a triangular grid, like the one below.

Day118Dissection4

Note that the figure on the left is an irregular dodecagon; that is, it has twelve sides.  Recall that the interior angles of a regular dodecagon have measure 150° — but so do the angles of this irregular dodecagon as it is drawn on a triangular grid.

If you look carefully, you’ll see how the sides in the pieces of the dissection on the right match up with sides of the same length from the other pieces.  Also, looking at the dissection on the right, you’ll see that around all the interior vertices, there are two angles with measure 150° and one with measure 60°, adding up to 360° — as we would expect if the pieces fit exactly together.

And — as you might have guessed from the first example — this is also one of an infinite family of dissections.  As long as the sides of the irregular dodecagon alternate and the vertices stay on the triangular lattice, there is a dissection to a rhombus.  Below is another example, and there are infinitely many more….

Day118Dissection5

My third and final example involves irregular dodecagons, but this time on a square grid.  And while I found the previous two dissections several years ago, I found this example just last week!  What inspired me was one of my favorite dissections — from an irregular dodecagon to a square — also found many years ago.

Day118Dissection1

In the spirit of the first two examples, I asked myself if this dissection could be one of an infinite family.  The difficulty here was that there were three parameters determining an irregular dodecagon, as shown below.

Day118Dodecagon

We do need b>c so that the dodecagon is convex and actually has 12 sides; if b=c, four pairs of sides are in perfect alignment and the figure becomes an octagon.

There is an additional constraint, however, which complicates things a bit.  The area of this dodecagon must also be the area of some tilted square with vertices on the grid, as illustrated below.  Note that the area of this square is just d^2+e^2.

Day118Square

It is not a difficult geometry exercise to show that the area of the dodecagon is a^2+4(a+b)(c+b).  So in order to create a dissection, we must find a solution to the equation

a^2+4(a+b)(c+b)=d^2+e^2.

Again, here is not the place to go into details.  But it is possible to find an infinite family of solutions when a=e.  You get a dissection which looks like this:

Day118Dissection6

I was particularly pleased to have found this eight-piece dissection since most of my attempts until this point had ten pieces or more.  And to give you a sense of this family of dissections, here is an example with different parameters within this family.

Day118Dissection7

You can definitely see the resemblance, but it is also clear that the dodecagon and square are not the same shape as those in the previous dissection.

So these are the three families of geometrical dissections I’ll be including in my paper.  I hope these examples might inspire you to pick up a pencil and graph paper and try to find some infinite families of your own!

 

Polygons

In working on a proposal for a book about three-dimensional polyhedra last week, I needed to write a brief section on polygons.  I found that there were so many different types of polygons with such interesting properties, I thought it worthwhile to spend a day talking about them.  If you’ve never thought a lot about polygons before, you might be surprised how much there is to say about them….

So start by imagining a polygon — make it a pentagon, to be specific.  Try to imagine as many different types of pentagons as you can.

How many did you come up with?  I stopped counting when I reached 20….

Likely one of the first to come to mind was the regular pentagon — five equal sides at angles of 108° from each other.  Question:  did you only think of the vertices and edges, or did you include the interior as well?

Day106Penta3

Why consider this question?  An important geometrical concept is that of convexity.  A convex polygon property has the property that a line segment joining any two points in the polygon lies entirely within the polygon.

Day106Convexity

The two polygons on the left are convex, while the two on the right are not.  But note that for this definition to make any sense at all, a polygon must include all of its interior points.

Convex polygons have various properties.  For example, if you take the vertices of a convex polygon and imagine stretching a rubber band beyond the vertices and letting it snap back, the rubber band will describe the edges of the polygon.  See this Wikipedia article on convex polygons for more properties of convex polygons.

Did the edges of any of your pentagons cross each other, like the one on the left below?

Day106Penta4

In this picture, we indicate vertices with dots to illustrate that this is in fact a pentagon.  The points where the edges cross are not considered vertices of the polygon.  The polygon on the right is actually a nonconvex decagon, even though it bears a resemblance to the pentagon on the left.

But not so fast!  If you ask Mathematica to draw the polygon on the left with the five vertices in the order they are traversed when drawing the edges, here is what you get:

Day106Penta1.png

So what’s going on here?  Why is the pentagon empty in the middle?  When I gave the same instructions using Tikz in LaTeX (which is how I created the light blue pentagram shown above), the middle pentagon was filled in.

Some computer graphics programs use the even-odd rule when drawing self-intersecting polygons.  This may be thought of in a few ways.  First, if you imagine drawing a segment from a point in the interior pentagon to a point outside, you have to cross two edges of the pentagon, as shown above.  If you draw a segment from a point in one of the light red regions to a point outside, you only need to cross one edge.  Points which require crossing an even number of edges are not considered as being interior to the polygon.

Said another way, if you imagine drawing the pentagram, you will notice that you are actually going around the interior pentagon twice.  Any region traversed twice (or an even number of times) is not considered interior to the polygon.

Why would you want to color a polygon in this way?  There are mathematical reasons, but if you watch this video by Vi Hart all the way through, you’ll see some compelling visual evidence why you might want to do this.

We call polygons whose edges intersect each other self-intersecting or crossed polygons.  And as you’ve seen, including the interiors can be done in one of two different ways.

But wait!  What about this polygon?  Can you really have a polygon where a vertex actually lies on one of the edges?

Day106Penta2.png

Again, it all depends on the context.  I think you’re beginning to see that the question “What is a pentagon?” is actually a subtle question.  There are many features a pentagon might have which you likely would not have encountered in a typical high school geometry course, but which still merit some thought.

Up to now, we’ve just considered a polygon as a two-dimensional geometrical object.  What changes when you jump up to three dimensions?

Again, it all depends on your definition.  You might insist that a polygon must lie in a plane, but….

It is possible to specify a polygon by a list of points in three dimensions — just connect the points one by one, and you’ve got a polygon!  Of course with this definition, many things are possible — maybe you can repeat points, and maybe the points do not all lie in the same plane.

An interesting example of such a polygon is shown below, outlined in black.

Day106Cube

It is called a Petrie polygon after the mathematician who first described it.  In this case, it is a hexagon — think of holding a cube by two opposite corners, and form a hexagon by the six edges which your fingers are not touching.

There is a Petrie polygon for every Platonic solid, and may be defined as follows:  it is a closed path of connected edges such that no three consecutive edges belong to the same face.  If you look at the figure above, you’ll find this is an alternative way to define a Petrie hexagon on a cube.

And if that isn’t enough, it is possible to define a polygon with an infinite number of sides!  Just imagine the following jagged segment continuing infinitely in both directions.

Day106Apeirogon

This is called an apeirogon, and may be used to study the tiling of the plane by squares, four meeting at each vertex of the tiling.

And we haven’t even begun to look at polygons in other geometries — spherical geometry, projective geometry, inversive geometry….

Suffice it to say that the world of polygons is much more than just doodling a few triangles, squares or pentagons.  It is always amazes me how such a simple idea — polygon — can be the source of such seemingly endless investigation!  And serve as another illustration of the seemingly infinite diversity within the universe of Geometry….

Still more on: What is…Inversive Geometry?

Now for the final post on inversive geometry!  I’ve been generating some fascinating images, and I’d like to share a bit about how I make them.

2017-07-19Inversion3v2.png

In order to create such images in Mathematica, you need to go beyond the geometrical definition of inversion and use coordinate geometry.  Let’s take a moment to see how to do this.

Recall that P′, the inverse point of P, is that point on a ray drawn from the origin through P such that

[OP]\cdot[OP']=1,

where [AB] denotes the distance from A to B.  Feel free to reread the previous two posts on inversive geometry for a refresher (here are links to the first post and the second post).

Now suppose that the point P has Cartesian coordinates (x,y).  Points on a ray drawn from the origin through P will then have coordinates (kx, ky), where k>0.  Thus, we just need to find the right k so that the point P'=(kx,ky) satisfies the definition of an inverse point.

This is just a matter of a little algebra; the result is

P'=\left(\dfrac{x}{x^2+y^2},\dfrac{y}{x^2+y^2}\right).

What this means is that if you have an equation of a curve in terms of x and y, if you substitute x/(x^2+y^2) everywhere you see x, and substitute y/(x^2+y^2) everywhere you see y, you’ll get an equation for the inverse curve.

Let’s illustrate with a simple example — in general, the computer will be doing all the work, so we won’t need to actually do the algebra in practice.  We’ll look at the line x=1.  From our previous work, we know that the inverse curve must be a circle going through the origin.

Making the substitution just discussed, we get the equation

\dfrac x{x^2+y^2}=1,

which may be written (after completing the square) in the form

\left(x-\dfrac12\right)^2+y^2=\dfrac14.

It is not hard to see that this is in fact a circle which passes through the point (0,0).

Now we need to add one more step.  In the definition of an inverse point, we had the point O being the origin with coordinates (0,0).  What if O were some other point, say with coordinates (a,b)?

Let’s proceed incrementally.  Beginning with a point (x,y), translate to the point (x-a,y-b) so that the point (a,b) now acts like the origin.  Now use the previous formula to invert:

\left(\dfrac{x-a}{(x-a)^2+(y-b)^2},\dfrac{y-b}{(x-a)^2+(y-b)^2}\right).

Finally, translate back:

\left(a+\dfrac{x-a}{(x-a)^2+(y-b)^2},b+\dfrac{y-b}{(x-a)^2+(y-b)^2}\right).

This is now the inverse of the point (x,y) about the point (a,b).

So what you see in the above image is several copies of the parabola y=x^2 inverted about a series of equally spaced points along the line segment with endpoints (1/2,-1/2) and (3/2,1/2).  This might seem a little arbitrary, but it takes quite a bit of experimentation to find a set of points to invert about in order to create an aesthetically pleasing image.

Of course there is another perspective on accomplishing the same task — just shift the parabolas first, invert about the origin, and then shift back.  This is geometrically equivalent (and the algebra is the same); it just depends on how you want to look at it.

Here is another image creating by inverting the parabola y=x^2 about points which lie on a circle.

2017-07-18Inversion1v2

And while we’re on the subject of inverting parabolas, let’s take a moment to discuss the cardioid example we looked at in our last conversation about inversion:

Cardioid2

To prove that this construction of circles actually yields a cardioid, the trick is to take the inverse of a parabola about its focus.  If you do this, the tangent lines of the parabola will then invert to circles tangent to a cardioid.  I won’t go into all the details here, but I’ll outline how the proof goes using the following diagram.

Day104ParabolaProperty

Draw a line (shown in black) tangent to the blue parabola at its vertex; the inverse curves are shown in the same color, but dashed.  Note that the black circle must be tangent to the blue cardioid since the inverse black line is tangent to the inverse parabola.

The small red disk is the focus of the parabola.  Key to the proof is the property of the parabola that if you draw a line from the focus to a point on the black line and then bounce off at a right angle (the red lines), the resulting line is tangent to the parabola.  So the inverse of this line — the red dashed circle — must be tangent to the cardioid.

Since perpendicularity is preserved and the line from the focus inverts to itself (since we’re inverting about the focus), the red circle must be perpendicular to this line — meaning that the line from the focus in fact contains a diameter, and hence the center, of the red circle.  Then using properties of circles, you can show that all centers of circles formed in this way lie on a circle (shown dotted in purple) which is half the size of the black circle.  I’ll leave the details to you….

Finally, I’d like to show a few examples of using the other conic sections.  Here is an image with 80 inversions of an ellipse around centers which lie on a line segment.

2017-07-22Inversion1v2

And here is an example of 100 hyperbolas inverted around centers which lie on a line segment.  Since the tails of the branches of a hyperbola all go to infinity, they all meet at the same point when inverted.

2017-07-22Inversion2v2

So now you know how to work with geometrical inversion from an algebraic standpoint.  I hope seeing some of the fascinating images you can create will inspire you to try creating some yourself!

Imagifractalous! 7: Fractal Binary Trees IV

Bridges 2017 is next week in Waterloo, Ontario, Canada!  We’re all looking forward to it…Nick and his parents are also going, and I’ll get to see a lot of new friends I met last year in Finland.

In preparation, I’ve been creating a portfolio of binary and ternary trees.  I’ve been coloring and highlighting the branches to make them easier to understand, so I thought I’d take the opportunity to share several of them.  Mathematics just as it’s happening….

Here is an example of what I’m talking about.

2017-07-20-0is11v1

Recall that we’re generalizing the idea of “left” and “right” branches of a binary tree — rather that just rotating left or right (and possibly scaling), we’re allowing any affine transformation to correspond to “left” and “right.”  In order to avoid any confusion, let’s refer to the transformations as “0” and “1.”

In the tree above, the 0 branches are shown in black, and the 1 branches in red.  Notice that sometimes, the 0 branches seem to go to the right, other times, to the left.  This is a common occurrence when you allow the branching to be determined by more general transformations.

Here, you’ll notice that 0 and 11 take you to the same place — beginning with the trunk (the vertical black line at the right), if you follow one black branch, you’ll end up at the same blue node as you would if you followed two red branches.  In fact, no matter what blue node you start at, following one black branch will always take you to the same place as following two red branches.

Here is not the place to go into too many details, but let me give you the gist of what we’re studying.  If you denote the transformation which generates the black branches by B_0 and that which generate the red branches by B_1, you will observe behavior like that in the above tree if

B_0=B_1+B_1^2.

Right now, most of the work I’m doing revolves around saying that I want to generate a tree with a certain property (like 0 and 11 going to the same node), and then solving the corresponding matrix equation to find interesting examples of trees with this property.  Usually the linear algebra involved is fairly complicated — feel free to comment if you’d like to know more.  As I said, this blog is not the place for all the details….

Below is another interesting example.

2017-07-20-0is00v2.png

In this tree, 0 and 00 go to the same node.  What this means in terms of branching is that there can never be two consecutive black branches (again, 0 is black and 1 is red) — taking the additional 0 branch leaves you in exactly the same place.

Note that for this property to hold, there is no restriction on what the 1 transformation can be.  Above, the transformation B_1 is a scaled rotation by 60°.  This is what produces the spirals of red branches emanating from the nodes of the tree.

2017-07-20-0is01v1.png

In this example, 0 and 01 go to the same node (0 is black, 1 is red).  Implications for the tree are that the red branches zigzag back and forth, getting shorter with each iteration.  Moreover, there aren’t any red branches drawn after a black branch (except the first time, off the end of the trunk of the tree).  This is because 01 — taking a red branch after a black branch — takes you to the same place as 0, which is taking a black branch.  In other words, the red branch doesn’t take you any further.

2017-06-27-01is10.png

Here, 01 and 10 take you to the same node (again, 0 is black and 1 is red).  This is easy to see — there are many quadrilaterals in the tree formed by alternating red and black branches.  In addition, the iterations of this tree move progressively higher each time — so, for example, all the nodes at the top are at a depth of 4.

If you look at the number of new nodes at each level, you get a sequence which begins

2, 3, 6, 12, 24, 48, 96, 192, 384, 768, ….

After the second level, it seems that the number of new nodes doubles with each iteration.  I say “seems” since it is generally very difficult to prove that such a relationship continues up arbitrarily many levels.  Although it is easy to find the sequence of numbers of nodes for any tree using Mathematica, I have rigorous proofs of correctness for only three cases so far.

What makes the proofs so difficult?  The following tree is another example of a case where 01 and 10 go to the same node.

2017-06-25-01is10v1

But the sequence of new nodes at each level is just 2, 3, 4, 5, 6, ….  (This is one case I’ve rigorously proved.)  The transformations B_0 and B_1 used to make this tree, in addition to forcing 01 and 10 to go to the same node, also have additional properties which force any two strings of the same length with the same number of 0’s (and therefore the same number of 1’s as well) to go to the same node.  So to prove the sequence of nodes in the previous case is 2, 3, 6, 12, 24, 48, …, you need to say which strings take you to the same nodes, and prove that this pattern continues no matter how far you go up — and that there are no “surprise” coincidences of other nodes as you proceed.

It is also possible to look at infinite strings going to the same node, as shown below.  The linear algebra gets quite a bit more involved in these cases.

2017-07-02infp1q1.png

Here, 0 and 1 do in fact correspond to going left and right, respectively.  The thicker black path corresponds to the string 011111…, that is, going left once, and then going to the right infinitely often, creating the spiral you see above.  The thicker green path corresponds to alternating 10101010… infinitely often, creating a zigzag path which approaches exactly the same point as the black spiral does.

Here is another example, where the spiral 011111… (in black) approaches the same point as the infinite zigzag 100100100100… (in purple).

2017-07-02infp1q2.png

These are some of my favorite examples.  But I should remark that once you know how to mathematically find transformations which produce trees with a desired property, it takes a lot of fiddling around to find aesthetically pleasing examples.

I hope these examples give you a better idea of the nature of our research.  I’ll update you on Bridges when I get back, and let you know about any interesting comments other participants make about our trees.  I leave on Wednesday, and will post pictures daily on my Twitter @cre8math if you’d like a daily dose of mathematical art!