mmcdara

4862 Reputation

17 Badges

6 years, 362 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Markiyan Hirnyk 

Probably nothing with Maple.
But Adam Ledger's post was about induction and acer's answer stressed the difference between inductive reasoning and mathematical induction. Then maybe my comment could have something to do with the post.

Everyone reading a post or a question can adopt different attitudes, from the active support to the "I'll pass, this-question-is-not-for-me stance". 
This is all the more easy than the post refers directly to Maple, which is not the cas here.
But the duty to everyone who engage in a discussion is to be respectful of the others. 

What is the purpose to write "I understood nothing from your post. I find the post useless for me. Who is it aimed at?"
To be clear, ii is not because the post is useless for you that you have to write it this way.
A far more intelligent attitute is to remain silent.

I engage you ro read Wittgenstein and to meditate this ctation of his "Whereof one cannot speak, thereof one must be silent."

With kind regards

@acer 

BTW: I would have like to thumb-up but for some unknown reason it doesn't work.
I'll try later

@acer 

I've just read again the help page about "assume(is)"
In the "Calling Sequence" section it is written  is(x1, prop1);
When you write

is(sin(x)^2+cos(x)^2, 1);

it seems that this must be interpreted as "does sin(x)^2+cos(x)^2 (=x1) has the the property 1 (prop1) ?".
If it is so then
1/ I understand why 

is(1, sin(x)^2+cos(x)^2)

returns an error (in fact the question is stupid)

2/ I understand why is~(A,B) returns a matrix full of "true".

Generally I use "is" only with sthe syntax is(x1::prop1).
Here again (i'm not looking to be right), but  is(x1::prop1) seems a more "rigourous" syntax than is(x1, prop1) is.


I keep finding the  `.` operator is sneaky.
On one side it classicaly denotes  the "dot product" and could confuse people. On the other side, to have been introduced, how much, 25 years ago (?) doesn't mean it has to be maintained. I remember that when Maple 8 appeared a lot of syntaxes became obsolete (I believe to remember that the concatenation operator went from '.' to '||') and there was even an assistant to help updating worksheets.

The last point concerns  overload, the help page of which I've just read.
Probably powerfull but it reminds me those "commmon" an "equivalence" declarations of the past versions of FORTRAN. Very powerfull indeed because they enabled to share the same memory location between different variables.
At least as long as you do not want to use a debugger


As a Maple's specialist you know perfectly how to use correctly all those "borderline" commands. But for many users they look more like booby-traps than safe commands.
More generally, I dream sometimes of a Maple's version where there would be only one syntax to do an operation and not several variants, some obscure. And of course of a version which stops  to keep proposing "small" plot and "capital" PLOT ... a real mess.

But do not take this as a declaration of war.
Despite what I personally consider as defaults, I don't think I could do without Maple.

Thanks for all the time you wasted to deliver me such lenghty answers
 

 

 

@acer 

Thank you acer for this quick and detailed answer.

A few points nevertheless :

1/ "That's what the tilde specifies -- an element-wise application of the is command." ok, I agree, but why is~(A,B) understand that I want to realize  "is A = B element-wise?"
Why is~(A,B) would not mean "is A <> B element-wise?" or  " is A > B element-wise?" ot anything else?
The fact is that "=" is never specifiedat the help pages for "is" don't seem to mention this syntax.
I understand why is~( `=`~(A,B)) works correctly, but I stil don't understand why is~(A,B) does.

2/ I just take a look to coercion. I already heard about the word but never focused on it. I'm not going to pretend I correctly understood the help page but I will do some examples to clarify all of this.

3/ You made me discover the element wise "A . A" for arrays.
I would have written A *~ A for my own (and I think I will keep doing it).
Don't you think that these kind of shortcuts are detrimental to the consistency of Maple ?

4/  What  does "overload" mean in the tdeclaration of the procedure ?

Thanks again

Not the clash of the civilizations nor the one of the ancients and of the moderns, but definitely a dialogue of the deaf.

In 1976 Imrè Lakatos published "Proofs and Refutations" (Cambride Univ. Press), with this subtitle (at least in the french version) 
"An essay about the logic of mathematical discovery".
This is a very fascinating book that a lot of researchers in mathematics teaching have read (but probably not enough).
The distinction between induction and proof is clearly made by Lakatos, but he doesn't reject the the power of the former and its role to move toward the later.

In this book Induction has a sense which, I believe is closer to what I understand from your post, than to the sense Acer is referring to (which is closer to the proof)


Not sure that this comment contributes to increase the mutual comprehension ? 
 

@Carl Love 

Hi Carl, 

to end this discussion, here is a reference book:

The Elements of Statistical Learning, DAra Mining, Inference and Prediction
T. Hastie, R. Tibshirani, J. Friedman
2009, Springer Series in Statistics
2nd edition
https://web.stanford.edu/~hastie/Papers/ESLII.pdf



Paragraph 8.2.2 "Maximum Likelihood Inference"
p 265 : (middle of the page) "Maximum likelihood is based on the likelihood function, given by L(theta; Z) = " (formula 8.11)
The line below "The likelihood [here the term "function" is ommited is defined only up to a positive constant" (which answer your interrogation about 1/sqrt(2*Pi) )
Below "... the logarithm of L(theta; Z) [the likelihood function] .... is called the log-likelihood [not the "log-likelihood function"].
Top of page 266 : "Assuming that the likelihood takes its maximum in the interior ...": strictly speakig the authors should have say "Assuming thet the likelihood function takes ..."

In Statistics, even among its most prominent representatives, "likelihood" is very common shortcut for 'likelihood function".
Which doesn't mean there are right and, I agree that "Upto my understanding of this subject, which is admittedly weak, the likelihood function is only properly defined for distributions with at least one symbolic parameter."

Have a good weekend

@vv 

 

I eventually found a loophole which works with Maple 2016
(not very happy of the colors ...)

 

p := proc(k)
  local M, F:
  M := Matrix(8, 8, (i,j) -> i+j+k mod 3):
  F :=  (i,j) -> `if`(M[i,j]=0, 0.999, 0.25);
  plots[matrixplot](M, heights=histogram, axes=frame, gap=0.25, color=F, orientation=[0, 0, 0], lightmodel=light4)
end proc;

plots[animate](p, [ceil(k)], k=0..3);

 

@vv 

PS : it doesn't work in Maple 16 

Error, invalid input: too many and/or wrong type of arguments passed to Explore; first unused argument is k = 0 .. 8

No problem, I'm going to palm my spouse's Mac (it uses Maple 2017 :-) )

 

