MaplePrimes Commons General Technical Discussions

The primary forum for technical discussions.
I have been attempting to use Maple 8 to compute the limit of a function defined by a procedure (rather than as a piecewise function). I can define the function using the piecewise construct but I would rather have my students define functions by writing procedures. Any ideas/suggestions would be appreciated. Please see the attached worksheet. Thank you, Chris de Castro cdecastro@bellsouth.net Download 2060_LimitOfProcedure.mws
View file details
I have been trying out Maple 11 on a Mac. I am having trouble with writing to postscript files - the output is not nearly as smooth as it would be using, e.g., maple 10 using the classic worksheet on windows (eg, try sin(x) with numpoints=1000 - it looks really bad close-up) . In fact, it looks like the pictures are either bit-mapped before being exported, or the resolution of the ps writer is not high enough. In fact, looking at the text in the ps file, I think it's the latter. Is there a way I can get round this? Is the old ps-interpreter available? Why did they change it from 10->11, or is it just another classic -> standard interface problem?
Qualifying exams are rapidly turning my brain to mush, so I offer this problem for y'all to figure out: I've grabbed some encoded text from a pre-existing worksheet. I've decoded the text, so now I am left with the typeset version of what the text represents. The command Typesetting:-Parse() should work on this text, and yet it does not. For a concrete example: getstr := "LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYqLUkjbWlHRiQ2JVEiYUYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JI21vR0YkNi1RKiZjb2xvbmVxO0YnL0YzUSdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPS8lKXN0cmV0Y2h5R0Y9LyUqc3ltbWV0cmljR0Y9LyUobGFyZ2VvcEdGPS8lLm1vdmFibGVsaW1pdHNHRj0vJSdhY2NlbnRHRj0vJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZMLUYsNiVRInFGJ0YvRjItRjY2LVEifkYnRjlGO0Y+RkBGQkZERkZGSC9GS1EmMC4wZW1GJy9GTkZWLUkobWZlbmNlZEdGJDYkLUYjNictRiw2JVEickYnRi9GMi1GNjYtUSIrRidGOUY7Rj5GQEZCRkRGRkZIL0ZLUSwwLjIyMjIyMjJlbUYnL0ZORl5vLUYsNiVRInNGJ0YvRjIvJStleGVjdXRhYmxlR0Y9RjlGOS1GNjYtUSI7RidGOUY7L0Y/RjFGQEZCRkRGRkZIRlVGTUZjb0Y5";
Hello all, I'm new here and I don't know if it is the right place to report a bug. I do not own Maple by myself, I'm just using our campus-net installation of Maple 9. I have no access to more recent versions right now. I was typing a functioning old Maple 4 sheet, but got a different result with Maple 9 (see below)! However, I found to introduce a simplify() before the int()-call fixes the problem (see last command). Do higher versions of Maple have the same problem with this code? Thanks, Klaus > restart: with(linalg): Warning, the protected names norm and trace have been redefined and
I have the following:
>                 /             /         2          \\    
>              1  | 2    2      |/ 2    2\       2  2||    
>       eqn := - +\b  + a , sqrt\\b  + a /  - 4 a  c // - c
>              2                                           
                                                     (1/2)    
        1  2   1  2   1 / 4      2  2    4      2  2\         
 eqn := - b  + - a  + - \b  + 2 b  a  + a  - 4 a  c /      - c
        2      2      2                                       
>                          solve(eqn, c)
                               2    2

The first example below seems OK. But, should I be expecting the different behaviour in the second example?


> restart:
> p := module() option package; export foo;
> foo:=proc(x) x; end proc;
> end module:

> foo := proc(x) cos(x); end proc:

> foo(3.2);
-0.9982947758

> p:-foo(3.2);
3.2

> evalhf(p:-foo(3.2)); # OK
3.20000000000000018

> restart:
> p := module() option package; export sin;

Dear all, I recently had to solve the following integral: A:=(x,m)->(-m^2-2*x*m+1)/(sqrt(x)*sqrt((m+x)^2-1)*(x+sqrt((m+x)^2-1))); IntegralA:=(m)->Int(A(x,m),x=0..infinity); When I used evalf(IntegralA(1)); I get -2.828427125 But when I use int(A(x,1),x=0..infinity); to get a symbolic answer I get a complicated expression involving the function MeijerG function. Mathematica, on the other hand gives -2sqrt(2) exactly for the symbolic value. Does anybody know why? I'm curious even though the decimal values are the same. I was using Maple 11 and Mathemtica (I think) 5. Regards, Drew
Hi folks, When I use a command like: implicitplot3d(f(x,y,z)=0,x=...,y=...,z=...) obviously maple has to compute all the points in the given range which satisfy the equation. Does anybody know which numerical method it uses to do this? Regards, Drew
It's just a silly, simple thing, but I'm going to call attention to it anyway: fopen("file", w); Produces the error message "Error, (in fopen) file mode must be READ or WRITE." This is incorrect. The file mode must be READ, WRITE, or APPEND. Like I said: silly, but worth noting.
Hi!. I'm Scasbyte. I have been using Maple 11.0 for not too much time, I have found that after 2 or 3 hour of usage, it becomes amazingly slow, when I look an usage of the RAM memory it uses about 800 Mb and starts using Virtual Memory. Even if I restart maple(using the command "restart;" it still slow, I have to close Maple and open it again to solve this! Do you have the same problem?? What can I do to solve this?? Thanks!.
This works in Maple 10, but fails (see below) in Maple 11...

> pp := -exp(x)+kk[1]*log(x)+kk[2]*x+kk[3]*log(log(x))+kk[4]*exp(x);

> vv := {kk[1], kk[2], kk[3], kk[4]};

is(f@(g@h) = (f@g)@h); true is(f@(g@g)=(f@g)@g); false In the first, both sides come out as `@`(f,g,h) In the second, we get `@`(f,`@@`(g,2)) and `@`(f,g,g) which no longer match for "is"
Is it intended that addition and multiplication act differently here?

> A := proc(s)
if type(s,`numeric`) then return true; fi;
return false;
end:

> A(2);

> A(a);

"I've seen this element before..." Often we are faced with the problem of building up sets incrementally, by removing pieces one at a time from a larger whole. The bottlenecks in this case are usually: 1) adding a small set X to a large set S (copies S and X, making this ~O(|S|+|X|)) 2) removing elements of the large set S from the small set X (binary search: |X|*log(|S|)) A classic example of this is a breadth-first-search. We start at one vertex of a graph and in each iteration we add the set of new neighbors X to the set of vertices S that have already been found. We can make this more useful by making the program return the sets of new neighbors found in each iteration, that is, the sets of vertices that are distance 1, 2, 3, etc. from the initial vertex.

Which of these do you prefer, and why?

foo := proc(T)

...

if type(s,`+`) then
r := map(foo,s);
fi;

...

end;

foo := proc(T)

...

if type(s,`+`) then
r := 0;
for x in op(s) do r := r+foo(x); od;
fi;

...

end;


First 53 54 55 56 57 58 59 Last Page 55 of 79