I hate math notation!

Please compose all posts in Emacs.

Moderators: phlip, Prelates, Moderators General

I hate math notation!

Postby HarvesteR » Tue Dec 07, 2010 11:43 pm UTC

There I said it. :wink:

(Don't know if this is the proper fora for this thread, but it seemed like fuel for flame, so I thought it'd go best here)

So where was I... oh right, I hate math notation!

The usual form of writing formulas and equations is very cryptic and hard to understand for the non initiated... All those greek letters and the usual jargon that accompanies it makes for very convoluted reading.

Ok, now, before everyone starts pointing out my mathematical ignorance, let me say this:

I'm not bashing the way math is written just for the sake of doing so... I just want to say that there are other ways of writing math that are much easier to read... namely, pseudo code notation.

Why does a division operation need to look so vastly different from all other operators? Why can't it be a slash, as used in pseudo code?
Why is it alright to completely omit the multiplication operator? No compiler in it's right mind would let you get away with that.
Why do mathematicians need to use single letter variables? From a programmer's standpoint, that is terrible coding style.

For me, it is much much easier to read and understand this:
Code: Select all
      deg = rad * 180 / PI;

      or this:

      (-b + sqrt( b^2 - 4*(a*c))) / 2 * a;


than this:
deg = rad \cdot {180 \over \pi}

or this:
{-b + \sqrt{b^2 - 4ac} \over 2a}



Ok, rant over... now let me make my excuses:

I know there must be a terribly good reason for this, and that most will argue that I should just learn to read/write math and all that... That is not the point of this thread.

What I mean is that math is downright scary for most students (and most people) because it is normally presented in a way that makes a terrible first impression.
When I was a kid I didn't even bother trying to make sense of it... I just shied away from it because it seemed incomprehensible... now I wish I had made a bigger effort, but I reckon at the time none of it seemed to matter (one could also accuse grade school teachers of not generating enough interest, but let's not get into that).

Even now, my first instinct when I encounter some formula written like that is just to skim over it...
I wonder if math as a school subject wouldn't have much greater acceptance if it was presented in a way that was easier to grasp at first contact.

