Alex Smith

630 Reputation

11 Badges

20 years, 109 days

MaplePrimes Activity


These are replies submitted by Alex Smith

@tomleslie The problem is that Maple should return the exact symbolic value 910*Pi^7/(2187*sqrt(3)).

@tomleslie 

Thanks for your advise, but I just stick with Maple Classic so that I don't have to be frustrated by this madness.

But I think this might be what is leading to the OP's issue. It's a issue that comes up frequently.

Perhaps the question relates to why copy/paste frequently converts useful syntax to nonsense. For example, diff ends up as &DifferentialD. 

This is a fatally frustrating aspect of a system that has different parsers.

It seems like the low fuss way to do this would be to use old-school thinking:

Use exp(45*Pi/180) instead of exp(convert(45 degree,radians)), etc. Of course any engineering student should know this conversion factor. If they don't, then they should not be using a CAS.

@Kitonum 

This is very helpful. Here is a followup. I take your integrals and instead enter them in inert forms:

A:=Int(2*x+2*y+2*z, [z=-sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1, y=-sqrt(-x^2+4) .. sqrt(-x^2+4), x=-2..2]);

 

 

B:=Int(Int(Int(2*x+2*y+2*z, z=-sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1), y=-sqrt(-x^2+4) .. sqrt(-x^2+4)), x=-2..2);

 

 

On the screen you should observe that these look identical (am I missing something?) but when you evaluate them you find that they have different values.

value(A),value(B);

 


 However when I copy the blue output of A to a prompt and the blue output of B to a prompt [note I am using Classic so I have red input, blue output, and can easily copy/paste], you find that the value A has changed to the incorrect negative value:

 

AA:=Int(Int(Int(2*x+2*y+2*z,z = -1/2*(-x^2-y^2+4)^(1/2)+1 .. 1/2*(-x^2-y^2+4)^(1/2)+1),y = -(-x^2+4)^(1/2) .. (-x^2+4)^(1/2)),x = -2 .. 2);#By copy/paste of blue output for A

 

 

 

 BB:=Int(Int(Int(2*x+2*y+2*z,z = -1/2*(-x^2-y^2+4)^(1/2)+1 .. 1/2*(-x^2-y^2+4)^(1/2)+1),y = -(-x^2+4)^(1/2) .. (-x^2+4)^(1/2)),x = -2 .. 2); #By copy/paste of blue output for B

 

 

 Again, the blue outputs look identical to me, and now they have the same (incorrect) values:

 value(AA) ,value(BB) ;

 

 

@Carl Love 



Carl--the wikipedia page
 
 http://en.m.wikipedia.org/wiki/Line_integral
 
states that a line integral is often called a path integral, and that the line integral of a scalar function is independent of the parameterization. I think of this gadget as the integral of the scalar function over C with respect to scalar arc length, hence it does not depend on orientation. 

My hunch is the phrase "path integral" has fallen out of vogue in undergraduate vector calculus terminology because of competition with the high-level notion stemming from path integrals in quantum mechanics (Feynman, etc.) So I am kind of surprised to see that VectorCalculus uses PathInt for the line integral of a scalar function.

But no--I do not think any of this has bearing on the problem brought forth by the OP. It looks like a bad bug to me. The first three integrals seem to violate basic additivity of a triple integral. 
 
When I use Maple for these sorts of integrals I will not use VectorCalculus. It seems best practice to use the standard construction Int(Int(Int(f(x,y,z)... instead of the Region thing. This way one does not have to guess at what is being done.

@Carl Love 

There is not uniform agreement on what is meant by a "path integral" versus a "line integral" of a scalar-valued function over a curve. Many (most?) authors make a definition in which the value is independent of the orientation of the curve. Thus I do not think this is necessarily a bug in Maple.  What irks me is the Maple help page for PathInt because it is does not make not clear what convention is being used.

@Alejandro Jakubi  (and others)

Implied domains can get tricky. For example, look at this:

f:=x->1/(x^2+1);

A:=Matrix([[1,1],[1,1]]);

f(A);

 

So the matrix A, although it is not a complex number,
has every right to think it is in the domain of f.

If Maple had an oracle to analyze domains, how would it know that I was thinking of 2x2 matrices,
and not real or complex numbers? Should I expect the oracle domain to describe to me
all 2x2 matrices X for which det(X^2+1) is not 0?

What about strings? Are they in the domain of f?

f(foobar);

 

 

@Alejandro Jakubi Agreed--an option to automate labeling should exist

I think other systems do a good job. In Mathematica, the option is simply ContourLabels -> All.

In Matlab one simply uses clabel.

Israel's Maple Advisor Database had/has labelledcontourplot.

I have often had this problem. What works for me is to paste the Maple text into a text editor (I use Winedt when using Windows) and then paste from there to Mapleprimes.

@John Fredsted 

Maple should really return

Re(a||i||j + I*b||i||i) 

for diagonal entries.

@Carl Love On my screen, [-90,0] put the x-axis at the top instead of the bottom, which some prefer or expect. [-90,1] fixed that.

I have always liked an often overlooked approach that uses plot3d. It's more efficient that implicitplot.

plot3d([x,y,0],x=0..1,y=0..1-x,axes=boxed,labels=[x,y,z],style=patchnogrid,orientation=[-90,1]);

 

If you try this:

t:=1/6;

int(     (  1+(a*x)^t  )^(-1/t)      , x=0..z);

then Maple gets lots and returns nothing.

But

int(     (  1+(a*z)^t  )^(-1/t)      , z);

quickly returns an nice solution involving ln and the parameter a.

Of course the nicety of the solution is due to the special  form of t, but the oddity is the difference in how Maple is processing two forms of the integral, which are essentially equivalent!

If you try this:

t:=1/6;

int(     (  1+(a*x)^t  )^(-1/t)      , x=0..z);

then Maple gets lots and returns nothing.

But

int(     (  1+(a*z)^t  )^(-1/t)      , z);

quickly returns an nice solution involving ln and the parameter a.

Of course the nicety of the solution is due to the special  form of t, but the oddity is the difference in how Maple is processing two forms of the integral, which are essentially equivalent!

1 2 3 4 5 6 7 Last Page 1 of 18