Bart

100 Reputation

4 Badges

7 years, 362 days

MaplePrimes Activity


These are replies submitted by Bart

@ecterrab 

Thank you very much again for the really quick fix.

@Preben Alsholm 

This still seems to be wrong (also in Maple 2018), because multi-dimensional indexing works differently in Python (https://scipy-cookbook.readthedocs.io/items/Indexing.html#Elements).

The correct output would need to be

import numpy
def QLoc():
    Q = numpy.mat([[0,0],[0,0]])
    Q[0, 0] = 0.1e6
    Q[1, 1] = 0.1e5
    Q[0, 1] = 0.1e4
    Q[1, 0] = 0.1e4
    return(Q)

@Mac Dude 

Thanks. This is a valid workaround, but the quality is less and available options are much more restricted. For example, a table of contents is not possible with this. I prefer to have the eBookTools working properly.

Looks like it is fixed in Maple 2017.

@pake Did you try it out?

It is working in Maple 2017, thanks for the fix.

The problem is still present in Maple 2017. Some of the integrals can be calculated correctly using the piecewise representation of the Heaviside function (similar to using the aforementioned option method=ftoc).

convert(Heaviside(z),piecewise)
H(z):= piecewise(z < 0, 0, z = 0, undefined, 0 < z, 1)
int(Heaviside(-x^2-y^2+1), x = 0 .. 1, y = 0 .. 1) # Gives incorrect -pi/4
int(H(-x^2-y^2+1), x = 0 .. 1, y = 0 .. 1) # Gives correct pi/4
int(H(-x^2-y^2+1), x = 0 .. infinity, y = 0 .. 1) # Gives correct pi/4
int(H(-x^2-y^2+1), x = 0 .. infinity, y = 0 .. 2) # Gives undefined

@DJ Clayworth 

Not sure what kind of problems the OP had exactly in mind, but in Maple 2016

loglogplot(exp(-t))

shows an upshoot near 1e-5 and

loglogplot(exp(-t),t=1e-5..1e5)

shows a flat region near t=1e3..1e5

@ecterrab Thanks a lot for the really quick bug fix.

@Preben Alsholm Thank you for confirming this and submitting the bug report.

@vv and @acer Thanks for simplifying and filing the bug! I should have done so myself.

@Markiyan Hirnyk 

I just did, thank you for the suggestion.

Thanks, that answers all my questions on this issue (can't vote up :). As is demonstrated in the convert,local help: what you see is not what you might think naively (i.e., a is not necessarily equal to a).

Thanks, that answers all my questions on this issue (can't vote up :). As is demonstrated in the convert,local help: what you see is not what you might think naively (i.e., a is not necessarily equal to a).

Kamel, thank you for your response.

So if I understand correctly, there is no way to change the 'a' in expr2 to a certain value, if one changes the assumptions of 'a' after defining expr2? Hence one must make all assumptions either before or after an expression but not both before and after? It becomes an inaccesible local variable otherwise? Or is there any other way to still have access to it (I seem to be missing the underlying reason for this behaviour)?

The reason that I used the assumptions in a flexible way is that I started with a general case and then make more and more assumptions as I go along to get to a specific case.

1 2 Page 1 of 2