Am I alone thinking this? Or does anyone else agree (or at least understands where I'm coming from)?

Ok, I'm done now... flame away.

Cheers
The next sentence is the truth. - The previous sentence is a lie.
User avatar
HarvesteR
 
Posts: 64
Joined: Mon May 10, 2010 1:13 pm UTC

Re: I hate math notation!

Postby masher » Tue Dec 07, 2010 11:53 pm UTC

HarvesteR wrote:Why does a division operation need to look so vastly different from all other operators? Why can't it be a slash, as used in pseudo code?

Which division operator? are you talking about the horizontal line? That is a formalised slash (/). Are you talking about ÷? It's just a convention. You can make the same argument about psuedocode; why does "/" represent division? Why can't I write HYPOTENUSE IS GIVEN BY SQUARE ROOT OF THE SUM OF SIDE_ONE MULTIPLIED BY SIDE_ONE AND SIDE_TWO MULTIPLIED BY SIDE_TWO? (Did I just reinvent COBOL?)

At some point in time, you're going to have to make a call on what you can turn into a symbol and what form that symbol takes.

HarvesteR wrote:Why is it alright to completely omit the multiplication operator? No compiler in it's right mind would let you get away with that.

Why not?

I use a scripting language that supposes that two variables given together in an equation that are separated by a space are being multiplied.

ie the two lines below are equivalent
Code: Select all
a = b c
a = b * c


It's not that hard to say a "missing" operator is the same as a multiplication.

What about this:
Code: Select all
"string" + 1

I'm pretty sure it's valid javascript. How can I add a string to an integer?



HarvesteR wrote:Why do mathematicians need to use single letter variables? From a programmer's standpoint, that is terrible coding style.

Single letter variables can also have convention defining their use (\theta is usually an angle) and can also be defined in figures and such.

HarvesteR wrote:For me, it is much much easier to read and understand this:
Code: Select all
      (-b + sqrt( b^2 - 4*(a*c))) / 2 * a;


or this:
{-b + \sqrt{b^2 - 4ac} \over 2a}


No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean {\frac{-b + \sqrt{b^2 - 4ac}}{2a}} or does it mean {\frac{-b + \sqrt{b^2 - 4ac}}{2}}a

They will give very different results.
masher
 
Posts: 822
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

Re: I hate math notation!

Postby Thesh » Wed Dec 08, 2010 5:09 am UTC

masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean {\frac{-b + \sqrt{b^2 - 4ac}}{2a}} or does it mean {\frac{-b + \sqrt{b^2 - 4ac}}{2}}a

They will give very different results.


That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

(-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a

The equation you are looking for is this:

x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}


Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.
Big are getting bigger and hearts are getting harder, an imaginary game
eating at every living thing, a voice dripping with sarcasm like a bloody fat slash
grinning over bleached white-fang teeth that glow like green warning signs of sickness.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 3581
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: California, Southern USA

Re: I hate math notation!

Postby masher » Wed Dec 08, 2010 5:24 am UTC

Thesh wrote:
masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean {\frac{-b + \sqrt{b^2 - 4ac}}{2a}} or does it mean {\frac{-b + \sqrt{b^2 - 4ac}}{2}}a

They will give very different results.


That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

(-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a

The equation you are looking for is this:

x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}


Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.


Are you chastising me or the OP? Relying on order of operations to differentiate between multiplication and division isn't that good a practice...
masher
 
Posts: 822
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

Re: I hate math notation!

Postby Thesh » Wed Dec 08, 2010 5:45 am UTC

First part you, second part OP. Good practice or not, it's not accurate to say it's ambiguous.
Big are getting bigger and hearts are getting harder, an imaginary game
eating at every living thing, a voice dripping with sarcasm like a bloody fat slash
grinning over bleached white-fang teeth that glow like green warning signs of sickness.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 3581
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: California, Southern USA

Re: I hate math notation!

Postby HarvesteR » Wed Dec 08, 2010 3:48 pm UTC

masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean {\frac{-b + \sqrt{b^2 - 4ac}}{2a}} or does it mean {\frac{-b + \sqrt{b^2 - 4ac}}{2}}a

They will give very different results.


Yeah, I see my mistake there, sorry, it should have been

(-b + sqrt(b^2 - 4*(a*c))) / (2*a)

I like the parentheses, even if they are redundant, it makes for unambiguous operation precedence... I've become quite used to matching them by eye.

And no, I wasn't really looking for that particular equation... it was just an example, from which I removed the plus-minus sign for simplicity.


About the division operator, I do mean the \over sign. Personally I think it makes everything unnecessarily convoluted. I'd much rather read the entire equation on a single line.

About the multiplication thing, 'why not?' isn't really the straight answer I was looking for... I really want to know why at some point mathematicians decided that it was ok to omit it. It could just as well have been any other operation... why multiplication in particular?


And about the single letter variables, I know many have an use attached to them, as your angle example, and that's based on convention... On the other hand, calling your variable 'angle' would produce the same effect, with much more readability.


What I really was looking for from this post was some kind of explanation of WHY math is written the way it is... maybe there is a good logical reason, maybe it's like that because just because it's been like that for centuries... I really don't know... I was hoping to learn something from this.

Cheers
The next sentence is the truth. - The previous sentence is a lie.
User avatar
HarvesteR
 
Posts: 64
Joined: Mon May 10, 2010 1:13 pm UTC

Re: I hate math notation!

Postby Dason » Wed Dec 08, 2010 4:44 pm UTC

HarvesteR wrote:
masher wrote:What I really was looking for from this post was some kind of explanation of WHY math is written the way it is... maybe there is a good logical reason, maybe it's like that because just because it's been like that for centuries... I really don't know... I was hoping to learn something from this.

I know that if I'm working with an angle (or multiple angles) I sure as hell don't want to write (angle) or (angle1) every time I want to refer to that. That would make some of the really messy equations even messier and it would take A LOT longer to write. The convention of using theta to represent an angle makes life a lot easier in that case. Also it makes it a lot easier if by convention variables are a single letter/symbol because then we can use that other convention of omitting the multiplication sign every time. Why multiplication? Because we work with it a lot

Really, it just makes life easier and if you are working with it enough it makes it faster to read and write.

Also I happen to much prefer the \over \frac version of fractions. It makes it a lot easier (in my mind) to decipher which part is the numerator and which is the denominator and it makes it a lot easier to work with manipulating things. It's easier (to me) to see what cancels (if anything). If I'm multiplying a bunch of these fractions together I can just connect the horizontal bars and it's the same thing. If I were to use your notation it would require quite a bit of rearrangement. Typically notations and conventions come into play because they make our lives easier.
double epsilon = -.0000001;
User avatar
Dason
 
Posts: 1293
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: I hate math notation!

Postby RebeccaRGB » Sat Dec 11, 2010 8:50 pm UTC

HarvesteR wrote:And about the single letter variables, I know many have an use attached to them, as your angle example, and that's based on convention... On the other hand, calling your variable 'angle' would produce the same effect, with much more readability.

Single-letter variables are not only easier to read and write, but they eliminate (or at least reduce) the localization problem. If you called your variable 'angle,' you would have to translate the variable name when someone who doesn't know English wants to use your formula. Most mathematicians don't want to have to memorize the word for 'angle' in a dozen languages. By standardizing on θ for 'angle,' mathematicians can know what that means no matter what languages they speak. It's along the same lines as why we write '7539' instead of 'seven thousand five hundred thirty nine.'

Damian: You're taking 12th grade calculus!?
Cady: Yeah, I like math.
Damian: Eww. Why?
Cady: Because it's the same in every country.
Damian: That's beautiful. This girl is deep.
Stephen Hawking: Great. The entire universe was destroyed.
Fry: Destroyed? Then where are we now?
Al Gore: I don't know. But I can darn well tell you where we're not—the universe!
User avatar
RebeccaRGB
 
Posts: 336
Joined: Sat Mar 06, 2010 7:36 am UTC
Location: Lesbians Love Bluetooth

Re: I hate math notation!

Postby phlip » Mon Dec 13, 2010 11:42 pm UTC

On the topic of implied multiplication, it's because that's the way English works. You can have, say, "an apple", but then you can have "five apples" which is five times as much, the implied multiplication expanding to "five times (an apple)". When you have a modifier of the form "n xs" for any number n and any object x, it's an implied scalar multiplication. And this goes into maths-in-English too, with things like "three sixes makes eighteen".

Also, because of the standard order-of-operations, it's common to write things in a sum-of-products form, and implicit multiplication makes the grouping more obvious... with "a + b * c" you need to look at the symbols, remember what they mean, and how tightly they group, before you know that the b and c are grouped together more tightly than the a. Sure, you can do this very quickly with practise, but it still takes that extra fraction of a second for each formula that uses both, which is most of them. Compare that to "a + bc", where it's instinctively obvious that the b and c are more tightly bound. I'll often approximate this in code as "a + b*c", mixing up the spacing to show the grouping. Of course then I'll see code that looks like "a+b * c" and get thrown off-kilter...
While no one overhear you quickly tell me not cow cow.
but how about watch phone?
User avatar
phlip
Restorer of Worlds
 
Posts: 7145
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Re: I hate math notation!

Postby ImTestingSleeping » Tue Dec 14, 2010 6:28 am UTC

I don't believe the examples of mathematical notation you (the OP) have given are poor at all. In fact, I think your examples are rather flip-flopped, with the code being much more confusing than the typeset. However,there certainly are examples of mathematical notation which I consider unfortunate in their acceptance among the academic community.

Off the top of my head:

1) Basically the ENTIRE field of Probability/Statistics has HORRIBLE notation. In particular, there's like 6 different uses of \mu.

