At school and in all my math books from school (all the way from elementary to high school), the only kind of parenthesis which I have seen used to control the order of operations (like how the parenthesis in $(a+b)\cdot c$ makes the addition come before the multiplication) has been the curved ones: '(' and ')', whereas the box-shaped parenthesis: '[' and ']' only has been used to indicate intervals (like this $[42;\infty[$).
But in the (mostly college/university level) physics and mathematics material I have found on the internet and read on my own, I often find that the box parenthesis is used instead of the curved parenthesis, where my school math book, for instance, would have written something like $(f(x)+g(x))^2$, I find that others have written $[f(x)+g(x)]^2$ (neither examples are directly taken from a specific source, but they show the general difference)
My question is, therefore as follows: if both kinds of parenthesis are equally valid, why do my math books consequently use only the one; if the parenthesis are not equally valid, when should I use the one or the other; does this have to do with national conventions (My math books are all Danish, and the other physics/mathematics material I read are English), and finally why did all my schools only teach me to use one specific parenthesis.
As an example, one might write the expectation of the function $f$ of some random variable $X$ as $$\mathbb{E}[f(X)]$$ where the square and curved brackets are alternated here for readability. I often see square brackets used for the outermost association (or even curly brackets) in an expression and curved brackets used within the square brackets (but there is no fixed convention for this).
– David May 16 '17 at 19:01