acer

32587 Reputation

29 Badges

20 years, 38 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

It was an educated guess, to choose that assumption. It looked a little like a distribution function, or something similar for which it might be plausible, and I suspected that Maple's int() might have trouble (due to branch issues) handling the 3/2-fractional power otherwise.

Note that `int` (as well as `simplify`) knows something about how to use assumptions. So you may also succeed in one step with,

int(expr,v=0..infinity) assuming m/(Pi*k*T)>0

acer

> p:=t^6+t^3+1:

> P:=subs(t=y^(1/3),p);
                                      2
                                P := y  + y + 1

And so on, taking all three cube roots of the two complex solutions of P=0.

acer

> p:=t^6+t^3+1:

> P:=subs(t=y^(1/3),p);
                                      2
                                P := y  + y + 1

And so on, taking all three cube roots of the two complex solutions of P=0.

acer

Surely by fprime the instructor meant the first derivative of f with respect to x. Ie, D(f0), which you assigned to f1. Sometimes the notation f' is used.

f0:=x->x/(sqrt(x^2 + cos(x-1))):
f1:=D(f0):

Joe's shown you an automated way to repeatedly call fsolve and avoid the roots previously found. It's easier than doing things like the following.

plot(f1,-8..8);
plot(f1,-6..-1);
fsolve('f1'(x),x=-6..-4);
fsolve('f1'(x),x=-2..0);
plot(f1,3..8);
fsolve('f1'(x),x=3..4);
fsolve('f1'(x),x=6..8);

acer

Surely by fprime the instructor meant the first derivative of f with respect to x. Ie, D(f0), which you assigned to f1. Sometimes the notation f' is used.

f0:=x->x/(sqrt(x^2 + cos(x-1))):
f1:=D(f0):

Joe's shown you an automated way to repeatedly call fsolve and avoid the roots previously found. It's easier than doing things like the following.

plot(f1,-8..8);
plot(f1,-6..-1);
fsolve('f1'(x),x=-6..-4);
fsolve('f1'(x),x=-2..0);
plot(f1,3..8);
fsolve('f1'(x),x=3..4);
fsolve('f1'(x),x=6..8);

acer

Robert asked not to solve this. Hopefully I edited out an indefinite solution quickly enough.
acer
Robert asked not to solve this. Hopefully I edited out an indefinite solution quickly enough.
acer

Sorry, Robert.

acer

Sorry, Robert.

acer

Posting the same question in eight or so different forums here on mapleprimes may not endear you.

I posted two examples as a reply in another forum.

acer

Ok, so now there is no internal limit hit on the number of parameters that you pass, which is good. I did not know of a limit on the number of (integer?) parameters in so-called "wrapperless" external calling. Interesting.

The runtime exception that you see now might be something completely different, caused perhaps by any number of things, eg. not passing integers by reference when the C code expects it, calling convention issues (cdecl), something wrong in th code, etc, etc.

I've had generally good experiences with define_external and using the WRAPPER options to produce a C wrapper. I don't think that it's all broken.

But of course runtime exceptions can be hard to diagnose (especially from a distance). If you used the WRAPPER option then there should be a file named something like mwrap_myproc.c on you machine. That might help your diagnosis.

acer

Ok, so now there is no internal limit hit on the number of parameters that you pass, which is good. I did not know of a limit on the number of (integer?) parameters in so-called "wrapperless" external calling. Interesting.

The runtime exception that you see now might be something completely different, caused perhaps by any number of things, eg. not passing integers by reference when the C code expects it, calling convention issues (cdecl), something wrong in th code, etc, etc.

I've had generally good experiences with define_external and using the WRAPPER options to produce a C wrapper. I don't think that it's all broken.

But of course runtime exceptions can be hard to diagnose (especially from a distance). If you used the WRAPPER option then there should be a file named something like mwrap_myproc.c on you machine. That might help your diagnosis.

acer

I thought that Maximize/Minimize passed options through (here, to NLPSolve).

acer

The value x=0.68 returned from Optimization:-Maximize(y,x=0..1) is a local optimum. The graph of y, plot(y, x=0..1), shows that.

y := 3*cos(4*Pi*x-1.3)+5*cos(2*Pi*x+0.5);
plot(y, x=0..1);
Optimization:-Maximize(y,x=0..1,method=branchandbound);
plot(y, x=0..0.1);

acer

These two examples below work for me in Maple 8,

plot(surd(x,3),x=-2..2,thickness=3);
with(plots):
a:=1:
implicitplot(surd(x^2,3)+surd(y^2,3)=a^(2/3),x=-a..a,y=-a..a);

acer

First 550 551 552 553 554 555 556 Last Page 552 of 596