Kitonum

20084 Reputation

26 Badges

17 years, 23 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Scot Gould  Thank you for this!  I did not know that Maple solves systems written in vector form.

@amirhadiz  The  Interpolation  package appeared only in the latest versions of Maple. You have an older version, but you can use the code from my answer.

@acer  Thanks for this info. I did not know that such an evident command appeared recently only. Of course, for older versions, we can write
L1:=map(t->[t,ListTools:-Occurrences(t,L)], convert(L,set));
instead of  
L1:=ListTools:-Collect(L);

 but of course, Statistics:-Tally is more convenient. My point was simply to show that there are different ways to solve the same problem.

@Ali2020  It works in Maple 2019 only.

@minhthien2016 

Here is the equation with 6 another solutions:

abs(a*x+b)+abs(c*x+d)-3*x^2+n*x+p=0

@minhthien2016  
 

f:=x-> abs(a*x+b)+abs(c*x+d)-x^2+n*x+p;
solve([f(1) = 0, f(2) = 0, f(3) = 0, f(4) = 0, f(5) = 0, f(6) = 0], [a, b, c, d, n, p]);

     [[a = -2, b = 5, c = -2, d = 9, n = 7, p = -16], [a = -2, b = 5, c = 2, d = -9, n = 7, p = -16], [a = 2, b = -5, c = -2, d = 9, n = 7, p = -16], [a = 2, b = -5, c = 2, d = -9, n = 7, p = -16], [a = -2, b = 9, c = -2, d = 5, n = 7, p = -16], [a = 2, b = -9, c = -2, d = 5, n = 7, p = -16], [a = -2, b = 9, c = 2, d = -5, n = 7, p = -16], [a = 2, b = -9, c = 2, d = -5, n = 7, p = -16]]

@mehran rajabi  See help on  Student:-NumericalAnalysis:-Quadrature  command, spesifically the  method  option.

Present the complete code in an editable form (as text, not a picture) or the worksheet.

@weidade37211  I do not know how to explain this difference. I tried both methods and found that the second one is faster and does not need square brackets.

@acer  My comment above related to calculation of  cos(Pi/7)  and I used the de Moivre's formula and then  solve . The value of  sin(Pi/7)  probably cannot be simplified as well as  cos(Pi/7) .

@vv  I meant real radicals (without the imaginary unit  I ). Your expression can be slightly simplified, for example

cos(Pi/7) = (1/12)*(-28+(84*I)*sqrt(3))^(1/3)+7/(3*(-28+(84*I)*sqrt(3))^(1/3))+1/6

without  sqrt .

 

 

@CyberRob  If you are working with polynomials in several variables, then you must tell Maple what these variables are. How does Maple know what you call monomials and what are coefficients. Maple has the  coeffs  command for extracting coefficients and corresponding monomials of a multivariate polynomial. See the example below for a polynomial with two variables ( x  and  y ):

restart;
P:=2*x^2-3*x*y+a*y^2-b*x+7;
coeffs(P, [x,y], 't');  # Coefficients
t;  # Corresponding monomials

                     P := a*y^2-b*x+2*x^2-3*x*y+7
                             2, -3, -b, a, 7
                          x^2, x*y, x, y^2, 1

@CyberRob  I think that there simply isn’t such a command that is guaranteed to return the simplest form of some expression. For example, in the following example, using the  expand  command, we remove the parentheses. I do not know a way to get the initial form of this expression:

Expr:=(x^2-3*x+1)^10+(x+5)^11;
expand(Expr);

                        Expr := (x^2-3*x+1)^10+(x+5)^11
     x^20-30*x^19+415*x^18-3510*x^17+20295*x^16-84996*x^15+266610*x^14-639180*x^13+1185645*x^12-1713689*x^11+1936936*x^10-1712315*x^9+1206270*x^8-432930*x^7+1710360*x^6+7133754*x^5+25801545*x^4+64449615*x^3+107422290*x^2+107421845*x+48828126

@CyberRob  Use  simplify  for this new expression:

simplify(c4*dnub*kpbr*ksr*nur*nurdel + c4*dnur*kpbr*ksr*nub*nurdel + nub);

                   c4*kpbr*ksr*nurdel*(dnub*nur+dnur*nub)+nub

@CyberRob   p=~1  equates each element of the list  p  to 1 . op(f)  returns all operands of  f , i.e. separate summands. The  algsubs  command makes the appropriate substitutions in  [op(f)]  from the list  R . See

restart;
f:=(a+b)*x1+(a^2+b^2)*(x1+x2^2)+c*(x2-x3)*a*b:
p:=[a+b,a^2+b^2,c*b*a]:
R:=p=~1;
[op(f)];
cof:=[seq(algsubs(R[i], [op(f)][i]),i=1..nops(p))];

                     R := [a+b = 1, a^2+b^2 = 1, c*b*a = 1]
                [(a+b)*x1, (a^2+b^2)*(x2^2+x1), c*(x2-x3)*a*b]  
                           cof := [x1, x2^2+x1, x2-x3]   

First 20 21 22 23 24 25 26 Last Page 22 of 126