vv

13805 Reputation

20 Badges

9 years, 309 days

MaplePrimes Activity


These are replies submitted by vv

restart;
A:=[1,0]: B:=[1/3, 2]:
K:= 1/(s-1)/(t-1): U:=s*~A: V:=t*~B:
ell := (4*xi^2*~U+K*~V ) /~ (4*xi^2+4*xi+K):
Explore(plot([ [[0,0],A,B,[0,0]], [ell[], xi=-infinity..infinity]]),s=0.0 .. 1, t=0.0..1);


 

This reminds me of the simplest bijection f : N^2 --> N.
f(n,k) = 2^(k-1) * (2*n-1).

 

@dharr 

Nice, but unfortunately for n=4 the  reduction is almost the same and n>4 is out of the question.
Also, rhe diagonal dominance could just eliminate a "few" nonsingular matrices.

@dharr 

It is possible a reduction by a factor of n!*n.
I was curious about a compiled version. I have used a custom "nextperm" and "det" and the runtime was 0.015 sec for n=3.

But it is not very useful. Trying n=4, the estimated runtime is about a week!!! Without compilation it would be years!
It would be interestiong a theoretical approach, but I have no idea about that.
 

 

@janhardo 

If you cannot find the book, you can at least download (from the author's site) and work the exercises and their solutions. They are for Maple 8 but are valid for Maple 2020 too.

@janhardo 

The age of a book is not always an issue. For example, Heck's book, https://staff.fnwi.uva.nl/a.j.p.heck/Maplebook/
is excellent after almost 20 years. Almost all the code still works.
I recommend it (but it contains more advanced material; of course, newer topics are not covered). It has many examples with full solutions.

@mmcdara 

In simpler words, if f(...) is an unevaluated function:
[1]. diff(f(u), x)  is computed in Maple by calling  `diff/f`(u, x),
provided that the procedure `diff/f`  is defined.
[2]. If f is indexed i.e. diff(f[i](u), x)  is to be computed, then inside the procedure
`diff/f`, i is retrived as op(procname).
 
[1] is documented, [2] was a guess as Carl said.

@ecterrab 

My point was just that debugging is more difficult than it used to be long time ago. I know that the regular commands are documented. I was referring to some implementation notes to be used by advanced users and the fact that part of the general Maple functionality is now located in the Physics package.

@gawati2611 

In this case you can simply plot  Re(z)>0, |z| > 1.
But note that inequal also accepts boolean operators, such that the region can be as complicated as you want (see the help pages).

@Preben Alsholm 

Nice catch! I remember that long time ago, such bugs were much easier to detect. Now, there are Maple fundamental functions which are implemented in a strange and undocumented manner. Of course, most of these functions are not designed to be used directly by the user, but it would be nice to know something about them. For example, some of such functions (including a part of the assume facility)  are in the Physics package, where almost everything is redefined.

@mmcdara 

restart

The parametrization of the intersection, including the ranges, is contained in the result of solve (see below).
It can be extracted programatically, but I did not have the patience to do it in general.

with(plots):

cylx := y^2 + z^2 - 1:

cylz := x^2 + (y+1)^2 - 1/2:

cyl:=implicitplot3d([cylx,cylz], x=-2..2, y=-2..2, z=-2..2,
scaling=constrained, style=surface, grid=[40, 40, 40], labels=[x, y, z], color=blue, transparency=0.5):
display(cyl):

opt:=thickness=4, scaling=constrained, style=surface:

s:=solve([cylx,cylz, x^2>=0,y^2>=0,z^2>=0],[x,y,z], explicit);
 

[[x = -(1/2)*2^(1/2), y = -1, z = 0], [x < 0, -(1/2)*2^(1/2) < x, y = -1+(1/2)*(-4*x^2+2)^(1/2), z = -(1/2)*(4*x^2-2+4*(-4*x^2+2)^(1/2))^(1/2)], [x < 0, -(1/2)*2^(1/2) < x, y = -1+(1/2)*(-4*x^2+2)^(1/2), z = (1/2)*(4*x^2-2+4*(-4*x^2+2)^(1/2))^(1/2)], [x = 0, y = -1+(1/2)*2^(1/2), z = -(1/2)*(-2+4*2^(1/2))^(1/2)], [x = 0, y = -1+(1/2)*2^(1/2), z = (1/2)*(-2+4*2^(1/2))^(1/2)], [x < (1/2)*2^(1/2), 0 < x, y = -1+(1/2)*(-4*x^2+2)^(1/2), z = -(1/2)*(4*x^2-2+4*(-4*x^2+2)^(1/2))^(1/2)], [x < (1/2)*2^(1/2), 0 < x, y = -1+(1/2)*(-4*x^2+2)^(1/2), z = (1/2)*(4*x^2-2+4*(-4*x^2+2)^(1/2))^(1/2)], [x = (1/2)*2^(1/2), y = -1, z = 0]]

(1)

s2:=tubeplot([x,-1 + sqrt(-4*x^2 + 2)/2, -sqrt(4*x^2 - 2 + 4*sqrt(-4*x^2 + 2))/2], x=-sqrt(2)/2..0, radius=0.05, opt, color=red):
s3:=tubeplot([x,-1 + sqrt(-4*x^2 + 2)/2, sqrt(4*x^2 - 2 + 4*sqrt(-4*x^2 + 2))/2], x=-sqrt(2)/2..0, radius=0.05, opt, color=red):

s6:=tubeplot([x, -1 + sqrt(-4*x^2 + 2)/2,-sqrt(4*x^2 - 2 + 4*sqrt(-4*x^2 + 2))/2], x=0..sqrt(2)/2,radius=0.05, opt, color=red):
s7:=tubeplot([x, -1 + sqrt(-4*x^2 + 2)/2,sqrt(4*x^2 - 2 + 4*sqrt(-4*x^2 + 2))/2], x=0..sqrt(2)/2,radius=0.05, opt, color=red):

display(cyl, s2,s3,s6,s7);

 

 

 

@janhardo It is difficult to learn Maple when the examples involve unknown maths methods.
To be efficient, I suggest to solve first those problems for which the maths is clear for you. After that, your Maple knowledge will be good enough to approch other problems. Keep in mind that when solving a math problem in Maple (for which a direct command does not exist)  you will have to know/read/review the existing methods (or maybe to invent or rediscover them!) .

 

@janhardo 

You should approach such problems only if you know the mathematical aspects.
In this case: geometry and linear algebra, see

@Danial If you are interested in the exact solution, you could rewrite (by hand) the inequality as a system of polynomial inequalities and then call solve or SemiAlgebraic. Unfortunalely Maple is not able to do this automatically.

P.S. In general it is is not possible to visualize inequalities in 3D. Try e.g. 
(x^2+y^2+z^2-1)*(x^2+y^2+z^2-2)<=0.
 

@rameen hamood 

It is easy to write it by hand (which I suppose you should do). Or, execute

LinearAlgebra:-GenerateMatrix([x1+6*x2, -2*x2, -4*x1+2*x2], [x1,x2]);

and select the matrix.
 

First 43 44 45 46 47 48 49 Last Page 45 of 176