Robert Israel

6577 Reputation

21 Badges

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

MaplePrimes Activity


These are replies submitted by Robert Israel

@The_Rubberduck :

plot(1, x = 0 .. 2*Pi, filled = true, colour=cyan) fills the region between y=0 and y=1 for x=0 to 2*Pi with cyan: actually it produces a POLYGONS object in the PATCHNOGRID style with 200 points on y=1 (with x going from 0 to 2*Pi) and then 200 points on y=0 (with x going back from 2*Pi to 0).

plottools[transform]((v,u) -> [(1+u)*cos(v), (1+u)*sin(v)]) produces a procedure that makes a change of coordinates in 2-dimensional plot structures: acting on the POLYGONS object from the plot command, it produces a new POLYGONS object where each point has been transformed.  Thus the new object has points [2*cos(v),2*sin(v)] for v from 0 to 2*Pi and then [cos(v), sin(v)] for v from 2*Pi to 0.  Rendered in the PATCHNOGRID style, this produces the region you want.

plots[display](..., labels = [x,y]) adds the coordinate labels x and y on the axes.

@The_Rubberduck :

plot(1, x = 0 .. 2*Pi, filled = true, colour=cyan) fills the region between y=0 and y=1 for x=0 to 2*Pi with cyan: actually it produces a POLYGONS object in the PATCHNOGRID style with 200 points on y=1 (with x going from 0 to 2*Pi) and then 200 points on y=0 (with x going back from 2*Pi to 0).

plottools[transform]((v,u) -> [(1+u)*cos(v), (1+u)*sin(v)]) produces a procedure that makes a change of coordinates in 2-dimensional plot structures: acting on the POLYGONS object from the plot command, it produces a new POLYGONS object where each point has been transformed.  Thus the new object has points [2*cos(v),2*sin(v)] for v from 0 to 2*Pi and then [cos(v), sin(v)] for v from 2*Pi to 0.  Rendered in the PATCHNOGRID style, this produces the region you want.

plots[display](..., labels = [x,y]) adds the coordinate labels x and y on the axes.

@Msolares : there seem to be two bugs at work here.

1) The 2-D math parser can't handle a use statement that contains an indexed entry such as Maplets[Tools].  Work-around is easy: use 1-D Maple input, not 2-D.  Or you could use Maplets:-Tools rather than Maplets[Tools].

2) The MathMLEditor can't handle keyboard input (which makes it pretty much useless).  This is a regression bug - it worked in Maple 13.

I've submitted SCR's.

@Msolares : there seem to be two bugs at work here.

1) The 2-D math parser can't handle a use statement that contains an indexed entry such as Maplets[Tools].  Work-around is easy: use 1-D Maple input, not 2-D.  Or you could use Maplets:-Tools rather than Maplets[Tools].

2) The MathMLEditor can't handle keyboard input (which makes it pretty much useless).  This is a regression bug - it worked in Maple 13.

I've submitted SCR's.

@Msolares It's hard to tell what's going wrong from the Word document, which just contains a picture.  Why not upload a worksheet instead?
Use the green up-arrow button, upload the file, and choose "Insert link".  Here's my worksheet.

graphing.mw

@Msolares It's hard to tell what's going wrong from the Word document, which just contains a picture.  Why not upload a worksheet instead?
Use the green up-arrow button, upload the file, and choose "Insert link".  Here's my worksheet.

graphing.mw

@acer : Yes, I've tried posting 2D Math on a few occasions, but generally found the results poor, so lately I've pretty much given up on it. 

@Widdershins : No, as I said, the system is underdetermined.  The solution really does depend on an arbitrary function.
There's no possibility of making the solutions unique unless you supply more constraints, e.g. another differential equation that isn't a consequence of the original ones.

@Widdershins : No, as I said, the system is underdetermined.  The solution really does depend on an arbitrary function.
There's no possibility of making the solutions unique unless you supply more constraints, e.g. another differential equation that isn't a consequence of the original ones.

The first problem is that you have both p and P.  Remember that Maple is case-sensitive.  However, after replacing P by p I  still don't get a solution.   In most cases the symbolic version of pdsolve doesn't find solutions with boundary conditions.  In this case I think you need to express the solutions using series: there probably are no "closed-form" solutions.  You can use pdsolve to help you find the basic solutions you use to build the series.   In this case, note that the pde is homogeneous and linear, and that p(r,L) = constant are solutions.  Thus (assuming pmo and Pmo are the same) your solution should be

p(r,L) = pmo + (pt - pmo)*q(r,L)

where q(r,L) satisfies the same pde with boundary conditions q(-R,L) = q(R,L) = 0, q(r,0) = 1, q(r,1) = 0.

The solution to the pde without boundary conditions is

p(r,L) = _C1*BesselJ(0,(-_c[1])^(1/2)*r)*_C3*exp(-1/2/eta*L*R)*exp(1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))+_C1*BesselJ(0,(-_c[1])^(1/2)*r)*_C4*exp(-1/2/eta*L*R)*exp(-1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))+_C2*BesselY(0,(-_c[1])^(1/2)*r)*_C3*exp(-1/2/eta*L*R)*exp(1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))+_C2*BesselY(0,(-_c[1])^(1/2)*r)*_C4*exp(-1/2/eta*L*R)*exp(-1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))

