epostma

1534 Reputation

19 Badges

16 years, 254 days
Maplesoft

Social Networks and Content at Maplesoft.com

Maple Application Center
I am the manager of the Mathematical Software Group, working mostly on the Maple library. I have been working at Maplesoft since 2007, mostly on the Statistics and Units packages and on contract work with industry users. My background is in abstract algebra, in which I completed a PhD at Eindhoven University of Technology. During my studies I was always searching for interesting questions at the crossroads of math and computer science. When I came to Canada in 2007, I had nothing but a work permit, some contacts at Maplesoft (whom I had met at a computer algebra conference a year earlier), and a plan to travel around beautiful Canada for a few months. Since Maplesoft is a company that solves more interesting math and computer science related questions than just about anywhere else, I was quite eager to join them, and after about three months, I could start.

MaplePrimes Activity


These are replies submitted by epostma

Hi john2,

I'm familiar with the notion of kurtosis only for probability distributions (in fact there are two very similar definitions - see the Wikipedia page). In particular, you'd need to have int(f(x), x=-infinity .. infinity) equal to one and all function values nonnegative. I can imagine that you could relax the nonnegativity constraints without problem, and if the integral is finite you could scale the function to make it one, but for your example the result is undefined and even the Cauchy principal value is infinite.

What is the definition of kurtosis for such functions?

Erik Postma
Maplesoft.

@Markiyan Hirnyk : You're right - I made a mistake! Thanks for pointing that out. (I didn't get notification emails for your comments though - only when your second answer was posted...)

There is a mapping going on, from the set you describe in R^4 into "my" cube in R^3, in which the angles do not get preserved. However, the mapping is a nontrivial linear mapping, so parallel faces remain parallel and no new faces get introduced. (In theory some faces could get mapped into the same plane, so faces could be removed.) So for the octahedron, you'd need to have every face of the 3d cube and the two faces of the planes determined by the relation.

I think an argument can be made about the graph structure of vertices and edges of the object before the mapping and after the mapping, which excludes the octahedron. (Probably that is enough - maybe we need the full tripartite incidence graph where vertices, edges, and faces of the solids become vertices of the graph, and two vertices are adjacent if the corresponding objects in the solid are incident with each other.) I'm still working on it. The tetrahedron is wide open, though.

Erik.

@Markiyan Hirnyk : You're right - I made a mistake! Thanks for pointing that out. (I didn't get notification emails for your comments though - only when your second answer was posted...)

There is a mapping going on, from the set you describe in R^4 into "my" cube in R^3, in which the angles do not get preserved. However, the mapping is a nontrivial linear mapping, so parallel faces remain parallel and no new faces get introduced. (In theory some faces could get mapped into the same plane, so faces could be removed.) So for the octahedron, you'd need to have every face of the 3d cube and the two faces of the planes determined by the relation.

I think an argument can be made about the graph structure of vertices and edges of the object before the mapping and after the mapping, which excludes the octahedron. (Probably that is enough - maybe we need the full tripartite incidence graph where vertices, edges, and faces of the solids become vertices of the graph, and two vertices are adjacent if the corresponding objects in the solid are incident with each other.) I'm still working on it. The tetrahedron is wide open, though.

Erik.

@jerbertz : it's called the "member selection" or "scope resolution" operator, and is explained on its help page: ?:-. This particular case uses the version explained in the second bullet point.

Hope this helps,

Erik Postma
Maplesoft.

@jerbertz : it's called the "member selection" or "scope resolution" operator, and is explained on its help page: ?:-. This particular case uses the version explained in the second bullet point.

Hope this helps,

Erik Postma
Maplesoft.

For this case, the result can easily be obtained by evaluating the integral before the assignment to f: then indeed x is gone from f:

f := unapply(int(a*x, x=0..1), a);
int(f(x), x);

returns x^2/4. The difficulty comes when on the one hand you want to already perform the integration, but on the other hand you want to use a recursive definition that is evaluated on the fly.

Hope this helps,

Erik Postma
Maplesoft.

For this case, the result can easily be obtained by evaluating the integral before the assignment to f: then indeed x is gone from f:

f := unapply(int(a*x, x=0..1), a);
int(f(x), x);

returns x^2/4. The difficulty comes when on the one hand you want to already perform the integration, but on the other hand you want to use a recursive definition that is evaluated on the fly.

Hope this helps,

Erik Postma
Maplesoft.

Hi steweb,

I'm not sure what would cause the phenomena you're describing; could you show us the full definition of g that you're using?

Re: your side note. I understand your point, but unfortunately we have to consider how the evaluation proceeds in order to get to a solution. You're correct that function application is not exactly the same as substitution, not in Maple and certainly not mathematically, but it's pretty close to what the Maple kernel does when a function call is evaluated. And if we want to use a computer to do math for us, there's not too much we can change about that. What we can change is which value is substituted in and what that value is substituted into.

