MaplePrimes Questions

I can not interpret this answer.

I think here I is the complex unit.

Hi all,

I tried to used some statistical methods to analyze the data in maple and encountered some problems.

I wanted to perform a cluster analysis to quantify differences among individual samples and hoped to create the dendrogram like this:

 

For example, each sample is assigned to a cluster and there are about 4 main clusters plus additional outliers in this case through the dendrogram method.

But I didn't find any related command to create this kind of graph. How to realize this analysis in Maple? 

I'd appreciate any help on this topic. Thank a lot.

after integration,
result is x^2

f := x^2

we know in the range 5..-5 = 5^2 - (-5)^2 = 0

this example is not good enough, as i can be any number x, -x

if in another example, i use a and b to represent that would like to find

3*a^2 - 3*b^2 = 0, how to find possible a and b?

my example is not good, is there example that a and b are different number, not only in sign

i have a sense that substitution represent associative x*y and x+y

is my understanding correct?

if i change associative property to gcd and lcd,

how to do composition?

if associative is a pair of function, x+y, x*y

does it mean that non associative should also a pair

 

is it possible replace substitution with two operation x+y and x*y?

How to find inverse function of a multivariable function

for example

f := x^2 + y + z^3

f := x^2 + y^3

Gentlepeople.

Given 6 teams [A,B,C,D,E,F] I require that each team plays each other once.

 I can generate the pairs:

lst:=combinat:-choose({A,B,C,D,E,F}, 2);  

{{A, B}, {A, C}, {A, D}, {A, E}, {A, F}, {B, C}, {B, D}, {B, E}, {B, F},  {C, D}, {C, E}, {C, F}, {D, E}, {D, F}, {E, F}}

On a competion night three pairs will compete and it will take 5 nights for all teams to play each other.

now I need some eredite richard who can show me how to produce the five night output:

(instead of comma a 'v' needs to be mapped)

AvF

BvD

CvF

.....

 

I am trying to invert a function and, during the course, wind up with something like,

 

a_1*V^P*V + a_2*V^P*V^2 + a_3*V^P*V^3 + a_4*V^P*V^3 + a_5*V^P*V^3 + a_6*V^P*V^4 + \cdots

 

is there a way to get the poly into a form 

 

(a_1+a_2+...)*V^P + (b_1+b_2+...)*V^(P+1) + (c_1+c_2+...)*V^(P+2) + .....

 

?

Thanks. Attached is my Maple 16 sheet.

restart

with(LargeExpressions)

``

main := V^P*(V-1)^Q = c^(P-Q)*X^Q*(V-c^2)^Q

V^P*(V-1)^Q = c^(P-Q)*X^Q*(V-c^2)^Q

(1)

``

assume(Q, real); additionally(Q > 0); additionally(Q, integer)

assume(P, real); additionally(P > 0); additionally(P, integer)``

NULL

``

you := proc (s, n) V[1] := s; for i to n do V[i+1] := (`@`(simplify, expand))(c^((P-Q)/P)*X^(Q/P)*(-c^2+V[i])^(Q/P)/(V[i]-1)^(Q/P), symbolic) end do end proc

proc (s, n) local V, i; V[1] := s; for i to n do V[i+1] := (`@`(simplify, expand))(c^((P-Q)/P)*X^(Q/P)*(V[i]-c^2)^(Q/P)/(V[i]-1)^(Q/P), symbolic) end do end proc

(2)

``

``

START*HERE

START*HERE

(3)

``

Rearranging "main" leads to the following.

``

main2 := X^Q = V^P*(V-1)^Q/(c^(P-Q)*(V-c^2)^Q)

X^Q = V^P*(V-1)^Q/(c^(P-Q)*(V-c^2)^Q)

(4)

``

It can't take a series due to the series about zero, so I split it into

``

split := X^Q = V^P*(a[1]+a[2]*V+a[3]*V^2+O(V^3))

X^Q = V^P*(a[1]+a[2]*V+a[3]*V^2+O(V^3))

(5)

````

Then I'll get a polynomial expression, switch places of the two variables' leading terms, and substitute into the "original" polynomial (split).

``

````

  one := (V-1)^Q/(c^(P-Q)*(V-c^2)^Q)

(V-1)^Q/(c^(P-Q)*(V-c^2)^Q)

(6)

``

two := `assuming`([simplify(`assuming`([series(one, V, 3)], [V > c^2, c > 1]))], [real])

series(c^(-Q-P)-(c^(-Q-P-2)*Q*(c^2-1))*V+((1/2)*c^(-Q-P-4)*Q*(-c^4+c^4*Q+1+Q-2*Q*c^2))*V^2+O(V^3),V,3)

(7)

``

three := convert(two, polynom)

c^(-Q-P)-c^(-Q-P-2)*Q*(c^2-1)*V+(1/2)*c^(-Q-P-4)*Q*(-c^4+c^4*Q+1+Q-2*Q*c^2)*V^2

(8)

``

four := simplify(expand(V^P*three))

V^P*c^(-Q-P)-V^(P+1)*c^(-Q-P)*Q+V^(P+1)*c^(-Q-P-2)*Q-(1/2)*V^(P+2)*c^(-Q-P)*Q+(1/2)*V^(P+2)*c^(-Q-P)*Q^2+(1/2)*V^(P+2)*c^(-Q-P-4)*Q+(1/2)*V^(P+2)*c^(-Q-P-4)*Q^2-V^(P+2)*c^(-Q-P-2)*Q^2

