Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

This'll be easy to do with a single evalindets command. I'll show you how to do it, but I need more information first.

1. What are the allowed values of c? Do they include 0? negatives?

2. Are subscripted variables formed as v[a] or v__a? If you don't know, then look at them with lprint to figure it out.

3. You mentioned non-commutativity. What do you do to distinguish v[a]*u[b] from u[b]*v[a], which Maple considers identical expressions?

4. Should v[a]^c*u[b]^d be treated as (v[a]^c*u[b])*u[b]^(d-1) = Vu(a,b,c)*u[b]^(d-1)?

@vv Sorry, I did not intend any offense. I simply thought that you were claiming that it was necessary to perform these computations at huge values of Digits in order to obtain a result accurate to some small number of digits.

It has always been a serious deficiency of fsolve that one can't set the number of "guard digits" as one can with RootFinding:-Analytic, RootFinding:-NextZero, and `evalf/int`. Thus fsolve guesses at a number of guard digits to use. It insists that its returned result be accurate to Digits. The end result is that there are problems for which the values of Digits for which it converges are essentially random.

Another command with the same problem is `evalf/sum`.

@vv I may have overlooked it, but I fail to see the part of this thread where anyone other than you actually wants a result accurate to 5000 digits. Rather, it seems to me that some have claimed that it's necessary to use a ridiculously large value of Digits (like 5000) to compute a result accurate to some reasonable number of digits, like 20.

@mehdibaghaee Actually, Tom's first set of commands will also produce the results that you want. At first reading, I hadn't realized that that first set also started with the Array command, which is the crucial difference from your code.

@vv Using Newton's method with Digits:= d is sufficient to accurately solve erf(z) = 1 - 10^(-d).

@Preben Alsholm Instead of using the "magic number" 1e-22*I, I'd rather do this:

restart:
u:= ((-5*ln(x)^4-20*ln(x)^2-8)/120 + MeijerG([[0$2], [1$3]], [[0$5], []], x^Pi)/Pi^4)/(x-1)^2;
ode:= diff(y(x),x) = Re(u);  #*** Notice the Re. ***
res:= dsolve(
   {ode, y(.4) = 0}, numeric, 
   output= Array([.6]), relerr= .5*10.^(1-Digits),
   method= dverk78  #*** Notice the relerr and method. ***
)[2][1][1,2];

Result:  -0.555168769092963e-2

Default method rkf45 gets fewer correct digits.

@mehdibaghaee If you use Tom's second set of commands, then Wn[0,0,1] will return 3.

@Markiyan Hirnyk Vote up. This is a very useful method to keep in mind. The accuracy that you achieved is amazing considering your very large epsilon. Using default epsilon, it uses about 3 times the effort (set infolevel[`evalf/int`]:= 5 to see that), but it only makes a difference to the least-significant digit of the result.

How did you come to choose such a large epsilon?

@Rouben Rostamian  Thanks, that was a very clear explanation. Vote up.

@Rouben Rostamian  I don't see the relevance of finding the values of x that simultaneously make both the first and second derivative 0.

I can't make sense of your Question. A vector field in the Euclidean plane is a function R^2 -> R^2 (i.e., 2 real inputs and 2 real outputs). For example:

VF1:= (x,y)-> < x^2 + y^2, x^2 - y^2 >;

I don't see anything like that in your Question.

@elen When you say "when I type enter, nothing will be done", do you mean that nothing at all happens---that there's no output at all? Or do you mean that you get output (blue text) that is equivalent to your input? If you get no output at all, then there is some serious low-level problem with your installation. But I'll guess that you have the other situation: Your output is equivalent to your input. Well, you didn't ask for anything to be done other than to name your equation eqn, which Maple did do, right? What do you want done with your equation? If you enter some simple arithmetic like 2+3, it's reasonable for Maple to guess that you want that simplified to 5. This is called automatic simplification. But with your eqn, there's no obvious thing to do with it. You need to ask for something. Do you want to solve the equation for a? Then enter

solve(eqn, a);

@max125 

Yes, if V is a list or set, then V[] returns the arguments (or entries). This only works for lists and sets.

Regarding the s: It does appear in eval([H,HD], s), which is nearly equivalent to subs(s, [H,HD]). Note that every value of s is a set of the form {x= ..., y= ...}, and H and HD do in general contain x and y. To evaluate an expression at particular values of its variables, it's preferred to use eval rather than subs. See ?eval, and note that there are two completely different commands named eval that are described there. The eval that you used in your Question is one of them; the eval that I'm using is the other.

@Britzel There are many ways to do that, and copy-and-pasting code is never needed or recommended. Most of the good ways of doing it involve having an initialization file. Do you have one? If not, see help page ?worksheet,reference,initialization. Create an initialization file, and get back to me. Or get back to me if you have trouble creating the file.

@raskr Indeed, your worksheet has convinced me that Maple 2017 is the lone exception. Thus, it is the only version of Maple for which displayprecision does something reasonable. Its behavior in Maple versions both before and after Maple 2017 is ridiculous.

First 316 317 318 319 320 321 322 Last Page 318 of 709