2) arcsin(x) is often written as sin^{-1}(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin^{2}(x) is the accepted notation for (sin(x))^2. Shouldn't sin^{-1}(x)=\frac{1}{sin(x)}?

3) Similar issues with f^{-1}(x) being the notation for the inverse of f(x). I never liked that notation.

4) In most calculus textbooks,log(x) implies log_{10}(x). However, most analysis textbooks I've come across use log(x) when they really mean ln(x). This infuriates me. :D
User avatar
ImTestingSleeping
 
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

Re: I hate math notation!

Postby phlip » Tue Dec 14, 2010 6:42 am UTC

ImTestingSleeping wrote:3) Similar issues with f^{-1}(x) being the notation for the inverse of f(x). I never liked that notation.

I think it's a reasonable notation along with functional powers, ie f2(x) = f(f(x)), etc... f-1(x) being an inverse fits well with that.

I'll agree that it doesn't fit well with sin2(x) = sin(x)2, which I always thought was odd... though I guess there's no real use for functional powers of trig functions (outside \lim_{n -> \infty} \cos^n(x) = 0.739... of course). But I'll agree that when I was learning trig I did confuse sin-1 with csc and cos-1 with sec on more than one occasion...
While no one overhear you quickly tell me not cow cow.
but how about watch phone?
User avatar
phlip
Restorer of Worlds
 
Posts: 7145
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Re: I hate math notation!

Postby ImTestingSleeping » Tue Dec 14, 2010 7:00 am UTC

phlip wrote:
ImTestingSleeping wrote:3) Similar issues with f^{-1}(x) being the notation for the inverse of f(x). I never liked that notation.

I think it's a reasonable notation along with functional powers, ie f2(x) = f(f(x)), etc... f-1(x) being an inverse fits well with that.

