lcz

250 Reputation

6 Badges

1 years, 172 days

MaplePrimes Activity


These are questions asked by lcz


I tried to simplify it, but It didn't work that well.

simplify(%)

 

I always feel that this formula can be further simplified, but there is no way to start. Of course, My thoughts maybe incorrect. maybe this is the simplest form.

 

 

 

 

 

 

I have an expression  

product(q^(n -2)- q^i, i = 0 .. r )/product(q^(n-2) - q^(i+1), i = 0 .. r)

 

Obviously, it can be further simplified.

But in maple I can't do that, I use simplify and expand , all failed.

simplify(expand(%))

What should I do to get the simplified result I want?

 

I'd like to convert  every row of matrix to list, but failed.  I want to use batch operations map(~) not for-loop.

data:=Matrix(3, 5, [[2, -6, 3, 0, 0], [5, -2, 4, 1, 2], [17, -4, 10, 20, 99]])

Matrix(3, 5, {(1, 1) = 2, (1, 2) = -6, (1, 3) = 3, (1, 4) = 0, (1, 5) = 0, (2, 1) = 5, (2, 2) = -2, (2, 3) = 4, (2, 4) = 1, (2, 5) = 2, (3, 1) = 17, (3, 2) = -4, (3, 3) = 10, (3, 4) = 20, (3, 5) = 99})

(2)

convert~(data,list)

Matrix(3, 5, {(1, 1) = [2], (1, 2) = [-6], (1, 3) = [3], (1, 4) = [0], (1, 5) = [0], (2, 1) = [5], (2, 2) = [-2], (2, 3) = [4], (2, 4) = [1], (2, 5) = [2], (3, 1) = [17], (3, 2) = [-4], (3, 3) = [10], (3, 4) = [20], (3, 5) = [99]})

(3)

convert(data,list)

[2, 5, 17, -6, -2, -4, 3, 4, 10, 0, 1, 20, 0, 2, 99]

(4)

The expected output is the following:

                        [2, -6, 3, 0, 0]
                        [5, -2, 4, 1, 2]
                      [17, -4, 10, 20, 99]

 

 

 

Download ss.mw

Unfortunately,  Optimization:-Maximize command in following example returns a not precise result (I use Maple 2020).

restart:
s1:= Optimization:-Maximize((x-2*y)/(5*x^2-2*x*y+2*y^2), {2*x^2 - y^2 + x*y=1})

Maple is running the following results:

I read help of  Maximize, It seems to be using only numerical methods .

 

The Minimize and Maximize commands use various methods implemented in a built-in library provided by the Numerical Algorithms Group (NAG). 

 

Can't Maple find a symbolic solution for extreme values under such constrained inequality or equality conditions?

Ps:

For the correct  symbolic  solution, we can try to  use Mathematica 12.

Maximize[{(x - 2*y)/(5*x^2 - 2*x*y + 2*y^2), 
  2*x^2 - y^2 + x*y == 1}, {x, y}]

  We can compare numerical sizes of Optimal solution between maple and mathematica. 

Digits:=20;
sqrt(2.)/4.

Another Problem:

If I accept numerical solutions of maple ,how do I estimate errors without knowing the exact solution ?

 

 

 

Hello,The system of equations is as follows:

I'd like to find all integer solutions in [1,20], when I use isolve ,the results are not good.  Since at least one variable is equal to 0 in evey solution.

{isolve}({a+b+c=a1+b1+c1, a^2+b^2+c^2=(a1)^2+(b1)^2+(c1)^2,a*b*c=2*a1*b1*c1})

 In maple I did not  want to use less efficient for-loop like C programing as following.

#include <math.h>
#include <stdio.h>
void main()
{
    long int a,b,c,d,e,f;
    for(a=1;a<20;a++)
    {
        for(b=1;b<20;b++)
        {
            for(c=1;c<20;c++)
            {
                for(d=1;d<20;d++)
                {
                    for(e=1;e<20;e++)
                    {
                        for(f=1;f<20;f++)
                        {
                            if(a+b+c==d+e+f&&a*a+b*b+c*c==d*d+e*e+f*f&&a*b*c==2*d*e*f)                                             printf("a=%d,b=%d,c=%d,d=%d,e=%d,f=%d\n",a,b,c,d,e,f);
                        }
                    }
                }
            }
        }
    }
}
a=3,b=5,c=16,d=1,e=8,f=15
a=3,b=5,c=16,d=1,e=15,f=8
a=3,b=5,c=16,d=8,e=1,f=15
a=3,b=5,c=16,d=8,e=15,f=1
a=3,b=5,c=16,d=15,e=1,f=8
a=3,b=5,c=16,d=15,e=8,f=1
a=3,b=16,c=5,d=1,e=8,f=15
a=3,b=16,c=5,d=1,e=15,f=8
a=3,b=16,c=5,d=8,e=1,f=15
a=3,b=16,c=5,d=8,e=15,f=1
a=3,b=16,c=5,d=15,e=1,f=8
a=3,b=16,c=5,d=15,e=8,f=1
a=5,b=3,c=16,d=1,e=8,f=15
a=5,b=3,c=16,d=1,e=15,f=8
a=5,b=3,c=16,d=8,e=1,f=15
a=5,b=3,c=16,d=8,e=15,f=1
a=5,b=3,c=16,d=15,e=1,f=8
a=5,b=3,c=16,d=15,e=8,f=1
a=5,b=16,c=3,d=1,e=8,f=15
a=5,b=16,c=3,d=1,e=15,f=8
a=5,b=16,c=3,d=8,e=1,f=15
a=5,b=16,c=3,d=8,e=15,f=1
a=5,b=16,c=3,d=15,e=1,f=8
a=5,b=16,c=3,d=15,e=8,f=1
a=16,b=3,c=5,d=1,e=8,f=15
a=16,b=3,c=5,d=1,e=15,f=8
a=16,b=3,c=5,d=8,e=1,f=15
a=16,b=3,c=5,d=8,e=15,f=1
a=16,b=3,c=5,d=15,e=1,f=8
a=16,b=3,c=5,d=15,e=8,f=1
a=16,b=5,c=3,d=1,e=8,f=15
a=16,b=5,c=3,d=1,e=15,f=8
a=16,b=5,c=3,d=8,e=1,f=15
a=16,b=5,c=3,d=8,e=15,f=1
a=16,b=5,c=3,d=15,e=1,f=8
a=16,b=5,c=3,d=15,e=8,f=1

Does Maple have more good ways to solve that?

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