If you define f := a -> int(a * x, x = 0 .. 1) then int is not yet called - the call to int is just recorded verbatim in f. Later, if you evaluate f(x), a already has the value x, so int receives the two arguments x^2 and x = 0 .. 1.

What you seem to have in mind is to first evaluate the integral and then evaluate the result at a = x. That process would be easy to do for simple expressions using unapply, but less so for more complicated situations where you want to do the definition recursively. So let's try to get absolutely clear what you want to do first.

Finally about your last question: making x a local in g ensures that there is nothing inside Maple that depends on that particular x, so in this case, once int gets called, its first argument is the product of the local x created for that particular invocation of g and something which cannot contain that x (unless you do your best to break it). x cannot be a local to int: you are passing it into int yourself, whereas local variables are created by Maple at invocation time and are available only from that point onwards.

Hope that helps,

Erik Postma
Maplesoft.

Hi steweb,

I'm not sure what would cause the phenomena you're describing; could you show us the full definition of g that you're using?

Re: your side note. I understand your point, but unfortunately we have to consider how the evaluation proceeds in order to get to a solution. You're correct that function application is not exactly the same as substitution, not in Maple and certainly not mathematically, but it's pretty close to what the Maple kernel does when a function call is evaluated. And if we want to use a computer to do math for us, there's not too much we can change about that. What we can change is which value is substituted in and what that value is substituted into.

If you define f := a -> int(a * x, x = 0 .. 1) then int is not yet called - the call to int is just recorded verbatim in f. Later, if you evaluate f(x), a already has the value x, so int receives the two arguments x^2 and x = 0 .. 1.

What you seem to have in mind is to first evaluate the integral and then evaluate the result at a = x. That process would be easy to do for simple expressions using unapply, but less so for more complicated situations where you want to do the definition recursively. So let's try to get absolutely clear what you want to do first.

Finally about your last question: making x a local in g ensures that there is nothing inside Maple that depends on that particular x, so in this case, once int gets called, its first argument is the product of the local x created for that particular invocation of g and something which cannot contain that x (unless you do your best to break it). x cannot be a local to int: you are passing it into int yourself, whereas local variables are created by Maple at invocation time and are available only from that point onwards.

Hope that helps,

Erik Postma
Maplesoft.

@steweb : seeing your replies now (I had some things distracting me between starting to answer your question and finishing it), why don't you try this:

g:=proc(j)
local x;
  if j=0 then
    y->int(y*x,x=0..1)
  else
    y->int(y*g(j-1)(x),x=0..1)
  end if:
end proc:

Hope this helps,

Erik Postma
Maplesoft.

@steweb : seeing your replies now (I had some things distracting me between starting to answer your question and finishing it), why don't you try this:

g:=proc(j)
local x;
  if j=0 then
    y->int(y*x,x=0..1)
  else
    y->int(y*g(j-1)(x),x=0..1)
  end if:
end proc:

Hope this helps,

Erik Postma
Maplesoft.

For those who want all the gory details, you can find them in the ?using_parameters help page, and also in these pages:

Hope this helps,

Erik Postma
Maplesoft.

For those who want all the gory details, you can find them in the ?using_parameters help page, and also in these pages:

Hope this helps,

Erik Postma
Maplesoft.

I would tweak your (nice) solution a little bit, Joe:

sys := { NULL
, diff(y(t),t) + y(t) = 0
, y(0) = 1
, s(0) = 0
, p(0) = 0.1
}:

integ := dsolve( sys
, 'numeric'
, 'events' = [[y(t)=p(t), [s(t)=t, p(t) = p(t)/10]]]
, 'discrete_variables' = [s(t), p(t)]
);

plots:-odeplot(integ, [t, p(t)], t=0..25, axis[2]=[mode=log]);
plots:-odeplot(integ, [t, s(t)], t=0..25);

This way p(t) holds the next "boundary" to be tested against, and s(t) holds the time at which the last boundary was achieved.

Hope this helps,

Erik Postma
Maplesoft.

I would tweak your (nice) solution a little bit, Joe:

sys := { NULL
, diff(y(t),t) + y(t) = 0
, y(0) = 1
, s(0) = 0
, p(0) = 0.1
}:

integ := dsolve( sys
, 'numeric'
, 'events' = [[y(t)=p(t), [s(t)=t, p(t) = p(t)/10]]]
, 'discrete_variables' = [s(t), p(t)]
);

plots:-odeplot(integ, [t, p(t)], t=0..25, axis[2]=[mode=log]);
plots:-odeplot(integ, [t, s(t)], t=0..25);

This way p(t) holds the next "boundary" to be tested against, and s(t) holds the time at which the last boundary was achieved.

Hope this helps,

Erik Postma
Maplesoft.

5 6 7 8 9 10 11 Last Page 7 of 22