However, BesselY(0, t) is singular at t=0, so to have a solution with good behaviour as r -> 0 you need _C2 = 0.  Note by the way that BesselJ(0,t) is an even function, so you'll automatically get p(-R,L) = p(R,L).  To make these 0, you want sqrt(-_c[1])*R to be one of the zeros of BesselJ(0,t).  The n'th zero is denoted by Maple as BesselJZeros(0,n).  And then
_C3 and _C4 are adjusted to get p(r,1) = 0.  The result is, for each positive integer n, a solution with p(-R,L) = p(R,L) = 0 and p(r,1) = 0. 

 

The first problem is that you have both p and P.  Remember that Maple is case-sensitive.  However, after replacing P by p I  still don't get a solution.   In most cases the symbolic version of pdsolve doesn't find solutions with boundary conditions.  In this case I think you need to express the solutions using series: there probably are no "closed-form" solutions.  You can use pdsolve to help you find the basic solutions you use to build the series.   In this case, note that the pde is homogeneous and linear, and that p(r,L) = constant are solutions.  Thus (assuming pmo and Pmo are the same) your solution should be

p(r,L) = pmo + (pt - pmo)*q(r,L)

where q(r,L) satisfies the same pde with boundary conditions q(-R,L) = q(R,L) = 0, q(r,0) = 1, q(r,1) = 0.

The solution to the pde without boundary conditions is

p(r,L) = _C1*BesselJ(0,(-_c[1])^(1/2)*r)*_C3*exp(-1/2/eta*L*R)*exp(1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))+_C1*BesselJ(0,(-_c[1])^(1/2)*r)*_C4*exp(-1/2/eta*L*R)*exp(-1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))+_C2*BesselY(0,(-_c[1])^(1/2)*r)*_C3*exp(-1/2/eta*L*R)*exp(1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))+_C2*BesselY(0,(-_c[1])^(1/2)*r)*_C4*exp(-1/2/eta*L*R)*exp(-1/2*1/eta*L*(R^2-4*eta^2*_c[1])^(1/2))

However, BesselY(0, t) is singular at t=0, so to have a solution with good behaviour as r -> 0 you need _C2 = 0.  Note by the way that BesselJ(0,t) is an even function, so you'll automatically get p(-R,L) = p(R,L).  To make these 0, you want sqrt(-_c[1])*R to be one of the zeros of BesselJ(0,t).  The n'th zero is denoted by Maple as BesselJZeros(0,n).  And then
_C3 and _C4 are adjusted to get p(r,1) = 0.  The result is, for each positive integer n, a solution with p(-R,L) = p(R,L) = 0 and p(r,1) = 0. 

 

@Will : It's not a slow-connection problem.  I'm seeing the wrong images entirely.  For example, the first one is

but it should be a plot.  The images shown have nothing to do with any of the messages in the thread, as far as I can see.

@Alejandro Jakubi : As I said, "not just distinct but not collinear."

 

> AreCollinear(A,B,C,cond);

                                 FAIL

> cond;

  ((h~ g - h~ c - a~ g - j e~ + j a~ + c e~ = 0) &and

        (i e~ - i a~ - b e~ - h~ f + h~ b + a~ f = 0)) &and

        (j f - j b - c f - i g + i c + b g = 0)

> additionally(h*g-h*c-a*g-j*e+j*a+c*e <> 0);
> AreCollinear(A,B,C);

                                false

> plane(p1,[A,B,C]);

                                  p1

@Alejandro Jakubi : As I said, "not just distinct but not collinear."

 

> AreCollinear(A,B,C,cond);

                                 FAIL

> cond;

  ((h~ g - h~ c - a~ g - j e~ + j a~ + c e~ = 0) &and

        (i e~ - i a~ - b e~ - h~ f + h~ b + a~ f = 0)) &and

        (j f - j b - c f - i g + i c + b g = 0)

> additionally(h*g-h*c-a*g-j*e+j*a+c*e <> 0);
> AreCollinear(A,B,C);

                                false

> plane(p1,[A,B,C]);

                                  p1

@John May : Not all the details, but here's a rough approximation of some of the features.

> with(plots): with(plottools):
C[1]:= 1;
C[2]:= t -> 0.95 + 0.05*sin(3*t);
C[3]:= t -> 0.91 + 0.05*sin(3*t);
C[4]:= t -> 0.87 + 0.05*sin(3*t);
C[5]:= t -> 0.65 + 0.042*sin(3*t);
C[6]:= t -> 0.5 + 0.037*sin(3*t);
ts:= [seq(i*2*Pi/50, i=0..50)]:
A:= [seq([seq([[C[k](ts[i-1]),ts[i-1]],[C[k](ts[i]),ts[i]],
[C[k+1](ts[i]),ts[i]],[C[k+1](ts[i-1]),ts[i-1]]],i=2..51)],k=1..6)]:
B:= map(a->map(p -> map(t -> [sin(0.8*t[1])*cos(t[2]),sin(0.8*t[1])*sin(t[2]),cos(0.8*t[1])],
p), a),A):
S:= sphere([0,0,0],0.99, colour=wheat, style=patchnogrid):
P:=display(polygonplot3d(B[1],colour=black), polygonplot3d(B[3],colour=gold, style=patchnogrid),
polygonplot3d(B[4],colour=black,style=patchnogrid),
polygonplot3d(B[5],colour=black,style=patchnogrid)):
display(P,seq(plottools[rotate](P,arccos(-1/3),0,k*2*Pi/3),k=0..2),
S,scaling=constrained);


First 25 26 27 28 29 30 31 Last Page 27 of 187