opus64

110 Reputation

5 Badges

3 years, 101 days

MaplePrimes Activity


These are replies submitted by opus64

@acer Thank you very much! I did not realize that Explore has a 'size' parameter itself, this does what I want.

Interestingly, I did try changing the dimension of the Plot Component as you suggested(I am using 2019.2) and I still have the same problem as before, the plot goes 'white' when I change the dimensions.  The box outline of the plot does seem to change size to the selected size, but it just doesn't show the plot anymore.  I have to re-run the command to get the plot to come up again, and it does so with the original dimensions.  Since this works in your system, I wonder if it is some sort of graphics bug specific to my computer configuration. The plot not being shown doesn't seem like normal behavior...

Thanks again!

@Carl Love 

Apologies, i'm new to this site and still learning how to post maple math.  I couldn't get the insert 'Maple Math' to work, it doesn't like the 'E4:=' assignment in my original code for some reason.  I pasted a notebook below that has the equation I was working with and both methods. I beleive the confusion is that I failed to mention I was working with double summations which is why I have one more op command.  However your method works in the more general case and is a better solution, thanks!
 

restart

E4 := sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))

sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))

(1)

combine(E4)

sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = sum(sum(h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)

(2)

op(1, op(1, lhs(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = sum(sum(h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)))) = op(1, op(1, rhs(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = sum(sum(h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))))

`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)) = h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L))

(3)

subsindets(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)), specfunc({Sum, sum}), proc (S) options operator, arrow; op(1, S) end proc)

`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j+1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(m*(j-1)*L+l*n*J)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+m*L*j)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+m*L*j)/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)) = h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L))

(4)

``


 

Download remove_summations.mw

@Mac Dude 

Thank you for the replies.  I experimented with op() after reading the replies and ended up with yet another way to remove summations from both sides:

combine(expr)   (1)

op(1,op(1,lhs((1))))=op(1,op(1,rhs((1))))

The combine() operation groups all the summations on each side under a single sum, and the second line gets rid of the summations and returns an equation with just the summands.

I should note, this solution assumes the user has checked that the summations are identical, otherwise the result is not valid.

 

1 2 Page 2 of 2