I'll agree that it doesn't fit well with sin2(x) = sin(x)2, which I always thought was odd... though I guess there's no real use for functional powers of trig functions (outside \lim_{n -> \infty} \cos^n(x) = 0.739... of course). But I'll agree that when I was learning trig I did confuse sin-1 with csc and cos-1 with sec on more than one occasion...


I suppose it isn't as bad as I thought... I'm not sure why it came to mind. I have to admit that mathematicians generally do a very good job of handling notation, considering the amazing amount of it one encounters throughout their studies in the field. For instance, one thing that came to mind when reading your post is that the third derivative of f(x) could be written f^{(3)}(x) which avoids confusion with f^{3}(x). Little things like that allow us to maintain optimum laziness while still being clear.
User avatar
ImTestingSleeping
 
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

Re: I hate math notation!

Postby Dason » Tue Dec 14, 2010 10:35 am UTC

ImTestingSleeping wrote:
1) Basically the ENTIRE field of Probability/Statistics has HORRIBLE notation. In particular, there's like 6 different uses of \mu.

May I ask what you think the 6 different uses are?
double epsilon = -.0000001;
User avatar
Dason
 
Posts: 1293
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: I hate math notation!

Postby ImTestingSleeping » Tue Dec 14, 2010 2:39 pm UTC

Dason wrote:
ImTestingSleeping wrote:
1) Basically the ENTIRE field of Probability/Statistics has HORRIBLE notation. In particular, there's like 6 different uses of \mu.

May I ask what you think the 6 different uses are?


6 was certainly a generous exaggeration. :D

1) Expected value/population mean
2) Often used as a parameter in distributions (off the top of my head, Laplace Double Exponential)
3) I've also seen it used to notate a moment generating function
User avatar
ImTestingSleeping
 
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

Re: I hate math notation!

Postby Dason » Tue Dec 14, 2010 4:14 pm UTC

Fair enough. But even in the second situation it's typically only use a location parameter and typically only when that parameter also specifies the mean in some sense. This isn't strictly always the case (in the lognormal distribution mu alone doesn't specify the mean but it does specify the mean of the normal distribution before the transformation to lognormal). I've never seen it as referring to the moment generating function itself but I have seen it used where \mu_r denoted E[X^r] when defining other possible forms for the MGF.

I'm not trying to say that the field has good notation in most situations. A lot of it bugs me. But I've never had too much of a problem with mu in particular.
double epsilon = -.0000001;
User avatar
Dason
 
Posts: 1293
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: I hate math notation!

Postby ++$_ » Tue Dec 14, 2010 9:43 pm UTC

Mathematical notation is designed to make it as easy as possible to read a whole expression at once (including determining the order of operations, figuring out what "kind" of expression it is, and so on). It is not designed to be compiled, because people are not compilers.

That is why we have horizontal bars to represent fractions and little houses to represent square roots and so on. Your example (where you got the quadratic formula wrong) shows one reason why this is important. Also, this is the reason that implied multiplication is a good notation -- because it allows us to put things that are being multiplied closer together than things that are being added. Exponentiation binds even tighter because the exponents are even closer to the base than the multiplicands are to each other. For example, in
1 + 2x + 3x^2 + 4x^3,
it is obvious at a glance what is going on. That is not true of
Code: Select all
1 + 2 * x + 3 * x ^ 2 + 4 * x ^ 3.
The notation is designed with reading in mind, rather than with easy typesetting in mind. This is appropriate because any given piece of written material is typeset only once, but read many times. As a consequence, we have lots of big symbols (like \sum and \int), with lots of parts, that scream out to the reader what kind of expression this is. These also put related things close together in one tidy visual package -- in this case, the limits of the summation and the independent variable. The alternative is to write
Code: Select all
sum(n, 1, 100, EXPR)
which is much messier visually (especially if 1 or 100 are replaced by more complicated expressions). However, it is easier to type. That is not the point.
++$_
Mo' Money
 
Posts: 2370
Joined: Thu Nov 01, 2007 4:06 am UTC

Re: I hate math notation!

Postby Xanthir » Tue Dec 14, 2010 11:51 pm UTC

ImTestingSleeping wrote:2) arcsin(x) is often written as sin^{-1}(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin^{2}(x) is the accepted notation for (sin(x))^2. Shouldn't sin^{-1}(x)=\frac{1}{sin(x)}?

3) Similar issues with f^{-1}(x) being the notation for the inverse of f(x). I never liked that notation.

