sursumCorda

1284 Reputation

15 Badges

3 years, 76 days

MaplePrimes Activity


These are questions asked by sursumCorda

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?

As we can see, RealDomain:-solve gives an incorrect solution to the following system: 

restart;

sys := `~`[diff](sqrt(2*a^2-8*a+10)+sqrt(b^2-6*b+10)+sqrt(2*a^2-2*a*b+b^2), [a, b]):

RealDomain:-solve(`~`[`=`](sys, 0), {a, b})

{a = 5/3, b = 5/2}, {a = a, b = 2*a/(a-1)}

(1)

plot(eval(sys, {max(2*5^(1/2), (2*a^2-8*a+10)^(1/2)+2^(1/2)*((a^2-4*a+5)/(a-1)^2)^(1/2)+2^(1/2)*(a^2*(a^2-4*a+5)/(a-1)^2)^(1/2)), min(2*5^(1/2), (2*a^2-8*a+10)^(1/2)+2^(1/2)*((a^2-4*a+5)/(a-1)^2)^(1/2)+2^(1/2)*(a^2*(a^2-4*a+5)/(a-1)^2)^(1/2))}[-1]), a = -infinity .. infinity)

 

extrema(sqrt(2*a^2-8*a+10)+sqrt(b^2-6*b+10)+sqrt(2*a^2-2*a*b+b^2), {}, {a, b})

{max(2*5^(1/2), (2*a^2-8*a+10)^(1/2)+2^(1/2)*((a^2-4*a+5)/(a-1)^2)^(1/2)+2^(1/2)*(a^2*(a^2-4*a+5)/(a-1)^2)^(1/2)), min(2*5^(1/2), (2*a^2-8*a+10)^(1/2)+2^(1/2)*((a^2-4*a+5)/(a-1)^2)^(1/2)+2^(1/2)*(a^2*(a^2-4*a+5)/(a-1)^2)^(1/2))}

(2)

Download solve_returns_an_unsatisfiable_real_solution.mw

This appears to be a bug; is it possible to fix it? 
Text: 

sys := diff~(sqrt(2*a^2 - 8*a + 10) + sqrt(b^2 - 6*b + 10) + sqrt(2*a^2 - 2*a*b + b^2), [a, b]):
RealDomain:-solve(sys =~ 0, {a, b});

As the following worksheet shows, Student:-NumericalAnalysis:-MatrixDecomposition cannot factorize the input matrix  and throws an error, but if we simply reorder or exchange the elements of , no error will be raised. (The reason for setting  is that LinearAlgebra:-LUDecomposition can be used for other methods.) 
 

restart

with(Student:-NumericalAnalysis, MatrixDecomposition)

m := Matrix([[3*(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8],

             [-1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2,0,0,1/2,0,0,1/2],

             [1/2,-(sqrt(3)-1),sqrt(3)-1,1/2,0,0,-1/2,0,0,-1/2],

             [-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8],

             [-1/2,0,0,1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2,0,0,1/2],

             [1/2,0,0,-1/2,-(sqrt(3)-1),sqrt(3)-1,1/2,0,0,-1/2],

             [-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8],

             [-1/2,0,0,1/2,0,0,1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2],

             [1/2,0,0,-1/2,0,0,-1/2,-(sqrt(3)-1),sqrt(3)-1,1/2],

             [-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8]],

            'shape'='symmetric'):

MatrixDecomposition(m, 'method' = 'LDLt'): # this does not work 

Error, (in Student:-NumericalAnalysis:-MatrixDecomposition) a pivot element 0 is encountered, and the entries below it are not all 0; the factorization cannot continue

 

MatrixDecomposition(m([1, 4, 7, 10, 2, 5, 8, 3, 6, 9] $ 2), 'method' = 'LDLt'): # yet this works 

MatrixDecomposition(m([2, 3, 5, 6, 8, 9, 1, 4, 7, 10] $ 2), 'method' = 'LDLt'): # this also works 

randomize(5):

k := 0:
to 1e3 do
        try
                MatrixDecomposition(m(combinat:-randperm(10) $ 2), 'method' = 'LDLt')
        catch :
                k++
        end
od:
k/1e3;

.469

(1)


 

Download LDL_factorization_robustness.mw

The last instance above suggests that it only works on about half of the inputs (that are equivalent to each other). Although I tried changing the value of Digits, the failure rate remained high. Is Student:-NumericalAnalysis:-MatrixDecomposition not robust enough? 

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