(9)

``

five := collect(four, V, factor)

V^P*c^(-Q-P)-V^(P+1)*c^(-Q-P)*Q+V^(P+1)*c^(-Q-P-2)*Q-(1/2)*V^(P+2)*c^(-Q-P)*Q+(1/2)*V^(P+2)*c^(-Q-P)*Q^2+(1/2)*V^(P+2)*c^(-Q-P-4)*Q+(1/2)*V^(P+2)*c^(-Q-P-4)*Q^2-V^(P+2)*c^(-Q-P-2)*Q^2

(10)

collect(five, V)

V^P*c^(-Q-P)-V^(P+1)*c^(-Q-P)*Q+V^(P+1)*c^(-Q-P-2)*Q-(1/2)*V^(P+2)*c^(-Q-P)*Q+(1/2)*V^(P+2)*c^(-Q-P)*Q^2+(1/2)*V^(P+2)*c^(-Q-P-4)*Q+(1/2)*V^(P+2)*c^(-Q-P-4)*Q^2-V^(P+2)*c^(-Q-P-2)*Q^2

(11)

factor(five, V)

Error, (in factor) 2nd argument, V, is not a valid algebraic extension

 

``

``

``

``

``

``

``

``


Download invert2.mw

Hi Maple Prime-ers!

I have a question about efficiency.  I have a set of algebraic equations with some polynomials, that I would like to solve at different points.  I've tried using a for-loop and a map-loop.  Here is a example:

 

n:=10000;  #Number of solving points
eq1:={b = ''a^2'', c = b^3/2, d = c^(1/2)*4 + b^2}; #Equation to solve

a := convert([seq(i,i=1..n)],Vector);  #timesteps

ans := Vector[column](n)

## Try solving in a for-next loop
t1 := time():
for q from 1 to n do
ans(q):=solve(subs({'a' = a(q)},eq1)):
od:
t2 := time() - t1;

## try solving in a map loop
t1s := time():
ans_s := map(q->solve(subs({'a' = a(q)},eq1)),a);
t2s := time() - t1s;

On my computer (2.2Ghz, 2 cores), these both take 115s to solve.  Using Map over For-Next did not speed up computational speed.  

The problem I wish to tackle has 12 equations, invovles 5th order polynomials, and n ~= 300000.  Solving this set of equations takes 2-3 hours.

Anyone know a more efficient method?  Thanks for reading :D

 

Please look at the following set.

restart; Z := {x1*(h1+h3) = 0, b1*x1+b4*x3 = 0, f2*x2+f3*x1 = 0, g2*x2+g4*x3 = 0, d1*x1+d2*x2+d4*x3 = 0}; for i to numelems(Z) do print(Z[i]) end do; "++++++++++++++++"; h3 := -h1; x3 := x2; g2 := -g4; Z; print("The following loop gives wrong result! The last element d1*x1+d2*x2+d4*x2=0 of set Z have disappeared!"); for i to numelems(Z) do print(Z[i]) end do

{x1*(h1+h3) = 0, b1*x1+b4*x3 = 0, f2*x2+f3*x1 = 0, g2*x2+g4*x3 = 0, d1*x1+d2*x2+d4*x3 = 0}

 

x1*(h1+h3) = 0

 

b1*x1+b4*x3 = 0

 

f2*x2+f3*x1 = 0

 

g2*x2+g4*x3 = 0

 

d1*x1+d2*x2+d4*x3 = 0

 

"++++++++++++++++"

 

{0 = 0, b1*x1+b4*x2 = 0, f2*x2+f3*x1 = 0, d1*x1+d2*x2+d4*x2 = 0}

 

"The following loop gives wrong result! The last element d1*x1+d2*x2+d4*x2=0 of set Z have disappeared!"

 

0 = 0

 

b1*x1+b4*x2 = 0

 

f2*x2+f3*x1 = 0

 

0 = 0

(1)

``

``

Why?

Download Set.mw

Notepad displays alt+1, alt+2 and alt+3 as ☺☻♥

Just wondering why Maple displays them as square boxes?  Shouldn't it have the font capability to display them as well?

 what does index mean in maple? for example, if i had RootOf(20+60Z+335Z2+825Z3+1629Z4+2520Z5, index=3) ?

 

 

I'd expect the following to give the result "c+2".

> c := a+b

> simplify(a+b+2)

How can I let Maple know that I'd prefer it to write "c" in place of "a+b" when possible?

Hi! I'm new to Maple. Is there a better way to represent matrices? This is what I've done so far, but the indices (C11, C12, n1, etc) look a little weird and superfluous. Am I doing it the "Maple way"?

 

Examples:

C=Matrix([[C11,C12],[C12,C22]])

 

The result of the following lines in Maple is V := [5., 3.,5. 11., 6.] that I think should be V := [5., 3.,5. 0., 6.], is there somthing wrong?

 

v1:= Vector([-28., -63., -17., -55., 17.], datatype= float[8]):

V:= LinearAlgebra:-Modular:-Mod(11, v1, float[8]);

bug.mw



I have three vectors a, b, c. Knowing that the scalar of product a . b = 1, a. c = 1, b.c=1 and modul of a equal to 1, modul of b equal to 4 and modul of c equal to 4. Now I consider two vectors u = -6*a + b + c and v = 3*a -4*b + c. How to find the angle of two vectors u and v?

First 1463 1464 1465 1466 1467 1468 1469 Last Page 1465 of 2426