Robert Israel

6492 Reputation

21 Badges

16 years, 148 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity

These are answers submitted by Robert Israel

The code is all available, starting with `evalf/EllipticE` and `evalf/EllipticF`. There are many cases and most of these procedures call other procedures, so there will be a lot of code to translate from a lot of different places. Note also that many of these procedures increase Digits: it's not clear how accurate the results will be if you ignore that and just do everything with Fortran's double-precision.
Actually there is another possibility that might make sense: build up a sequence of cross-sections using intersectplot. For example, using the two equations I used before:
> with(plots):
  e1:= x^2 + y^2 + z^2 + w^2 - 1 =0 ;
  e2:= x*y^2 + y*z^2 + z*w^2 + w*x^2 = 0; 
Alex: the pseudo-random seed has nothing to do with the kind of "randomness" discussed here. But as a matter of fact, the initial state of the PRNG (which is not the variable "Seed", despite the perhaps misleading example in the ?randomize help page) is always the same initially. Thus the first value returned by rand() in Maple 10 or 11 is always 395718860534.
| If Maple routinely uses techniques like non-FTC | approaches to evaluating integrals, there is | some concern in my mind for accurate answers | considering the possibility of software bugs. | Namely if I don't understand what Maple is | doing, I cannot check its results and even worse | if Maple is using some proprietary method, the | user in general will not understand what is | going on and we end up with push a button and | hope technology. 1) The usual way to check a definite integral is to do it numerically. 2) Many of the bugs in Maple's definite integration are caused by using the FTC, not by non-FTC approaches. Typically Maple may find an antiderivative, but this antiderivative is discontinuous at some point in the interval of integration (usually because of crossing a branch cut). It is notoriously difficult to detect and correct for such things in general. |would it be likely that a course on complex |variables as any quality college would cover |non-FTC integration techniques? A typical introductory complex variables course will have a section on evaluating definite integrals using the residue theorem. A typical second complex variables course might have more of these techniques. However, there are lots of other techniques. |Also, what |commonly available book explains non-FTC techniques |in the most understandable manner. You might try e.g. Marsden and Hoffman, "Basic Complex Analysis", sec. 4.3.
If you need to stick with the matrix type, try
map(eval, %);
intersectplot won't help, though, with two equations in four variables. If the equations involve polynomials, you can take the resultant with respect to the variable you want to eliminate. For example, consider the equations
> e1:= x^2 + y^2 + z^2 + w^2 - 1 =0 ;
> e2:= x*y^2 + y*z^2 + z*w^2 + w*x^2 = 0; 
> Res := resultant(lhs(e1),lhs(e2),w);
> plots[implicitplot3d](Res,x=-1..1,y=-1..1,z=-1..1,
If they're not polynomial (and can't be recast in terms of polynomials), it's not so easy.
The simplest way is to use tables. Just delete the lines SFR:=Vector[row](3); Inv:=Vector[row](3); and assign values to SFR[z] and Inv[z] for whatever values of z you want. SFR and Inv will automatically be created as tables. Then if you want to plot, say, the pairs [SFR[z], Inv[z]] for z from 1 to n, you can write plot([seq([SFR[z],Inv[z]],z=1..n)]);
(after your line zin := ...) > Xsi:= -100 + 20*ii; plot([seq(eval(zin,Xs = Xsi), ii = 0 .. 10)], freq = 0 .. 20*10^9, -1000 .. 1000, legend=[seq(Xs=Xsi,ii=0..10)]); Note: 1) I'm specifying a range of -1000 .. 1000 for the vertical axis. 2) I'm using a step of 20 rather than 10, because 21 legends don't fit very well. Actually even 11 legends, though it works in Classic, doesn't seem to work in Standard: only 6 legends are shown although there is room for more (e.g. if you use legendstyle=[location=left]) 3) By default there are only 8 different colours for the curves, though you could get around this by specifying the colour option as a list.
There is indeed a Shift function in StringTools, and also a Rotate. For example: StringTools:-Shift("thequickbrownfox",3) returns "wkhtxlfneurzqir{". Note that the "x" is shifted to the non-alphabetic character "{". If what you want is to wrap around (so a shift of 1 takes a to b, b to c, ..., z to a) then you would probably use CharacterMap. For example: > StringTools:-CharacterMap(cat($"a".."z"), cat($"d".."z",$"a".."c"), "thequickbrownfox"); "wkhtxlfneurzqira"
I'm not sure what you mean by "generate the full expression tree". Perhaps look at the ToInert command? As for the leaves, would indets(..., atomic) be what you're looking for?
Between each pair of roots of J_n we must have at least one root of J_n'. IIRC there is in fact exactly one. So to get the k'th positive zero of J_n', I think the following should work if n >= 1: fsolve(diff(BesselJ(n,x),x), x = BesselJZeros(n,k-1) .. BesselJZeros(n,k)); This has to be modified in the case n=0, but since (J_0)' = -J_1, you can just use BesselJZeros(1,k) for that.
Try this: > with(plots): with(plottools): display(coordplot(cartesian,colour=[brown,cyan]), rotate(coordplot(cartesian), Pi/6), scaling=constrained);
Try ?definition,perfectnumber. All the known perfect numbers are those related to Mersenne primes, so there's really not much point in having a procedure dedicated to them [you're not likely to find an odd perfect number by a simple Maple program]. There is a "mersenne" procedure in the numtheory package.
It has nothing to do with Maplesoft: those happen to be the names of the authors of the paper in which the algorithm was introduced: L. Blum, M. Blum and M. Shub, SIAM J. Computing , 15(2):364-383, May 1986.
If A is your Matrix, this should work: ExportMatrix("c:\\mypath\\myfile.csv", A, target=delimited, delimiter=","); Note that when opening a file in Excel, .csv files are listed under "Text Files".
First 134 135 136 137 138 Page 136 of 138