It's sin^{2}(x) that's the offender here. Functional power notation is well-established to mean iterated application or inversion. sin^{2}(x) is dumb, because (sin(x))^2 is a perfectly good representation already.

4) In most calculus textbooks,log(x) implies log_{10}(x). However, most analysis textbooks I've come across use log(x) when they really mean ln(x). This infuriates me. :D

And then in Comp Sci it means log_{2}(x). I'm not a big fan of the context-dependency of the function either, but at least once you learn how a particular context interprets it it's okay.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4287
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: I hate math notation!

Postby Thesh » Wed Dec 15, 2010 12:09 am UTC

We should migrate away from using log(x) without a base specified. There are already standards for shorthand for base 2, e, and 10:

http://en.wikipedia.org/wiki/ISO_31-11# ... _functions
Big are getting bigger and hearts are getting harder, an imaginary game
eating at every living thing, a voice dripping with sarcasm like a bloody fat slash
grinning over bleached white-fang teeth that glow like green warning signs of sickness.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 3581
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: California, Southern USA

Re: I hate math notation!

Postby masher » Wed Dec 15, 2010 2:43 am UTC

Xanthir wrote:
ImTestingSleeping wrote:2) arcsin(x) is often written as sin^{-1}(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin^{2}(x) is the accepted notation for (sin(x))^2. Shouldn't sin^{-1}(x)=\frac{1}{sin(x)}?

3) Similar issues with f^{-1}(x) being the notation for the inverse of f(x). I never liked that notation.

It's sin^{2}(x) that's the offender here. Functional power notation is well-established to mean iterated application or inversion. sin^{2}(x) is dumb, because (sin(x))^2 is a perfectly good representation already.


I, too, believe that \sin^2(x) is a representation of (\sin(x))^2. It did also annoy (the shit out of) me when (in high school), they wrote sin^{-1}(x)* to mean \arcsin(x).

There is also a third notation that I don't like: \sin(x)^2. Its halfway between (sin(x))^2 and sin(x^2). It shits me. If you mean \sin^2(x), then write that, if you mean sin(x^2), then write that!

.

* It follows then, that sin^{-1}(x) should mean \frac{1}{sin(x)}. Why is this referred to as the cosecant? I mean that, sine/cosine and cosecant/secant are both odd/even functions, so why the change in prefix?
masher
 
Posts: 822
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

Re: I hate math notation!

Postby phlip » Wed Dec 15, 2010 2:57 am UTC

masher wrote:Why is [1/sin(x)] referred to as the cosecant? I mean that, sine/cosine and cosecant/secant are both odd/even functions, so why the change in prefix?

Because this. The three main functions, sin, tan and sec, are measurements on right-triangles with theta in the centre of the unit circle. On the other hand, cos, cot and csc are those same measurements with theta being the complementary angle (or, equivalently, the other acute angle in the triangle).

Your odd/even point is a bit weird, because sin being odd and cos being even isn't why one has the co- prefix and the other doesn't... Also, both tan and cot are odd functions. So there isn't exactly a pattern here for sec/csc to break.
While no one overhear you quickly tell me not cow cow.
but how about watch phone?
User avatar
phlip
Restorer of Worlds
 
Posts: 7145
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Re: I hate math notation!

Postby Xanthir » Thu Dec 16, 2010 4:42 am UTC

masher wrote:There is also a third notation that I don't like: \sin(x)^2. Its halfway between (sin(x))^2 and sin(x^2). It shits me. If you mean \sin^2(x), then write that, if you mean sin(x^2), then write that!

This is why the algebra notation for sin^2 is so horrible!

\sin(x)^2 is perfectly fine. It means to square the result of sin(x). sin(x^2) means to take the sine of x2. \sin^2(x) should mean to take the sine of the sine of x, exactly like the power notation on functions means everywhere else.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4287
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: I hate math notation!

Postby masher » Thu Dec 16, 2010 4:58 am UTC

phlip wrote:
masher wrote:Why is [1/sin(x)] referred to as the cosecant? I mean that, sine/cosine and cosecant/secant are both odd/even functions, so why the change in prefix?

Because this. The three main functions, sin, tan and sec, are measurements on right-triangles with theta in the centre of the unit circle. On the other hand, cos, cot and csc are those same measurements with theta being the complementary angle (or, equivalently, the other acute angle in the triangle).

OK. I've never really investigated the origins of the functions in that way

phlip wrote:Your odd/even point is a bit weird, because sin being odd and cos being even isn't why one has the co- prefix and the other doesn't... Also, both tan and cot are odd functions. So there isn't exactly a pattern here for sec/csc to break.

I was just searching for reasons...
masher
 
