ODE notation considered harmful

Whenever I want to learn a new subject, I announce a graduate course in it, since the best way to learn is by teaching. But even better than teaching humans is teaching computers, i.e. program! Since computers will not let you wave your hands and wing it.

Doron Zeilberger (1999)

Suppose that we are given an n-dimensional first-order vector ordinary differential equation (ODE)

\dot{x} = f (x)

where f : \mathbb{R}^n \to \mathbb{R}^n is a vector field. A solution of this ODE is a function x : \mathbb{R} \to \mathbb{R}^n whose first derivative, \dot{x}, is equal to f (x). Elementary, my dear Watson!

Despite the fact that the notation \dot{x} = f (x) is rather pervasive, it is dangerous, in my humble opinion. One should keep in mind that such notation is an abbreviation. How could it not be an abbreviation? Note that x is a function, and that the argument of f is a vector in \mathbb{R}^n, not a function! In other words, writing f (x) results in a type error, and a compiler / interpreter with type checking would never accept the declaration \dot{x} = f (x). We, fallible humans, accept it because we know (do we?) that it is an abbreviation, and because it is tradition. Who are we to challenge a centuries-old tradition?

If \dot{x} = f (x) is an abbreviation, what exactly is it an abbreviation for? It is an abbreviation for the following

\dot{x} (t) = f ( x (t) )

where the = symbol denotes equality of vectors. Note that the argument of f is the vector x (t) (i.e., function x evaluated at t), not the function x. But, what does the equation above say? It says the following:

Proposition: Given a vector field f : \mathbb{R}^n \to \mathbb{R}^n, there exists a function x : \mathbb{R} \to \mathbb{R}^n, whose first derivative is \dot{x} : \mathbb{R} \to \mathbb{R}^n, such that for every t \in \mathbb{R} we have that \dot{x} (t) = f ( x (t) ).

This proposition may be true or false. Not all differential equations have solutions, after all, which is why the study of existence of solutions is (was?) an active area of research. Note the presence of the words “for every” in the proposition above. Do you see any universal quantifier, \forall, anywhere? You do not, and that is due to the fact that \dot{x} (t) = f ( x (t) ) is also an abbreviation! The universal quantifier is implicit. If we make it explicit, we obtain

\forall t \left( \dot{x} (t) = f ( x (t) ) \right)

where t ranges over \mathbb{R}. The universally quantified formula above is the conjunction of infinitely many equations. However, do note that the words “there exists” also appear in the proposition, which suggests that an existential quantifier is missing. Therefore, the non-abbreviated notation would be as follows

\exists x \, \forall t \left( \dot{x} (t) = f ( x (t) ) \right)

where x ranges over the set of all (continuous?) functions from \mathbb{R} to \mathbb{R}^n, and t ranges over \mathbb{R}.

__________

A better notation

So far, I have criticized the abbreviated notation for differential equations. I consider it harmful, as confusing a function x with its evaluation x(t) is an atrocious crime against types. To make this post more “constructive”, I will take the liberty of proposing a better notation.

We start by noting that f ( x (t) ) can be written in the form (f \circ x) (t), where the symbol \circ denotes function composition. We now introduce a differential operator D, which maps functions to functions, so that we obtain the first derivative of function x via \dot{x} = D (x). Hence, \dot{x} (t) = (D (x)) (t), which allows us to rewrite \forall t \left( \dot{x} (t) = f ( x (t) ) \right) in the following form

\forall t \left( (D(x)) (t) = (f \circ x) (t) \right)

where t ranges over \mathbb{R}. The universally quantified formula above states that functions D(x) and f \circ x, both of which from \mathbb{R} to \mathbb{R}^n evaluate to the same values for all possible choices of the input t, i.e., functions D(x) and f \circ x are equal. The formula above can thus be rewritten more compactly as D(x) = f \circ x.

Finally, we conclude that \exists x \, \forall t \left( \dot{x} (t) = f ( x (t) ) \right) is equivalent to the following existentially quantified formula

\exists x \left( D(x) = f \circ x \right)

where the = symbol denotes equality of functions. This new notation may not be as compact as \dot{x} = f (x), but at least now the RHS does not result in type error. Criticism would be most welcome.

About these ads

Tags: , , , , ,

6 Responses to “ODE notation considered harmful”

  1. Xah Lee Says:

    Totally agree. I had same gripes. Wrote fair amount about it too.

  2. Akater Says:

    Thanks for the post. Math grammar is a very interesting topic. (Mathematicians, AFAIK, generally don’t think so.)

    However I have some criticism. I think that even the “moderate” use of quantifiers could be almost as harmful as the lousy notation.

    You could (and did) get rid of \forall t by introducing the abstract x in place of x(t). When you have a statement about functions you don’t have to care about their parameters at all. And that is good, because this is one of those abstractions that make math powerful.

    And I think that the \exists quantifier is unnecessary too. Without it, you’d got the equation. It is not a definition, and it is not an assignment. It is just another mathematical object, like a function, or a vector, or a vector field, and it is valuable by itself.

    ODE is not a statement that “something exists”. There could be only a trivial solution to ODE, or no solution at all. The absence of solutions doesn’t necessarily make this particular ODE uninteresting.

    • Rod Carvalho Says:

      Thanks for your constructive comment. I must say that I agree with your criticism. In retrospect, I believe I focused too much on the existence of solutions. Deciding the existence of solutions is merely one interesting problem that arises in the study of ODEs, but it’s not the only one.

      Hence, I could just rewrite the ODE \dot{x} = f (x) in the form D(x) = f \circ x. No quantifiers required. It is not a big change, but at least it type-checks.

      • Akater Says:

        Type-checking is really important. It could be very difficult to understand the author’s reasoning if there’s an unannounced notation abuse, and the material is new to the reader.

        Alas, I’ve seen a lot of experienced people who don’t really see the difference between “function $f$” and “function $f(x)$”. I would even say it’s a bit frightening.

        “$\dot{x} = f(x)$” seems weird whatever meaning one puts into $x$. This $x$ could be a function, but traditional math notation then implies that $f(x)$ is a single vector from a vector field $f$, picked in point $x$. But if $x$ is point, then type-checking for the LHS fails: derivative of a point is meaningless (zero at best).

        The notation “$\dot{x} = f \circ x$” (or “$D(x) = f \circ x$”) looks more consistent from the geometrical point of view, becuse it emphasises that $x\colon \mathbb{R} \to \mathbb{R}^n$ is a curve in the space $\mathbb{R}^n$, and both $f \circ x$ and $\dot{x}$ are curves in the corresponding tangent space $T \mathbb{R}^n$.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 77 other followers

%d bloggers like this: