sursumCorda

1329 Reputation

15 Badges

4 years, 1 days

MaplePrimes Activity


These are questions asked by sursumCorda

Under the default interface('displayprecision') setting, we can see that 

restart;
forget(evalf);evalf(sqrt(8));
                          2.828427124
forget(evalf);evalf('sqrt'(8));
                      2.82842712474619029

By contrast, there is no difference in the number of displayed digits, for instance, between evalf('surd'(…, 2)) and evalf(surd(…, 2)): 

restart;
forget(evalf);evalf(surd(8, 2));
                          2.828427124
forget(evalf);evalf('surd'(8, 2));
                          2.828427125

Why are more decimal places displayed for evalf('sqrt'(…)) than for evalf(sqrt(…))?

Additional examples: 

restart;
forget(evalf);evalf(root[2](8));
                          2.828427124
forget(evalf);evalf('root'[2](8));
                          2.828427124
restart;
forget(evalf);evalf(power(8, 1/2));
                          2.828427125
forget(evalf);evalf('power'(8, 1/2));
                          2.828427125

Intuitively, is(..., realcons) and type(..., realcons) ought to share the same underlying mechanism and yield the exact same result. In practice, however, this is not always the case.
Consider the following example: 

Download is_vs_type.mw 

Here, both is(e1*I, real) and is(e1*I, realcons) should return  (or at least , if it cannot be determined internally at the current precision). I was wondering why is fails to handle this properly when type works as expected. Does the former actually use a completely different mechanism under the hood, or does it simply lack adaptive precision? 

Code: 

restart; 

e1 := arccos(1-1/10^(Digits+1)); # or some smaller-magnitude, yet still exact, real number 

is(Im(e1) = 0);

is(e1, real);
is(e1*I, real); # should return false 

is(e1, realcons);
is(e1*I, realcons); # should return false 

type(e1, realcons);
type(e1*I, realcons);
f:=subs(r=(sqrt(5)+1)/2,7*arctan(r)^2+2*arctan(r^3)^2-arctan(r^5)^2); 

The above expression is in fact equal to (7*Pi**2)/8 (which may be obtained by the `identify` command). 
As the following worksheet shows, simplify(f); fails to do full simplifications and the result consists of the less simplified arctan(2/11), while simplify(f/Pi^2); succeeds in making full simplifications and returning the remarkably simpler form: 

> 

restart;

> 

f := subs(r = (sqrt(5) + 1)/2, 7*arctan(r)^2 + 2*arctan(r^3)^2 - arctan(r^5)^2); # which is actually equal to “7/8*Pi^2”

7*arctan((1/2)*5^(1/2)+1/2)^2+2*arctan(((1/2)*5^(1/2)+1/2)^3)^2-arctan(((1/2)*5^(1/2)+1/2)^5)^2

(1)
> 

is(f = 7/8*Pi^2);

true

(2)
> 

simplify(f); # This cannot yield the desired result.

(11/16)*Pi^2+(3/4)*arctan(1/2)*Pi+(9/4)*arctan(1/2)^2-(1/4)*arctan(2/11)^2+(1/2)*arctan(2/11)*Pi

(3)
> 

simplify(f/Pi^2); # To obtain the desired result, `f` has to be divided by Pi^2 manually.

7/8

(4)
> 

simplify(arctan(2/11) - 3*arctan(2)); # So, Maple knows that arctan(2/11) = 3*arctan(2) - Pi (or, somewhat more elegantly, arccot(2/11) = 3*arccot(2)).

-Pi

(5)
> 

simplify((3), constant); # No further simplification.

(11/16)*Pi^2+(3/4)*arctan(1/2)*Pi+(9/4)*arctan(1/2)^2-(1/4)*arctan(2/11)^2+(1/2)*arctan(2/11)*Pi

(6)

As Maple does indeed know that arctan(2/11) = 3*arctan(2)-Pi, why can't Maple further simplify (3) by attempting to eliminate arctan(2/11) (so that we don't have to enter the identity manually)?

> 

simplify(simplify((3), {arctan(2/11) = 3*arctan(2) - Pi}));

(7/8)*Pi^2

(7)
> 

simplify(subs(((sqrt(5)+1)*(1/2))^5 = ((sqrt(5)-1)*(1/2))*((sqrt(5)+1)*(1/2))^6, f))

(7/8)*Pi^2

(8)
 

 

Download simplify_a_constant.mw

Since arctan(2/11) can be expressed by the significantly more concise arctan(1/2) and Pi (that is, arctan(2/11) = 3*arctan(2) - Pi), why didn't simplify(f); attempt to eliminate arctan(2/11) in the result to further simplify `f`?

For instance, I would like to represent “3^(1/3)” and “4^(1/4)” respectively as elements of the field generated by “3^(1/3) + 2^(1/2) + 1^(1/1)”. 
I think the Algebraic package and the evala procedure should already offer a direct command, but I couldn't find it. The following results are computed by SymPy's `to_number_field` function: 

-48/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^5 + 
 213/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^4 - 
 52/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^3 - 
 174/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^2 - 
 232/755*(3^(1/3) + 2^(1/2) + 1^(1/1)) + 
 277/151: # originally computed by SymPy's `to_number_field`
is(3^(1/3) = %);
                              true

48/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^5 - 
 213/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^4 + 
 52/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^3 + 
 174/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^2 + 
 987/755*(3^(1/3) + 2^(1/2) + 1^(1/1)) - 
 428/151: # originally computed by SymPy's `to_number_field`
is(4^(1/4) = %);
                              true

Does there exist a direct command in Maple to find the above representations? 

Although several similar problems were asked many years ago (see, e.g., the section “Formal linear algebra” here), there appears to be no new progress so far. It is said that such functionalities exists in the Physics package, but I cannot find any corresponding examples. 
In short, can Maple at present calculate these examples in terms of symbolic array constructs completely automatically?

1 2 3 4 5 6 7 Last Page 1 of 24