John May

Dr. John May

2891 Reputation

18 Badges

17 years, 136 days
Maplesoft
Pasadena, California, United States

Social Networks and Content at Maplesoft.com

Maple Application Center
I have been a part of the Mathematical Software Group at Maplesoft since 2007. I have a Ph.D in Mathematics from North Carolina State University as well as Masters and Bachelors degrees from the University of Oregon. I have been working on research in computational mathematics since 1997. I currently work on symbolic solvers and visualization as well as other subsystems of Maple.

MaplePrimes Activity


These are replies submitted by John May

Unfortunately, right now, to get all of the solutions you also need the AllSolutions option: solve({y=2*x-5,y=2*x^2+2*x-21},{x,y},Explicit,AllSolutions); {x = -2*2^(1/2), y = -4*2^(1/2)-5}, {x = 2*2^(1/2), y = 4*2^(1/2)-5}
Some of the weirdness seen in int in this thread comes from a subtle issue in the elliptic integrator (and thus it affects a lot of integrals with square-roots of trig functions). Maple is often pretty good at applying the fundamental theorem of calculus to compute definite integrals even in a case when the indefinite integral it returns is discontinuous. For the problem above where f:=2*cos(t)^5*sqrt(2*cos(t)^2-1);a:=-Pi/4; b:=Pi/4; Maple tries a couple different technique. Unfortunately it happens to return the buggy answer:
 int(f,t=a..b): evalf(%);
#                                      0.

 evalf(Int(f,t=a..b));         
#                                  1.735501148
which as I mentioned, comes from an issue with trig substitution in the elliptic integrator:
 `int/definite/elliptic`(f,t,a,b,{});
#                                       0

 `int/definite/ftoc`(f,t,a,b,{}); evalf(%);
#                                      1/2
#                                  25 2    Pi
#                                  ----------
#                                      64
#
#                                  1.735501148
As you can see, there is an internal integrator "ftoc" that gets the right answer. However, "ftoc" it is a lot slower than "elliptic" (1/10s vs. 2s on my machine) and that probably gives you a hint as to why "elliptic" is the first algorithm tried here.
It looks like the reason assuming doesn't work has to do with the fact that the assumptions are being made on symbols that live inside the function and so assuming can't "see" them. If you do: R:=rho(lambda); int(R, lambda = 0 .. infinity) assuming h>0, c>0, T>0, k>0; Everything works dandy. This also works RHO:=(c,k,h,T,lambda)->8*Pi*h*c/(lambda^5*(exp(h*c/(lambda*k*T))-1)); int(RHO(c,k,h,T,lambda), lambda = 0..infinity) assuming h>0, c>0, T>0, k>0; I am not certain whether this is a bug or a feature of assuming.
It looks like the reason assuming doesn't work has to do with the fact that the assumptions are being made on symbols that live inside the function and so assuming can't "see" them. If you do: R:=rho(lambda); int(R, lambda = 0 .. infinity) assuming h>0, c>0, T>0, k>0; Everything works dandy. This also works RHO:=(c,k,h,T,lambda)->8*Pi*h*c/(lambda^5*(exp(h*c/(lambda*k*T))-1)); int(RHO(c,k,h,T,lambda), lambda = 0..infinity) assuming h>0, c>0, T>0, k>0; I am not certain whether this is a bug or a feature of assuming.
I replaced the worksheet with one from Maple 10. Now the plots display properly.
discont actually recognizes its own fallibility. From ?discont:
- discont returns a set of values where it is possible (not necessarily certain) that discontinuities occur.
Now that I check, the plots don't seem to work on my Linux machine either. I don't get exceptions though, I get Java Apps with "Plotting Error". The rest of the worksheet seems to have executed just fine though. Java 1.5.0_13 here.
I am not sure if this is exactly what you are looking for, but you could take a look at the Modular subpackage of LinearAlgebra: ?LinearAlgebra[Modular] It doesn't do Eigenvalues directly but you can Eg: Find the Characteristic Polynomial Mod 2: with(LinearAlgebra[Modular]); A := Matrix(5, 5, proc (i, j) options operator, arrow; rand() end proc); fA := CharacteristicPolynomial(2, A, x); Factor(fA) mod 2;
This looks like a bug in one of the internal solve routines in Maple 11. Here is another way to solve this:
sys:={...your system...};
SolveTools[PolynomialSystem](sys, indets(sys));
From ?SolveTools[PolynomialSystem]:
The PolynomialSystem command uses a number of heuristic techniques to find solutions efficiently. If these techniques are not successful, the function uses Groebner Bases methods.
The first notation y:=t-> defines y as a function so you can use the notation y(x), y(t) , etc. Just writing y:= defines y as a regular variable whose value is the expression on the right hand side of the assignment.
The first notation y:=t-> defines y as a function so you can use the notation y(x), y(t) , etc. Just writing y:= defines y as a regular variable whose value is the expression on the right hand side of the assignment.
You'll want to do a: with(IntegrationTools); before that or IntegrationTools[Change] of course.
I use Maple mode for vim and find it very useful. Recently, I was wondering how I could get syntax highlighting into my command line file viewer (more or less) and happened upon this nice trick for repurposing vim into a pager. Having "less" with syntax highlighting is nice.
First 17 18 19 Page 19 of 19