Posts: 822
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

Re: I hate math notation!

Postby archeleus » Thu Dec 16, 2010 12:12 pm UTC

2) arcsin(x) is often written as sin−1(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin2(x) is the accepted notation for (sin(x))^2. Shouldn't sin^(−1) (x)=1/sin(x)?


Agreed wholeheartedly.

I still just write arcsin and I think the TI-89's function is arcsin() (not sure, haven't touched it in some months).
I write a blog rant here.
archeleus
 
Posts: 243
Joined: Wed Sep 29, 2010 1:49 pm UTC
Location: Valenvaryon

Re: I hate math notation!

Postby ImTestingSleeping » Thu Dec 16, 2010 7:54 pm UTC

archeleus wrote:
2) arcsin(x) is often written as sin−1(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin2(x) is the accepted notation for (sin(x))^2. Shouldn't sin^(−1) (x)=1/sin(x)?


Agreed wholeheartedly.

I still just write arcsin and I think the TI-89's function is arcsin() (not sure, haven't touched it in some months).


Unfortunately, no. Most likely because arcsin(x) is so much longer and it wouldn't fit nicely, but it is still unfortunate. I'd like to see the community stray away from the notation if possible...
User avatar
ImTestingSleeping
 
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

Re: I hate math notation!

Postby Random-person » Sat Jan 08, 2011 1:40 am UTC

