Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 30 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

You can do the same thing in Maple: Enter your expression with single forward quotes. There are certain small operations (such as arithmetic) called "automatic simplifications" that will always be done. But most operations will be suspended by the quotes. To evaluate the expression after it has been entered this way, use the ditto operator: %


'int(x, x= 0..1)';

%;

The vast majority of Maple commands use global variables (such as enviroment variables, especially Digits) to some extent. Thus they can't run multi-threaded. See ?index,threadsafe for the paltry list of exceptions.

If you are interested in a hardware floating-point answer (aka "double precision"), then the following works in parallel and should give you a processor utilization percentage in the high nineties:

Sin:= proc(x)
option threadsafe, autocompile;
     sin(x)
end proc:

Cos:= proc(x)
option threadsafe, autocompile;
     cos(x)
end proc:

SC:= Threads:-Seq([Sin(i), Cos(i)], i= 1..10^6):

Try this:

Test:= proc(j)
local x;
     plot(x^j, x= -2..2)
end proc:

for j to 3 do
     print(Test(j));
     print(`Press RETURN to continue.`);
     readline(-1);
end do:

The help at ?readline says that the -1 argument avoids the dialog box and reads from the prompt. I get a dialog box anyway.

I assume that you mean that you want the powers of t up to 3, but that the other variables can have higher powers. Use series (after correcting the syntax of your expression):

series(lhs(p1), t, 4);

I believe that evalf is giving up in some cases because it cannot control the error to within the value specified by Digits.

Twelve years ago I wrote a program for the numerical evaluation of infinite series whose summands can be symbolically integrated. Your series is certainly in that category. That program still runs fine in today's Maple. It has a parameter for the maximum absolute error. The attached worksheet includes a derivation of the formula with diagrams, a proof of the formula, the program, and many examples of its use. At the very end, I put your problem. I thought that the worksheet was too long to post inline, so you'll have to download it.

IntTest.mw

For whatever reason, the command requires a symbolic second argument. You can get around this by substituting the numeric second argument into the expanded form, like this:

eval(expand(QDifferenceEquations:-QPochhammer(-1,q,10)), q= 5);

You need to use round parentheses ( ) for all algebraic groupings, not square brackets [ ], in your eqd1 and eqd2.

I can't see exactly what is causing that error message without seeing your Phi---I can't duplicate the message---but try 

int~(Phi^%T*f, x= 0..1);

Note that ScalarMultiply is unnecessary: The operation is handled by ordinary `*` multiplication.

The tilde (~) after the int is needed to map the operation over a vector.

You could use mu[0,1] or mu[`01`] or mu[o1] or mu[O1].

Use readline to read the first line. Use ImportMatrix to read the rest. ImportMatrix has an option to skip the first n lines of the file.

My experience is that Grid operations do not work very well when the operation being replicated is trivial. In this case, the symbolic application of ln, the operation is utterly trivial, just an unevalated fuction call. My guess is that each step should take at least 1/10 second to use Grid.

Try adding the option linestyle= solid to the plot command.

f''(0) is what your last line of code prints. It's what you called X2.

Most random values are 12 digits. Try

eval(eqn1, y= rand());

You will almost certainly get a numeric overflow. I believe that testeq is somewhat naively doing this. The safer way would be to use &^ instead of ^. I believe that testeq is using modular arithmetic with a large random prime modulus, but it is not changing to the safer &^.

The above is just my speculation based on reading ?testeq.

You can avoid the cut-and-paste step: In file 1.mw, after the definition of aver, include the command

save aver "aver.mpl";

You can use any filename that you want in the quotes. Make sure that the command is executed; this won't work if the command is just sitting there unexecuted. In file 2.mw, use the command 

read "aver.mpl":

This part is the same as TomLeslie's Answer. (The parentheses in his read command are superfluous.) Indeed, the save command creates the plain text file for you.

 

First 260 261 262 263 264 265 266 Last Page 262 of 395