MaplePrimes Commons General Technical Discussions

The primary forum for technical discussions.
I occasionally use e.g. expr := 1+a^2; eval( expr, 2=-1 ); to convert expr to 1+1/a. I realised recently that this can be dangerous: expr2 := 1+x+3*y; eval(expr2, 1=2); produces (rather suprisingly) 4+2x+3y. Investigating, pulling apart expr2 with op reveals the structure as being a sum of 3 terms, the last being a product. "ToInert" shows essentially the same. "dismantle" however shows expr 2 as being a single sum of the form 1.1 + 1.x + 3.y. So it is essentially the dismantle version that eval searches and replaces all the 1's by 2's. My question is whether there is some good reason for this. It would seem to me (without knowing much about the theory of computer algebra) that eval (and subs) should work on the operands as revealed by op or ToInert. Certainly it would lead to more logical results in cases like my example.
I was solving a task in flow through a pipe and noticed a result from int where floats were changed into a RootOf containing integers and fractions. I was surprised by the result. Here is a very simple example: f:=z->solve(y/(1.+(-0.5*y)^0.8)=z,y); v:=x->int(f,-10..x); v(-1); Is it common for Maple to change floats into integers and fractions for symbolic analysis? It seems to violate the rules. Thanks, Lee View 4238_Odd Solve Example.mw on MapleNet or
What is the canonical (and therefore also safe) way to pull out a specific argument of a function contained in the nested output from ToInert? I ask because it seems that using something like op(n1...,op(nk,ToInert(expr))...), where n1...nk are positive integers, is a bad idea because the arguments can change locations depending on the exact expression being translated to inert form. For instance, inserting a specific shape in the Matrix constructor changes locations of all the other arguments of _Inert_MATRIX. Is it using iteratively something along the following lines?
Is there a size limit on the matrices and vectors? In case there is one, is it possible to extend this limitation?
I've done a proc to produce a list of compound Poisson random variables as below, but it's not fast enough. I suspect there are better ways to do the same. Comments and solutions welcome! with(Statistics): FFFF := proc (g) local i, x, y, S; for i to g do x[i] := floor(convert(Sample(RandomVariable(Poisson(1)), 1), `+`)); if 0
Recently Dr. Israel responded to my request for help in extending the EllipticF function past the limit of Pi/2 for the amplitude (see topic titled Elliptic Integrals). After reviewing A&S Chapter 17, I have tried to duplicate the results using the JacobiAM function in Maple. The help page for this function indicates that there is no limit on the amplitude. The attached worksheet evaluates the form suggested by A&S, Eq. 17.4.3 and the JacobiAM function. It is interesting to note the only when the argument given to the EllipticF function is equal to the remainder of Pi/2 - beta that the two expressions are equal. I would think that the JacobiAM form is a more compact representation of EllipticF for amplitudes greater than Pi/2. Are the two functions equivalent as used in the worksheet?
Hello people. I tried to plot the graph plot(sqrt(sin(x))/sqrt(cos(x))) and I believe it was wrong. The graph was different from the one my Ti gave. So I went online and check with a third party online grapher: http://www.walterzorn.com/grapher/grapher_e.htm and do some calculation on my own. I believe Maple's was wrong. Any idea? Thanks.
Hi there. How are you? I feel sorry since I purchased Maple. Let see if you would agree. First of all, it is inferior to the Ti-89 in some aspects. I have tried to use Maple 11.02 to solve the problems: (sqrt(2)+1)^x+(sqrt(2)-1)^x = 3; And Maple 11.02 fail to solve, then I tried to solve numerically, it missed one solution. There must be 2 solutions for the problem above and Maple missed 1, the Ti-89 beats it hand down. The second problem I tried was: int(sqrt(sin(x))/(sqrt(sin(x))+sqrt(cos(x))), x = 0 .. (1/2)*Pi); and Maple even stuck... The Ti-89 return answer correctly within about 20 secs.
This week I made up an exam using Maple where I didn't want the input to be visible. I used View|Show/Hide to accomplish that. This worked alright within a short time frame. I could save the file with the input hidden, and then I could reload the file and, upon re-checking input to show, all the input would re-appear. However, when I let the file sit for a few days and then tried to re-show the input today, all the input in each execution group was condensed into one line with '?'.

This sure seems like a Maple bug to me. Does anyone have any other ideas about how this could happen? Or how one might recover the input?
I am fooling around a bit with dismantle and ToInert. In the light of the passage "For the exact internal representation, see dismantle," in the help page on ToInert, I am surprised to see that dismantle does not provide any information concerning the entries of a given matrix, as do ToInert:
expr := Matrix(2,2,(i,j) -> m||i||j):
dismantle(expr);
ToInert(expr);
RTABLE(11): 4 [1..2, 1..2]
   NAME(6): anything #[protected]
_Inert_MATRIX(_Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(2)), _Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(2)), _Inert_SET(_Inert_EXPSEQ(_Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(1), _Inert_INTPOS(1)), _Inert_NAME("m11")), _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(1), _Inert_INTPOS(2)), _Inert_NAME("m12")), _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(2), _Inert_INTPOS(1)), _Inert_NAME("m21")), _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(2), _Inert_INTPOS(2)), _Inert_NAME("m22")))), _Inert_EQUATION(_Inert_NAME("datatype"), _Inert_NAME("anything", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected")))))), _Inert_EQUATION(_Inert_NAME("storage"), _Inert_NAME("rectangular")), _Inert_EQUATION(_Inert_ASSIGNEDNAME("order", "PROC", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), _Inert_NAME("Fortran_order")))
Why am I getting this strange result? evalb(sin(1)/cos(1) - tan(1) = 0) gives false but evalf(sin(1)/cos(1) - tan(1)) gives 0 so the evalb should give true. I originally got a result of (sin(x)^3) / (cos(x)^3) in a calculation and asked maple to simplify, expecting tan(x)^3. This led to my investigation of my assumptions about this trig identity. However, for the specific example above, Maple seems to be flat out wrong. Also the boolean returns true if the arg is changed to 0.
If I create a question using the Question Designer, and I insert a Response Area of the List type, and the text of my list items contain multiple consecutive spaces, this will cause problems in the assignments that include this question... In the assignment, if I select an answer for this question using the drop-down list and then I navigate to another question and then return to this question, my answer will not be selected. And if I then navigate away from this question again without reselecting my answer, MapleTA will not record an answer for this question and so it will be marked incorrect.
Is it possible to have the output of dismantle assigned to some variable, or written to some file? Please correct me if I am wrong, but it seems to me that it cannot be persuaded to return anything but NULL, a fact which completely surprises me, if indeed true, for what is the benefit of that?
My recent post You read my mind made me skim through the old thread Width and depth. That reminded me that MapleSoft has never responded to the post Matrix and Vector construction shortcuts by Mariner, in which he (as I would most certainly appreciate too) calls for some illumination from MapleSoft on the whole area discussed in that thread.
First 47 48 49 50 51 52 53 Last Page 49 of 79