Robert Israel

6577 Reputation

21 Badges

18 years, 217 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

I don't know why it seemed to me yesterday that ans worked for R < 0: today it clearly doesn't.  The answer for R < 0 should be
-1/3*(3*exp(-1/3*R)*Pi^(1/2)+R*Pi^(1/2)+3*exp(-1/3*R)*erf(-1/2+1/6*R)*Pi^(1/2)+erf(1/2+1/6*R)*Pi^(1/2)*R+6*exp(-1/36*(3+R)^2)-6*Pi^(1/2))/Pi^(1/2)

(obtained using similar steps, but with the assumption R < 0 instead of R > 0)

Of course, it must be borne in mind that fsolve will only produce one solution.

The first equation describes a circle, which we may parametrize as

x = 3*cos(t), y = 3*sin(t),  for t from 0 to 2*Pi.

Substituting this in to eqn2:

> eqn3 := eval(eqn2, {x = 3*cos(t), y = 3*sin(t)});

eqn3 := 27*cos(t)^3+27*sin(t)^3-sin(9*cos(t)*sin(t)) = 7

Find approximations to all solutions near the real interval [0, 2*Pi]:

> RootFinding[Analytic](eqn3, t = -I/10 .. 2*Pi+I/10);

2.2155246353688, 5.6384569986055

 Substitute these values in to the expressions for x and y.

> solutions := map(t -> [x = 3*cos(t), y = 3*sin(t)], [%]);

solutions := [[x = -1.802943923, y = 2.397789234], [x = 2.397789234, y = -1.802943922]]

 

 

Of course, it must be borne in mind that fsolve will only produce one solution.

The first equation describes a circle, which we may parametrize as

x = 3*cos(t), y = 3*sin(t),  for t from 0 to 2*Pi.

Substituting this in to eqn2:

> eqn3 := eval(eqn2, {x = 3*cos(t), y = 3*sin(t)});

eqn3 := 27*cos(t)^3+27*sin(t)^3-sin(9*cos(t)*sin(t)) = 7

Find approximations to all solutions near the real interval [0, 2*Pi]:

> RootFinding[Analytic](eqn3, t = -I/10 .. 2*Pi+I/10);

2.2155246353688, 5.6384569986055

 Substitute these values in to the expressions for x and y.

> solutions := map(t -> [x = 3*cos(t), y = 3*sin(t)], [%]);

solutions := [[x = -1.802943923, y = 2.397789234], [x = 2.397789234, y = -1.802943922]]

 

 

Terminology is indeed not always standard, but it is pretty common to use "saddle" for a critical point that is not a local max or min, in any number of variables.

While this case is clear from looking at the diagonal elements of the Hessian matrix, I might note that in general you can use IsDefinite in the LinearAlgebra package to check the matrix for positive or negative definiteness.  Or you can use SecondDerivativeTest in Student[MultivariateCalculus].

Terminology is indeed not always standard, but it is pretty common to use "saddle" for a critical point that is not a local max or min, in any number of variables.

While this case is clear from looking at the diagonal elements of the Hessian matrix, I might note that in general you can use IsDefinite in the LinearAlgebra package to check the matrix for positive or negative definiteness.  Or you can use SecondDerivativeTest in Student[MultivariateCalculus].

I should amend that perhaps.  The parser for Maple input (whether Classic or Standard) does not allow

proc(n); local ... 

The parser for 2D input in Standard does allow that, ignoring the semicolon.  I'm not completely sure which of these should be considered "correct", but my vote would be that the semicolon is not correct here.

Now things get a bit weird: I tried 2D input in Classic.  When I pressed Enter it changed

proc(x); local y; x+y end proc;

to

proc(x) _local(y); x+y end proc;

without any output.  I pressed Enter again and got an error:

Error, unexpected local declaration in procedure body
 

Why does one part of the parser produce this _local(y)  if another part is going to disallow it?

I should amend that perhaps.  The parser for Maple input (whether Classic or Standard) does not allow

proc(n); local ... 

The parser for 2D input in Standard does allow that, ignoring the semicolon.  I'm not completely sure which of these should be considered "correct", but my vote would be that the semicolon is not correct here.

Now things get a bit weird: I tried 2D input in Classic.  When I pressed Enter it changed

proc(x); local y; x+y end proc;

to

proc(x) _local(y); x+y end proc;

without any output.  I pressed Enter again and got an error:

Error, unexpected local declaration in procedure body
 

Why does one part of the parser produce this _local(y)  if another part is going to disallow it?

Just to clarify: Maple is not correcting any syntax errors here.  It is simply a matter of how Maple parses a (syntactically correct) procedure definition and then pretty-prints the result of that parsing.  Thus fi and od are treated as synonyms for end if and end do, while an unnecessary ; or ; has no effect.  There is also some automatic simplification of expressions, e.g. x + 0 in a procedure definition becomes x.

Just to clarify: Maple is not correcting any syntax errors here.  It is simply a matter of how Maple parses a (syntactically correct) procedure definition and then pretty-prints the result of that parsing.  Thus fi and od are treated as synonyms for end if and end do, while an unnecessary ; or ; has no effect.  There is also some automatic simplification of expressions, e.g. x + 0 in a procedure definition becomes x.

It showed up just now when I tried "Check for Updates". (under Windows Vista).

I did post the complete solution (at least, the unique solution among functions y such that y and y' are exponentially bounded):

y(t) = 25*sqrt(6)*sin(sqrt(6)*t)*(1/18)+5*t*(1/3)+(1/6)*y(0)*(1+5*cos(sqrt(6)*t))

I did post the complete solution (at least, the unique solution among functions y such that y and y' are exponentially bounded):

y(t) = 25*sqrt(6)*sin(sqrt(6)*t)*(1/18)+5*t*(1/3)+(1/6)*y(0)*(1+5*cos(sqrt(6)*t))

Logically it ought to be possible to use something like

Distribution(ProbabilityFunction=(t -> piecewise(t=0, 1/2, t = 7, 1/2, 0)));

but that doesn't work.  I'm submitting an SCR for this.

Logically it ought to be possible to use something like

Distribution(ProbabilityFunction=(t -> piecewise(t=0, 1/2, t = 7, 1/2, 0)));

but that doesn't work.  I'm submitting an SCR for this.

It's not backwards compatibility.  D is the derivative operator.  We recently discussed this very point:

www.mapleprimes.com/forum/derivativematrix

First 104 105 106 107 108 109 110 Last Page 106 of 187