Why not use the names used in the standard c math library: asin, acos, atan and so forth?
(by the way, I really hate that math teachers don't know about atan2, eg. an atan function that works with angles >½π ).

Thesh wrote:We should migrate away from using log(x) without a base specified. There are already standards for shorthand for base 2, e, and 10:

http://en.wikipedia.org/wiki/ISO_31-11# ... _functions

TIL about lb... That's brilliant! Though given that I've never ever seen it before, I'm guessing it's very rare?

Right now when I'm writing in ascii (eg. when coding or doing a problem in notepad) I'm using lg for base 10, ln for base e, lg2 for base 2 and completely avoiding log (as nobody knows when the hell it's base 10 and when it's base e).
Random-person
 
Posts: 21
Joined: Mon Dec 13, 2010 1:25 am UTC

Re: I hate math notation!

Postby masher » Sat Jan 08, 2011 2:38 am UTC

Thesh wrote:We should migrate away from using log(x) without a base specified. There are already standards for shorthand for base 2, e, and 10:

http://en.wikipedia.org/wiki/ISO_31-11# ... _functions



Yes! I didn't even know this existed. I will start using it from now.
masher
 
Posts: 822
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

Re: I hate math notation!

Postby Xanthir » Sun Jan 09, 2011 6:33 pm UTC

Random-person wrote:(by the way, I really hate that math teachers don't know about atan2, eg. an atan function that works with angles >½π ).

Why should math teachers know about a C function? What relevance would a programming-language convenience have to math class?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4287
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: I hate math notation!

Postby user2.0 » Wed Jan 12, 2011 1:44 am UTC

Thesh wrote:
masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean {\frac{-b + \sqrt{b^2 - 4ac}}{2a}} or does it mean {\frac{-b + \sqrt{b^2 - 4ac}}{2}}a

They will give very different results.


That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

(-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a

The equation you are looking for is this:

x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}


Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.


But, such a strict reading of the order of operations gives 3-2+1=0 since the addition must happen first, where as most people would say 3-2+1=2. I counter that the ambiguity of such things as 6 \div 2 * 3 stands.
user2.0
 
Posts: 3
Joined: Wed Jan 12, 2011 1:26 am UTC

Re: I hate math notation!

Postby Robert'); DROP TABLE *; » Wed Jan 12, 2011 5:45 pm UTC

user2.0 wrote:But, such a strict reading of the order of operations gives 3-2+1=0 since the addition must happen first, where as most people would say 3-2+1=2. I counter that the ambiguity of such things as 6 \div 2 * 3 stands.

3-2+1=2 no matter which way you parse the operators. It's not equivalent to 3-(2+1), but 3+(-2+1).
...And that is how we know the Earth to be banana-shaped.
User avatar
Robert'); DROP TABLE *;
 
Posts: 672
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Re: I hate math notation!

Postby Dason » Wed Jan 12, 2011 5:50 pm UTC

Robert'); DROP TABLE *; wrote:
user2.0 wrote:But, such a strict reading of the order of operations gives 3-2+1=0 since the addition must happen first, where as most people would say 3-2+1=2. I counter that the ambiguity of such things as 6 \div 2 * 3 stands.

3-2+1=2 no matter which way you parse the operators. It's not equivalent to 3-(2+1), but 3+(-2+1).

I could have swore I replied to this earlier this morning... What the poster doesn't understand is that addition and subtraction have the same priority in the order of operations. They do think that it's equivalent to 3-(2+1) because they think + has a higher precedence over -. This is clearly wrong though and wikipedia agrees.
double epsilon = -.0000001;
User avatar
Dason
 
Posts: 1293
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: I hate math notation!

Postby user2.0 » Thu Jan 13, 2011 3:48 am UTC

Dason wrote:... addition and subtraction have the same priority in the order of operations. They do think that it's equivalent to 3-(2+1) because they think + has a higher precedence over -....[/url]


That was my point, but about division and multiplication. Most people would have 6 \div 2 * 3=9 (i.e. just work left to right), whereas Thesh would have 6 \div 2 * 3=1 (i.e. multiplication first and then division).

I was attempting to point out the flaw of Thesh's reasoning for a lack of ambiguity in a/b*c (namely that multiplication must happen before division and thus a/b*c must be equal to a/(bc) and not ac/b as normal) by creating an absurdity using similar reasoning.
user2.0
 
Posts: 3
Joined: Wed Jan 12, 2011 1:26 am UTC

Re: I hate math notation!

Postby Thesh » Thu Jan 13, 2011 11:06 am UTC

Uhh... Where did I say that?
Big are getting bigger and hearts are getting harder, an imaginary game
eating at every living thing, a voice dripping with sarcasm like a bloody fat slash
grinning over bleached white-fang teeth that glow like green warning signs of sickness.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 3581
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: California, Southern USA

Re: I hate math notation!

Postby user2.0 » Thu Jan 13, 2011 8:18 pm UTC

Thesh wrote:
That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

(-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a

The equation you are looking for is this:

x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}


Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.


Did I misinterpret what you are saying here? If so, sorry.
user2.0
 
Posts: 3
Joined: Wed Jan 12, 2011 1:26 am UTC

Re: I hate math notation!

Postby Xanthir » Thu Jan 13, 2011 8:47 pm UTC

You must be, because in that post Thesh is saying exactly what everyone else here is - "a / b * c" is different from "a / (b * c)", because in the first one you have to evaluate the division first.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4287
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: I hate math notation!

Postby user2.0 » Thu Jan 13, 2011 9:05 pm UTC

Seems I'm failing reading comprehension lately. :oops:

Again, I apologize for misquoting you, Thesh.
user2.0
 
Posts: 3
Joined: Wed Jan 12, 2011 1:26 am UTC

Re: I hate math notation!

Postby Darryl » Sun Jan 23, 2011 12:16 am UTC

HarvesteR wrote:
Code: Select all
      deg = rad * 180 / PI;

      or this:

      (-b + sqrt( b^2 - 4*(a*c))) / 2 * a;
Having used "pseudomath" to express stuff in an IRC chat, that gets ugly as sin very quickly. Even the Quadratic Formula there is already ugly, and the Cubic just goes beyond anything reasonable without real math expressions.

than this:
deg = rad \cdot {180 \over \pi}

or this:
{-b + \sqrt{b^2 - 4ac} \over 2a}
This has implicit ordering built in, and is plenty readable as is. Not to mention that you don't need to use imath for formulas when they're standing alone, and they're more readable as full-size math:

{-b + \sqrt{b^2 - 4ac} \over 2a}


<snip>

What I mean is that math is downright scary for most students (and most people) because it is normally presented in a way that makes a terrible first impression.
When I was a kid I didn't even bother trying to make sense of it... I just shied away from it because it seemed incomprehensible... now I wish I had made a bigger effort, but I reckon at the time none of it seemed to matter (one could also accuse grade school teachers of not generating enough interest, but let's not get into that).

<snip>
While it can seem difficult at first, what is important is to remember that, just like pseudocode, there are certain standards to adhere to. Much like i, j, and k in coding are (nearly) always count variables, most lower-case greek letters, especially \theta and \alpha represent angles. a, b, and c are dependent on context, but will either be the coefficients of a quadratic (further polynomials tend to extend it, with a being on the highest power, or use c_n) or the three sides of a right triangle, with c the hypotenuse, while a and b are defined in the diagram. Putting an arrow over a variable declares it to be a vector.

So, while it would work for simpler stuff, using it on the stuff that can be read that way does the opposite of what you think it would, by making advanced math even more impenetrable than people already deem it.

In fact, let's give the Cubic Formula, and only for the primary root, in pseudomath, just to show how bad it is.

Code: Select all
x_1 = - b/(3 * a) - (1/(3 * a)) * (0.5 * (2 * b^3 - 9 * a * b * c + 27 * a^2 * d + sqrt((2 * b^3 - 9 * a * b * c + 27 * a^2 * d)^2 - 4 * (b^2 - 3 * a * c)^3)))^(1/3) - (1/(3*a)) * (0.5 * (2 * b^3 - 9 * a * b * c + 27 * a^2 * d - sqrt((2 * b^3 - 9 * a * b * c + 27 * a^2 * d)^2 - 4 * (b^2 - 3 * a * c)^3)))^(1/3)


If you can parse the groupings in that quickly, I'll be extremely surprised. I had to triple-check that I did them right translating from the original.
yurell wrote:We need fewer homoeopaths, that way they'll be more potent!
Darryl
 
Posts: 327
Joined: Mon Sep 22, 2008 2:32 pm UTC

Re: I hate math notation!

Postby JoeZ » Sun Jan 23, 2011 6:08 am UTC

HarvesteR wrote:I'd much rather read the entire equation on a single line.


Which is great, until you have to multiply/divide one fraction (or sum of fractions) by another. Also, math (after algebra) is not really a static thing, with all the erasing and moving and squeezing symbols into spaces I'm doing already, I'd hate having to manage parentheses as well.
I can't go, this is too important. Someone is wrong on the internet!
JoeZ
 
Posts: 21
Joined: Thu Jan 20, 2011 3:35 pm UTC

Re: I hate math notation!

Postby mister k » Mon Jan 24, 2011 4:02 pm UTC

one habit that does bug me, or did when I was still having to attend lectures, was the tendency for similar notation to crop up. x and y are fine- difficult to confuse. u and v... less so. n and m? p and \rho? ARGH! I spent an entire day of revision realising I had confused pressure and density multiple times while writing.

But generally, yeah, having a fraction is useful, and somewhat inutitive, because, when writing by hand, I want to be able to cancel and group terms with ease, which simply isn't possible with coding language. I suspect coding language is set up like that because its quite HARD to make fractions look like that in coding language. That is, mathematical termology tends to be whats convinient. I also suspect multiplication happens "more" than addition which is why its often substituted.
Elvish Pillager wrote:you're basically a daytime-miller: you always come up as guilty to scumdar.
User avatar
mister k
 
Posts: 643
Joined: Sun Aug 27, 2006 11:28 pm UTC

Re: I hate math notation!

Postby Zach 739085133 » Wed Jan 26, 2011 4:59 pm UTC

I agree that the inconsistency between sin^{-1}(x) and sin^{2}(x) is unfortunate. Even the name "inverse sine" is regrettable because the sine wave is not invertible. We work around that by inverting a small part of the curve. For those reasons I always use \arcsin(x), even when scribbling notes on my own.

One thing I would change if I had the power would be to do away with the symbol π, and use a single symbol to represent the ratio between a circle's circumference and its radius. (The number we call 2π.) For this post let me use τ. That way when you are learning trigonometry in radians, a quarter of the way around the circle would be τ/4, halfway around would be τ/2, etc.

With all that said, it's easier to accept the notation we've inherited than to try to change it. Changing the books and calculators alone would be a huge project. There is no notation that students can not learn. There's no true or false about symbols. Just convenience and ability to communicate.

ps: Thanks to the poster who explained why the prefix gets switched between sin,csc and cos,sec. That explanation would make teaching and learning the six trig functions easier.

pss: As demonstrated above, I'm fine with using / for division, especially when typing.

EDIT: Replaced original symbol ❖ with τ for circumference/radius. Upon further reflection, even though I prefer τ there is no reason to do away with π. Just as we use both degrees and radians, π and τ can coexist.
Last edited by Zach 739085133 on Sun Jan 30, 2011 7:06 pm UTC, edited 1 time in total.
User avatar
Zach 739085133
 
Posts: 11
Joined: Tue Jan 25, 2011 5:30 am UTC

Re: I hate math notation!

Postby Dason » Wed Jan 26, 2011 5:45 pm UTC

Zach 739085133 wrote:pss: As demonstrated above, I'm fine with using / for division, especially when typing.

I don't think anybody has a problem with using / for simple division. It's when you start to get nested operations and you need to enter a parenthesis hell that it starts to get inconvenient to use / as opposed to \frac{x}{2} notation.
double epsilon = -.0000001;
User avatar
Dason
 
Posts: 1293
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Next

Return to Religious Wars

Who is online

Users browsing this forum: No registered users and 7 guests