@vv 
(yes, I'm sand15, now at home for a long weekend)

Thanks for your answer.
I have unsuccessfully tried to use Explore. But looking to your answer shows me I didn't do the things correctly anyway.

I will try your solution during my rest time.
Have a good weekend too

The attached file contains a short comparison of the performances between different ways to do the same operation.
It uses the package CodeTools, a package I often uses to (try to) do efficient coding 

Could_help_adds.mw

@Carl Love 

Maybe.

Concerning the error the OP gets 

Error, (in pr) unable to evaluate 5-A[2] to floating-point

it comes from the fact that each A[i] is a random variable, thus N-n-add(A[j], j=1..i-1) has no sense (note the OP has written A[i] which, I guess, is a typo error).

I don't understand the meaning of r[1] := convert(BinomialRandomVariable(N-n,P),`+`);
If the OP wants to declare r[1] as a Binomial RV, r[1] := BinomialRandomVariable(N-n,P); is sufficient.

Following your idea, maybe the line  A[i-1] := convert(r[i-1], `+`)  should be replaced by A[i-1] := Sample(r[i-1], 1)[1] ???

Then I wonder if the OP wouldn't want to generate a random walk ?

But for sure, some clarification is required.

 

 

 

@vv 

Very astute indeed!

@vv 

This is why I titled my reply "a few funny things": I had no claim to give a definitive solution :-)

You write " sqrt(b)/b = 1/sqrt(b)  is valid  for any complex (nonzero) b."  ... sure, what was I thinking? :-(

A few funny things ...

six=b.mw

@Rouben Rostamian   @vv

 

Dear Rouben, 
This question has already been asked, and partially adressed two days ago.

vv did a lot of work on the subject and pointed that the solution returned by pdsolve (of course an infinite serie) didn't seem to verify all the BCs; a point I confirmed.
I suggested to modify the original problem by writtin u = v + phi where phi was a function that verifies the BCs: then v is the solution of a Poisson problem with homogenous Dirichlet BCs.
vv answered that pdsolve, applied on this "v-problem" then seemed to return the correct answer.

Your approach is interesting and is related to some method to build the Green function of the laplacian over the unit square.

I was too lazzy to do the full developments and I used directly the series representation of this Green function.
I have thought to send this modest contribution to the thread of the initial question.
Maybe you will be more interested by it? So you can give a look to the attached file.

GreenFunction.mw

PS: you wrote "I will solve the PDE in the domain 0 < x and x < 1, 0 < y and y < 1.  Solving in a general rectangular domain is no more difficult" ... in the reference given in the attached file you will find how to solve the PDE in a rectangular domain of arbitrary length and width.

 

First 96 97 98 99 100 101 102 Last Page 98 of 106