## Posts Tagged ‘math’

### Function Approximation by Geometric Derivatives

December 9, 2010

If the idea behind a normal derivative might be describe as the amount one needs to ad to move forward. If so, then the idea behind a geometric derivative is the amount one needs to multiply by.

The definition of a geometric derivative is $D^* f(x) = \lim _{h\to 0} \left(\frac{f(x+h}{f(x)}\right)^\frac{1}{h}$

One thing one might wonder is whether we can use them to approximate functions, like we can use derivatives to approximate functions with Taylor series. A quick Google search didn’t reveal anything, but it isn’t too hard to figure out.

### Multi-Colour 3D Printing by Filament Swapping

December 8, 2010

The above picture is solution to the diffusion equation $u_t = u_xx; ~~ t \in [0,\infty),~ x \in \mathbb{R}$ with the initial conditions $u(x,0) = \{ 0 ~ x>0, 1 ~ x\geq 0$. (WordPress doesn’t seem to like the array environment…)

English Translation: If you imagine a metal bar heated up on one side, as time progresses the temperature will even out. This is a plot of the temperature with one side being the length of the rod and the other being time.

But that’s probably not too interesting to most people reading this post. The interesting things is how I got the multi-colour object.

It was made by feeding one short piece of filament into the printer after another, during the print job. It was surprising to see how nicely one colour faded into the next.

Unfortunately, this broke the hacklab.to Break-R-Bot Maker Bot. The problem was that there was a sharp point on one filament that deflected the next one to the side. It was easy enough to fix (thanks to Rob for helping me!), but it seems like a bad idea to test it again oh the hacklab printer. I’m building my own, so the experiments should continue in a few weeks, anyway.

It seems like the problem should be possible to avoid as long as one makes sure that the filaments have flat ends. I am also planning to experiment with using a hot air gun to fuse pieces of filament.

(Thanks to Stefan for taking the picture of the models for me!)

### 3D printing of Mathematical Objects!

August 21, 2010

Back in the fall I did some work on getting hacklab.to‘s 3d-printer to print mathematical objects created in sage. Unfortunately, shortly after I got it to work and printed a test sphere, the 3d printer broke. Thus began a long succession of the makerbot — nicknamed the break-r-bot — being fixed and broken… spending most of its time broken.

But recently it was fixed and I decided to dig out my old code and get to work on it.

### Separation Axiom Visualisations

August 14, 2010

A couple days a go, I saw some nice visualisations of separation axioms on Wikipedia. Unfortunately, it wasn’t a full set. Well, here is a full set (well, T0, T1, T2, T2 1/2, T3, T4, T5):

### Variations of the Mandelbrot Set

April 23, 2010

Here’s some variations of the Mandelbrot Set I’ve been looking at. They aren’t terribly interesting from a mathematical perspective, but their pretty!

### The Mandelbrot Set: Compact?

March 28, 2010

Several weeks ago, I read something on Wikipedia that shocked me: “The Mandelbrot set is a compact set.

At first I didn’t believe it. How could the Mandelbrot set, in its infinite complexity, be compact? (more…)

### Why are there mini sets in the Mandelbrot Set?

March 10, 2010

One of the most interesting properties of the Mandelbrot Set is that we can find what appear to be miniature Julia Sets and mini Mandelbrot Sets.

It’s easier to look at a different question first: why is it that the Julia sets associated with a point on a Mandelbrot set tend to be similar to that region of the Mandelbrot set?

Consider the functions that create them:

Julia: $\lim_{n\to\infty}(z\to z^2+k)^n(x)$

Mandelbrot: $\lim_{n\to\infty}(z\to z^2+x)^n(x)$

And the question is: why is the region of the Mandelbrot set around a point $x$ similar to a the Julia set where $k=x$?

It’s obvious that at that point, the two functions are the same, but, given that we’re studying chaos it seems odd that the slight variations in the region around it wouldn’t produce a totally different appearance.

There are a couple ways to approach this problem. The first is to note that this isn’t, at the vary least, necessarily true as demonstrated by the following experiment. I constructed a sequence of fractals formed by the function $\lim_{n\to\infty} (z\to z^2 +0.3 +x/m)^n(x)$ where I varied $m$ from one to a hundred along the integers:

(You may need to click to see the animation!)

(Images created with gnofract4d and animated with imagemaick.)

That only goes to dividing by a hundred, but the influence is pretty negligible at the end. I could divide by more until the influence was arbitrarily negligible.

The second way of looking at this is that Julia sets of similar $k$ values tend to be similar and therefore the associated region of the Mandelbrot set is similar.

Finally, we can look at the fact that the Mandelbrot set is $T_2$ and thus, provided a point is not right on the edge of a sudden change, we can construct a set containing it and no the change (ie. select an arbitrarily small neighbourhood such that the change is negligible, as said previously).

The “mini-Julia sets” form when we get a miniature, often deformed, plane (let’s dub it a microplane, because making up terms is fun!). The microplane will have a root of the Mandelbrot set in its center.

If the microplane is small enough, it may be contained in one of the previously described neighbourhoods in which the iterated function is essentially a Julia function and thus form what appears to be a Julia set, though it is different in some respects (eg. connected, joined to the Mandelbrot, et cetera).

But the really odd things are the “mni Mandelbrot Sets”. What is going on with them?

I don’t really have a satisfactory answer. I do have a few observations, however:

Firstly, these mini Mandelbrot Sets’ are quite different from the Mandelbrot Set. They seem to form on roots. They seem to have bulb-like Julia sets around them…

Here’s a visualisation of the formation of one:

It’s completely different from the formation of the Mandelbrot Set!

Finally, I’d like to put forward a theory: there is a natural propensity for an iterated function to form self-similarity.

### Complex Powers

March 9, 2010

Exponents + Complex Numbers = Cool Stuff

I’ve been messing around with these sort of things and discovering all sorts of neat stuff. I haven’t got far enough in Needham to really understand all of it, but here are some things I have found.

The plots of $x^k$ where $k$ is a point on the complex unit circle are fascinating. Here’s an animation I made:

You can also watch a high-quality video on youtube.

At $k=i$ argument and magnitude of the output seem to be switched. They swirl into these circles and then swirl out such that the high magnitude and low magnitude ends are switched.

Another interesting thing is that $i^x$ and $e^{ix}$ are related. In fact: $i^{-2ix/\pi}=e^x$$i^{-2i/\pi}=e$

Update: The reason why this happens is fairly straight forward. Consider $x^{e^{\pi i n}} = (re^{i\theta})^{\cos(\pi n)+i\sin(\pi n)}=e^{\ln(r)\cos(\pi n)}*e^{\ln(r)i\sin(\pi n)}*e^{i\theta\cos(\pi n)}*e^{-\theta\sin(\pi n)}=e^{\ln(r)\cos(\pi n)-\theta\sin(\pi n)}*e^{i\theta\cos(\pi n)+\ln(r)i\sin(\pi n)}$ and thus magnitude and argument switch as $n$ increases.

### Compactness Graph

March 9, 2010

Here’s the first revision of a graph of the implications of topological properties that I made:

(Click on it to see a better version!)

It’s mostly based off the stuff in Counterexamples In Topology (great book, BTW) but I did add some stuff (like Baire!) and merged/reorganised it. Diagram was made by Graphviz.

Most of the implications are trivial, but there are a few I haven’t prooved yet (most of the ones involving seperation axioms).

### Gamma Fractals

February 12, 2010

There doesn’t seem to have been much done in the way of studying fractals of iterated functions involving gamma. At least nothing that I could find.

So I started playing around with it. It’s a bit difficult to work with as sage (4.3.2) keeps crashing when I try to plot it (try to run complex_plot(gamma(gamma(x)), [-10,10], [-10,10]) or complex_plot(gamma(gamma(gamma(x))), [-5,5], [-5,5]) ), but I still got some pictures…

Identity

Gamma Function

$\Gamma^2$ (Gamma of Gamma)

### Fractals with non-Integer powers

February 11, 2010

I mess around with fractals a lot, and sometimes stumble on some interesting things. Recently I came across some odd jagged/discontinuous fractals:

Julia Set of $z \to z^{\frac{3}{2}}+0.4+0.1i$

This tends to happen in fractals as soon as I involved non-Integer powers.

Why is this happening? To understand this, we need to look at some basic complex analysis.

Recall that a complex number can be interpreted as a vector like $(real, imaginary)$. But we can also think if a vector in terms of direction and magnitude. For our purposes, we will think of vectors as a magnitude and an angle from the positive portion of the real number line (sometimes called the argument,’ we will just call it the angle).

Complex numbers have the interesting property that when we multiply them their magnitudes multiply like normal numbers but their angles add. For example, $-1$ has an angle of $\pi$ so when we multiply two of them we end up with a magnitude of $1$ and an angle of $2\pi$ and thus $1$.

When we raise a value to a real power, the angle is multiplied by that value. We can visualise this as:

 $z \to z^2$ $\implies$

It’s fairly clear that for the inverse, for any value, there are two valid answers.

 $\implies$ $z^2\to z$

We can also look at it with an alternative visualisation I just cooked up:

Notice that the angle of the ray of discontinuity is arbitrary, but its existence is inevitable.

(For more on complex analysis, I recommend Visual Complex Analysis by Tristan Needham (Google Books, Amazon). It’s awesome!)

(Sage users: Here is a generalised version of the function I used to make the above image. It takes a value n and returns a visualisation of the nth root:


def root_visualize(n):
l=[]
for j in range(n*8):
l.append(complex_plot(lambda x: (x*exp(-sqrt(-1)*j*pi/4))^(1/n)*exp(sqrt(-1)*j*pi/n/4),[-5,5],[-5,5]))
print j
return animate(l)


Be warned: it is slow)

Now, notice that $z^{1.5}$ is the same as $z\sqrt{z}$. Thus, it has the same discontinuity. That seems like a reasonable answer to “why is this so jagged?”

But it leads to some interesting questions. The intuitive reaction is (for me at least): part of the fractal is missing. You’re cutting apart the nice, smooth mutlifunction and thus are only seeing part of the fractal. Well, at $n$ iterations there $2^n$ possible ways to have cut this hypothetical super-fractal (as I will refer to it).

Let’s look at the Julia super-fractal of $z\to \pm z^{1.5}+0.3$ for four iterations…

If you stare at all the possibilities of the forming set you will notice some patterns and what look like reciprocals and other patterns. One may intuitively wish to add them to extract a single fractal, but this isn’t possible since they’d cancel… Perhaps adding the absolute values?

(For more on the formation of fractals, see my previous post.)

Of course, one really should look at a larger number of iterations than I am. There is the small problem of this being $O(n*2^n)$, but it should be easy to parallelize…

So that’s the extent that I’ve explored this to so far. I’d be thrilled to get some feedback. Do you have any thoughts about this? Know of similar things that have been studied? (I’ve never formally studied Chaos Theory and suspect I have lots of holes in my knowledge. Reminder to self: take/audit course on chaos theory next year…)

### The Modern Demonic Parody of Education

February 10, 2010

The Surface of the Problem

I’m angry. Well, actually, I’ve calmed down. But I was angry. I’ll probably get angry again as I write.

Why? Because I was, once again, reminded of the depravity of modern mathematics education and by extension all education.

My sister had a friend over and while we were eating dinner my sister mentioned they were going to do homework, she music and her friend math. Her friend groaned that she hated math. I was, of course, scandalised and asked why.

To begin with, her math teacher last year thought math wasn’t important and decided to just give them a pile of worksheets. This year, well, one question she was working on was turning $\frac{81}{12}$ into a mixed number’ (a number of the form $a+\frac{b}{c}$ that must be written in the notational monstrosity $a\frac{b}{c}$). Well, that’s fairly easy once we know what hoops we need to jump through: it factors to $\frac{3^4}{3*4}$ which is equal to $\frac{27}{4}$ which can be turned $\frac{6*4+3}{4}$ which is $6+\frac{3}{4}$ ($6\frac{3}{4}$, *shuders*). Simple right?

Well, she didn’t factoring was, or that you were allowed to cancel things multiplied on the top or bottom. She just removed twelfths from the top until she couldn’t. So, besides doing stupid, meaningless exercises she was doing them with a huge handicap. No wonder she thought math is boring.(Side note: when she asked a teacher for help, she was laughed at.)

This sort of teaching’ is not unique to mathematics. My sister’s classes for the two previous years learned nothing (or so one might infer from the fact that she could miss a quarter or so of the year and not need to to any catch up. And not have any homework, whatsoever.) in all subjects. This sort of teaching ruins subjects for the student. It isn’t just wasted time, it is damaging.

These miserable excuses of teachers disgust me. They receive one of the most important roles in society: educating children. They are put in a position of power over children and they use it to damage them. They teach them not to be curious, not to explore, not to care about learning, not to care about that subject…. It makes me angry.

I showed her fractals, 3d plots, topology (cup turning into doughnut), knots, transcendental numbers, and natural numbers/arithmetic from sets. We probably talked for about half an hour. At several points she made comments like, “That’s so cool!”

That’s the response every student should have every day in every class.

I refuse to believe that isn’t possible. If it can’t be done for a subject, that subject isn’t worth teaching.

Examples of Education Done Right

The obvious question is how do we do this?’ I’d like to look at the some of the best educational experiences I’ve had.

• In grade 9,  I had an amazing science class. Part of it was that it was taught well and was my first real introduction to science, but part of it was something else. I had a spare at the same time as the teacher, Mr. Maharaj, and he would come by every 15 minutes and answer any question (except “what is a photon?”) that I had, both during the spare and lunch. So I’d get the basics in class and then read wikipedia articles, intermittently asking questions. I learned a ton.
• hacklab.to Unpatched Tuesdays. Surrounded by a bunch of really knowledgeable people working on really cool projects. Enough said.
• hacklab.to workshops. If someone decides to teach a workshop at hacklab, its fairly safe to that they’re really interested in the subject. In particular, getting taught art (block press printing (1, 2, 3) and knife sharpening) by someone who keeps a jar of human teeth, made a robot to tear up essays, and otherwise embodies the insane(ly awesome) artist is very different than learning it at school.
• University lectures can be very good. But it helps if you’re there of your own choosing and are being exposed to fascinating ideas for the first time.

Common themes:

• Optional.
• Knowledgeable teachers.

Interpret that how you will. I’ll write more later.

### My Math Notation

February 9, 2010

Over the last year I’ve begun to diverge quite heavily from standard Mathematical notation. My experience in CS is compelling me to document this API notation.

Purpose

While real Mathematicians have been surprisingly supportive of me inventing my own notation, I feel compelled to justify it. My thoughts can be summarised in the syllogism:

1. Some notations allow certain thoughts to be expressed more easily than other notations.
2. The ease with which thoughts can be expressed changes the thoughts that are expressed.
3. Therefore notation can change thought.

Given this, I wish to make my notation capable of more conveniently expressing otherwise awkward thoughts.

Notation 1: $\{set\}$

Very early on this year, I got tired of writing: “For an open set $u$,”  and “Let $s$ be a compact set.”

I was also exposed to the notation of writing the set (class) of sets’ as $\{set\}$. So I decided to use this notation for expressing any set. For example: $u \in\{op en\}$ and $s\in\{compact\}$.

More recently, I’ve been treating them as functions that returns sets to express more complicated ideas. For example, I’d replace “let $p$ be an accumulation point of the set $s$ on the topology $T$” with $p\in\{accumulation\}(s,T)$.

Great for notes. Even outside math.

Notation 2: $S^\forall, ~~ S^\exists$

I recently got sick and tired of writing long chains of for alls and exists. I noticed that there were some very common patterns in there use. A typical example would be:

$(\forall a \in A)(\forall b\in B)(\exists c\in C)(a+b=c)$

We’re just saying that for any member of this set, or for some member of that set… Why can’t we just have an operator that acts on the set to do this for us?

I don’t see any reason. $S^\forall$: Place holder for all members of $S$. $S^\exists$: There is at least one member of $S$ that can take this place.

Note: if $S^\forall$ or $S^\exists$ is used multiple times in one formula, they are the same variable. If you want to specify a different one:

• $S^{\forall'}$ : Any member of $S$ that is not the same as $S^\forall$.
• $S^{'\forall}$: Any member of $S$, possibly the same as $S^\forall$.

Note: Order of operations for evaluating these operators: Nested, left to right of first instances. If one wishes to vary from this order, denote the operators alternative position $n$ as $S^{n\forall}$ or $S^{n\exists}$. If the standard notation is used in conjunction with this, the standard notation takes precedence in order of operations.

Example 1: Accumulation Point Defenition

$p \in \{accumulation\}(S,T) \iff \{s|p\in s\in T\}^\forall\cup S \neq 0$

Example 2: Hausdorff Space

$S \in T_2 (X,T) \iff$ $N(S^\forall)^\exists\cap N(S^{\forall'})^\exists =0$

### Derivative of the Derivative?

January 17, 2010

Recently I had a very odd thought. Can we do calculus on functions that take and return functions (eg, $(\mathbb{R} \to \mathbb{R}) \to (\mathbb{R} \to \mathbb{R})$)?

Well, we’d need to have a conceptual idea of space between functions. Well, we could borrow one from the real numbers by constructing a trivial set of functions that are isomorphic to the real numbers: $\{x \to kx | k \in \mathbb{R}\}$.

Great. So we have an organized set of functions. It seems appropriate to call this a function space. Now we just need a functions that acts on it so we can do calculus.

Because it would be ironic, let’s choose $\frac{d}{dx}$ as our function.

Hm… what happens when we apply $\frac{d}{dx}$ to functions of the form $x \to kx$? $\frac{d}{dx}(x \to kx)=x\to k$.

Blast it! That’s outside our function space! What will we do? We’ll add another function space $\{x \to k | k \in \mathbb{R}\}$.

The cartesian product of those two earily similar to the second degree real polynomial space, $P^2(\mathbb{R})$… Let’s consider them to be the same thing!

So, it seems reasonable to say that the Jacobian of the $n$-dimensional version of this is:

$J\left(\frac{d}{dx}\right) = \frac{d}{dx_{(1,2,3....)}}\left(\frac{d}{dx}\right)_{1,2,3...}= ~ \small \left[\begin{array}{cccc} 0&1&0&\ldots\\ 0&0&2&\ldots\\ 0&0&0&\ldots\\ \vdots&\vdots&\vdots&\ddots\\ \end{array}\right] ~~~ (in ~P^n(\mathbb{R})$

Just some random thoughts. I mentioned this to a math professor and he said some stuff had been done on it in the field of functional analysis, but a quick search didn’t show much…

### Fractal Christmas Cards and More

January 4, 2010

For Christmas, I was handing out fractal Christmas Cards (they had images made in gnofract4d with the equation beneath… I gave my mom a handbound book with pictures of fractals made in sage in it since I didn’t get the latest revision of the math textbook done in time to get that). Thus, I made many fractals. At the end, I noticed something.

First I’ll make a (IMHO, reasonable) conjecture:

$\forall n \in \mathbb{R}, n > 2;$ $k \in \{x|x\in \mathbb{C}; \lim_{N\to\infty} (z\to z^n+x)^N(x) \neq \pm \infty\}$

$\implies$

$\{x|x\in \mathbb{C}; \lim_{N\to\infty} (z\to z^n+k)^N(x) \neq \pm \infty\} \in \{\text{connected}\}$

Now, it’s often interesting to look at julia sets when they fracture, thus they make good pictures. And it is easy to find the point of fracture on the positive real number line.

The $(z\to z^n+x)-$orbits of these points exhibit a rather simple behaviour: $z$ converges to a value that satisfies $z=z^n+x$ if it is possible.

So we want to find the maximum value of $z-z^n$ (ie. $M\cdot (z\to z-z^n)^{\to}(\mathbb{R}^+)$ where $M$ is the supreumum).

This is trivial to find: $z|_{\frac{d}{dz}z-z^n=0}=\sqrt[n-1]{\frac{1}{n}}$ and if we plug that into $z-z^n$ we get $\sqrt[n-1]{\frac{1}{n}} -(\sqrt[n-1]{\frac{1}{n}})^n$