acer

32303 Reputation

29 Badges

19 years, 303 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@sand15 I'm currently looking at Viking stuff in L'Anse aux Meadows (end of the world).

But when I get back to my computer (Fri, 01/08) I could take a look at this.

ps. The OP seems to have indicated (elsewhere) that he couldn't use Kitonum's contour labelling proc for the (erroneous) reason that it's not found as a stock command. Perhaps someone might explain to him that Kitonum's procedure's code for that was simply in his Post & comments.

Is there a reason why you could not use the,

   DocumentTools:-Tabulate

command? (...or a variant of that, either embedding in the current sheet, or opening in a wholly new sheet, possibly split if you need a page break, etc).

What are you final goals, eg.  to export this (pdf file), or something else?

@GFY No, this is an unusual and uncommon situation.

When I try to login on my phone (android, chrome) it briefly shows the page indicating that I'm logged in, and then a few seconds later it boots me out and back a page, automagically.

Logins on two desktops (ubuntu) from chromium worked.

@Geoff 

What do you think happens in your example (12) when p>1 and n is not an integer?

What do you think happens in your example (13) when n is not an integer?

You haven't described in any detail what you think is wrong.

@mehdi jafari You now write, "I was specifically looking for the plot of P1 vs x, which is implicitly embedded within the expression FF."

Why didn't you write explicitly what you were actually looking for, when you first posted the Question?

Also, there are a lot of ways to do approach this as an optimization problem rather than a root-finding one (... or, ways to get an inaccurate representation of FF=0 and level curves, via curve-fitting or what have you). But it's not clear that hardware double-precision is adequate.

You should explain exactly what kind of plot you're trying to get. And you should state outright what floating-point tolerance (allowed error or inaccuracy) you are willing to accept. Otherwise  don't see how answers to this are very meaningful.

For all we know, the imaginary components of your expression FF (which are indeed quite small) could be just numeric noise, induced by innaccurate float coefficients due to inadequate earlier rounding, etc, and whose 3D surface plot is smooth merely by their occurence within exp subterms. We wouldn't be able to judge, in this absence of background details.

The worksheet has a default Numeric Formatting set applied to it. (This is indicated in the left-margin if the GUI setting to reveal such Markers is toggled, in the Options.)

Can we see one of your problematic worksheets? Can we see the sheet you used to set a style-sheet?

In a previous question you mentioned upgrading to Maple 2025. Here you mention Maple 2023. It's unclear (as yet) what version you're using for each of your comments and sentences.

A variant in which the value command can turn similar such beasts  -- that print like these colored names -- into the actual true/false, making then more direcly programmatically useful.

Download color_Q2.mw

I think that this may be mostly workable/safe, since procs that clobber the original names have spec-eval-rules. Maybe not so much, though I haven't checked. In any event I find it fun.

@Math-dashti Why didn't you tell us what you really wanted when you first posted the Question?

Do you believe that there are explicit solutions other than,

   u = 1, v = 2*Pi*n + Pi    with n::integer
   u=-1, v=0

@vv 

restart

puzzle := sum(cos(k*Pi/(2*n+1))^4, k = 1 .. n)

simplify(expand(convert(puzzle, exp)))

(3/8)*n-5/16

`assuming`([simplify(evala(expand(convert(puzzle, exp))))], [n::posint])

(3/8)*n-5/16

The expanded exp terms turn into this kind of thing,
which can be manipulated using evala (and pose extra
difficulties for simplify).

expand(exp((n + 1)*Pi*I/(2*n + 1))) assuming n::posint;

(-1)^(n/(2*n+1))*(-1)^(1/(2*n+1))

Download sum_ex05b.mw

Playing around with the intermediate expressions led me to this gem, in which a remembered result can interfere with (or help!) a simplification. I will submit a separate bug report for this item.

restart;

hmm := (-(-1)^((2 - 2*n)/(2*n + 1)) + (-1)^((4 + 2*n)/(2*n + 1)))/(4*(-1)^(4/(2*n + 1)) - 4);

(-(-1)^((2-2*n)/(2*n+1))+(-1)^((4+2*n)/(2*n+1)))/(4*(-1)^(4/(2*n+1))-4)

simplify(hmm);

0

new := (-4*(-1)^((2 - 2*n)/(2*n + 1)) + 4*(-1)^((4 + 2*n)/(2*n + 1)) + (-5 + 6*n)*(-1)^(4/(2*n + 1)) - 6*n + 5)/(16*(-1)^(4/(2*n + 1)) - 16):

whoa := evala(new - ((3*n)/8 - 5/16));

-(1/4)*((-1)^(-2*(-1+n)/(2*n+1))-(-1)^(2*(2+n)/(2*n+1)))/((-1)^(4/(2*n+1))-1)

simplify(whoa);

0

simplify(hmm);

0

restart;

hmm := (-(-1)^((2 - 2*n)/(2*n + 1)) + (-1)^((4 + 2*n)/(2*n + 1)))/(4*(-1)^(4/(2*n + 1)) - 4);

(-(-1)^((2-2*n)/(2*n+1))+(-1)^((4+2*n)/(2*n+1)))/(4*(-1)^(4/(2*n+1))-4)

#simplify(hmm);

new := (-4*(-1)^((2 - 2*n)/(2*n + 1)) + 4*(-1)^((4 + 2*n)/(2*n + 1)) + (-5 + 6*n)*(-1)^(4/(2*n + 1)) - 6*n + 5)/(16*(-1)^(4/(2*n + 1)) - 16):

whoa := evala(new - ((3*n)/8 - 5/16));

-(1/4)*((-1)^(-2*(-1+n)/(2*n+1))-(-1)^(2*(2+n)/(2*n+1)))/((-1)^(4/(2*n+1))-1)

simplify(whoa);

(-(-1)^((2-2*n)/(2*n+1))+(-1)^((4+2*n)/(2*n+1)))/(4*(-1)^(4/(2*n+1))-4)

simplify(hmm);

(-(-1)^((2-2*n)/(2*n+1))+(-1)^((4+2*n)/(2*n+1)))/(4*(-1)^(4/(2*n+1))-4)

 

 

Download bug01.mw

In one variant I saw an instance of simplify(foo) fail while simplify(simplify(foo)) succeeded, though it's hard to reproduce because it too seemed to depend on previous computations. More fun than a barrel of monkeys.

@Alfred_F I don't understand what you're trying to convey with, "...is made again and again ..., the simple result term (6*n-5)/16 no longer occurs; the calculation stops before it."

That is, I can't tell whether you're saying it never worked for you, or that it only worked once, or something else.

But I do see now that the simplification command that I gave (and also the one that dharr gave) might succeed in Maple 2025.1 but not in older Maple 2024.

Here is a variant that works in my Maple 2024.2.

restart;

kernelopts(version);

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

puzzle := sum(cos(k*Pi/(2*n + 1))^4, k = 1 .. n):

simplify(convert(expand(simplify(convert(puzzle, exp))),exp))

(3/8)*n-5/16

Download sum_ex05_M2024.mw

ps. In even older versions of some years ago it may have been harder still to get this one. The `simplify` command is improving, over time. I reported the weakness (that simplify alone didn't get the simple result) yesterday.

Maple 2025.1,

restart

puzzle := sum(cos(k*Pi/(2*n+1))^4, k = 1 .. n)

simplify(expand(convert(puzzle, exp)))

(3/8)*n-5/16

Download sum_ex05.mw

(I'll submit a report, against simplify.)

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