mmcdara

7891 Reputation

22 Badges

9 years, 52 days

MaplePrimes Activity


These are questions asked by mmcdara

This isn't the first time that I've seen a question that doesn't seem to have received a comment or answer, but which, when I click on the question title, turns out to have received one.
Here's the opposite phenomenon: a question appears to have two comments or answers, but none of them exist (9:38 GMT+1)

Screen capture from the main page

Screen capture from the question page

I would like to define a binary operator, let's say T, such that `T`(a, b) be displayed a T b.

Is this possible in Maple (preferably 2015 [define doesn't have a 'binary' property], but a solution for any higher version would be welcome)?

Example

restart;

`union`(a, b);

`union`(a, b)

(1)

alias(`#mo("≅")` = `union`):
`union`(a, b);  

`#mo("≅")`(a, b)

(2)

# desired:
`#mrow(mo("a"),mo(" "),mo("≅"),mo(" "),mo("b"))`

`#mrow(mo("a"),mo(" "),mo("≅"),mo(" "),mo("b"))`

(3)
 

 

Download binary_operator.mw

Thanks in advance

I think the worksheet below is enough to define the problem I'm facing.

(question updated by adding a simple 2D case ; the expected value is about 0.67684)

restart

# How can I define CharFunc so that int(CharFunc, x=...) gives me the expected value?
#
# Motivation:
# Let Dom some 2D domain and Env another 2D domain which contains Dom.
# The interior of Dom is defined by a sequence L(x, y) of inequalities.
# The area of Dom can be expressed by the integral over Env of the characteristic function
# CharFunc(x, y) of Dom which returns 1 if (x, y) belongs to Dom and 0 otherwise.
#
# Here is a simple 1D example


CharFunc := proc(x)
  if x::numeric then
    piecewise(is(And(x >= 0, x <= 1)), 1, 0)
  else
    'procname( _passed )'
  end if:
end proc:


Env := -1..2:
plot(CharFunc(x), x=Env, thickness=5);

 

# Expected value = 1

int(CharFunc(x), x=Env);

int(CharFunc(x), x = -1 .. 2)

(1)

# Expected value = 1/2

int(CharFunc(x), x=1/4..3/4);

int(CharFunc(x), x = 1/4 .. 3/4)

(2)


Works with floats

# Expected value = 0.5

int(CharFunc(x), x=0.25..0.75);

.5000000000

(3)

# Expected value = 1

int(CharFunc(x), x=-1.0..2.0);

1.000000000

(4)


2D example

Env := x=0.8..3, y=0..1.3;

x = .8 .. 3, y = 0 .. 1.3

(5)

Dom := proc (x, y) options operator, arrow; And(y <= 1/(1+sinh(2*x)*ln(x)^2), .8 <= x, x <= 3, 0 <= y, y <= 1.1) end proc

proc (x, y) options operator, arrow; And(y <= 1/(1+sinh(2*x)*ln(x)^2), .8 <= x, x <= 3, 0 <= y, y <= 1.1) end proc

(6)

CharFunc := proc(x, y)
  piecewise(is(Dom(x, y)), 1, 0)
end proc:

plot3d(
  [0, 'CharFunc'(x, y)], Env
  , grid=[40, 40]
  , style=surface, color=[gray, blue], transparency=[0, 0]
  , title=typeset('CharFunc'(x, y))
);

 

int(CharFunc(x, y), Env)

0.

(7)
 

 

Download Integration_issue.mw

Thanks in advance


Does any one have any idea to demonstrate, using Maple, that for any couple (a, b) of strictly positive integers

(a*b)! / (a! * (b!)^a) 

is an integer?

It's becoming increasingly common for questions to be deleted, the most frequently evoked argument being that they duplicate earlier questions.
Usually it's the author of the question who complains, in this case it's the one who provided an answer.

I've always found this self-given freedom on the part of moderators somewhat inappropriate, especially given that these deletions are done on the sly, without even the courage to be explicitly claimed by their authors.

Couldn't these latter take the time to leave a message indicating what they've just done (and why) and where the deleted question, and any exchanges associated with it, can be found?
Otherwise, this attitude is more akin to contempt and censorship than to real management of this blog.

A few years ago, when I came to this site, these deletions were the exception and I can only deplore the fact that they have become commonplace.
They say that life is better elsewhere, I don't know, but what I do know is that I've never come across this on any Scilab, R, SageMath or OpenTurns user's blog.

Anyway, here's the reply I sent to @salim-barzani :  Hirota_derivative_KdV_equation.mw

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