acer

32363 Reputation

29 Badges

19 years, 332 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Jarekkk It would be nice if Maple could handle this automatically. (Nice work, btw.)

@Jarekkk It would be nice if Maple could handle this automatically. (Nice work, btw.)

Computing the entire derivative function each time you want to call it to compute a value is not a good idea.

acer

Computing the entire derivative function each time you want to call it to compute a value is not a good idea.

acer

@ABond You wrote, "Now maximize f(x,y,t) subject to y(t)."

But what is the predicate involving y(t) in that condition? That is to say, subject to what quality precisely, about candidate y(t)? Subject to y(t) satisfying what requirement? It doesn't mean anything, to specify only "subject to y(t)".

Do you mean, subject to y(t) being any continuous function of t?

@ABond You wrote, "Now maximize f(x,y,t) subject to y(t)."

But what is the predicate involving y(t) in that condition? That is to say, subject to what quality precisely, about candidate y(t)? Subject to y(t) satisfying what requirement? It doesn't mean anything, to specify only "subject to y(t)".

Do you mean, subject to y(t) being any continuous function of t?

In optimal control the issue is often related to finding optimal values of parameters that appear in the functions or formula. Is that not your case? If it is then, sure, the parameters would be the variables over which to optimize, rather than `t`. If it is the very form of `x` and `y` that are to change, then you may need another approach altogether. (genetic programming?)

How do you define your set of functions from which to take each candidate x and y?

acer

In optimal control the issue is often related to finding optimal values of parameters that appear in the functions or formula. Is that not your case? If it is then, sure, the parameters would be the variables over which to optimize, rather than `t`. If it is the very form of `x` and `y` that are to change, then you may need another approach altogether. (genetic programming?)

How do you define your set of functions from which to take each candidate x and y?

acer

@Joe Riel Yes, but it was on purpose. There is some boilerplate at the bottom of the cited Application worksheet that indicates that the copyright is owned by the author, etc, etc. So I didn't want to reproduce it.

My upload is thus triavially short and nothing special at all. I just figured that I ought to show the simple code that I'd mentioned, as it lives inside my Slider component.

I should also add that I don't really want to get rid of old style animations. They have to be supported for legacy reasons, naturally. And some plots' individual frames will always be slow to produce, so there'll still be a sensible need to produce frames in advance, sometimes. I just think that, a high proportion of the time, generating all frames in advance might not be necessary and costs far too much with the current bloat.

@Joe Riel Yes, but it was on purpose. There is some boilerplate at the bottom of the cited Application worksheet that indicates that the copyright is owned by the author, etc, etc. So I didn't want to reproduce it.

My upload is thus triavially short and nothing special at all. I just figured that I ought to show the simple code that I'd mentioned, as it lives inside my Slider component.

I should also add that I don't really want to get rid of old style animations. They have to be supported for legacy reasons, naturally. And some plots' individual frames will always be slow to produce, so there'll still be a sensible need to produce frames in advance, sometimes. I just think that, a high proportion of the time, generating all frames in advance might not be necessary and costs far too much with the current bloat.

@toandhsp 

x < -(3/4)*3^(1/3)-(1/2)*3^(2/3)-9/4 or -1/3 < x

@toandhsp 

x < -(3/4)*3^(1/3)-(1/2)*3^(2/3)-9/4 or -1/3 < x

OrProp(A,B); # A union B

                              real

AndProp(A,B);# A intersect B

                        RealRange(-2, 5)

AndProp(A,Non(B)); # A minus B (how to improve?)

      AndProp(Non(RealRange(-infinity, 5)), RealRange(-2, infinity))

That last one is a little disappointing. Using it (temporarily) as a relation,

H:=convert(AndProp(x::A,Non(x::B)),relation); # A minus B

      And(-2 <= x, x <= infinity, Not(And(-infinity <= x, x <= 5)))

solve(H,x);

                    RealRange(Open(5), infinity)

solve(H,{x});

                       {x <= infinity, 5 < x}

acer

OrProp(A,B); # A union B

                              real

AndProp(A,B);# A intersect B

                        RealRange(-2, 5)

AndProp(A,Non(B)); # A minus B (how to improve?)

      AndProp(Non(RealRange(-infinity, 5)), RealRange(-2, infinity))

That last one is a little disappointing. Using it (temporarily) as a relation,

H:=convert(AndProp(x::A,Non(x::B)),relation); # A minus B

      And(-2 <= x, x <= infinity, Not(And(-infinity <= x, x <= 5)))

solve(H,x);

                    RealRange(Open(5), infinity)

solve(H,{x});

                       {x <= infinity, 5 < x}

acer

s1 := solve(x^2+3*x+2 > 0, {x});
                       {x < -2}, {-1 < x}

s2 := solve(x^2-9 >= 0, {x});
                      {x <= -3}, {3 <= x}

s3:=`or`(seq(`and`(op(x)),x in [s1]));
                        x < -2 or -1 < x

s4:= `or`(seq(`and`(op(x)),x in [s2]));
                       x <= -3 or 3 <= x

solve({ s3 and not s4 });
               {-1 < x, x < 3}, {-3 < x, x < -2}

acer

First 411 412 413 414 415 416 417 Last Page 413 of 592