Bart

107 Reputation

4 Badges

8 years, 32 days

MaplePrimes Activity


These are replies submitted by Bart

@Rouben Rostamian  @vv

pdsolve using a system of 1st order PDEs doesn't seem to work out-of-the-box for a slight modification of example 2 (a discontinuous initial condition):

bc:={ u(0,t)=0, u(1,t)=1, u(x,0)=2*Heaviside(x-0.5) }:

while Rouben's solution does.

@rstellian 

As @acer indicated, for Maple 2016 one cannot use stylesheet. The following command, using a thickness of 0.1 instead of 0, makes the edges even thinner than given in acer's solution:

P:=DrawGraph(G):
subsindets(P, specfunc(THICKNESS), ()->THICKNESS(0.1));

 

From Maple 2015 onwards one can use Physics[Assume] instead of assume. This will resolve it:

with(Physics):

expr1:=sqrt(a);
Assume(a>0)
;
expr2:=sqrt(a);
Assume(additionally, a>1);
subs(a=2, expr1); #gives correct answer: sqrt(2)
subs(a=2, expr2); #now also gives correct answer: sqrt(2)

@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.

1 2 Page 1 of 2