Order of operations for trig, logarithms

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

oblivimous
Posts: 139
Joined: Tue Nov 07, 2006 6:36 pm UTC
Location: Fremont, CA

Order of operations for trig, logarithms

Postby oblivimous » Thu Oct 07, 2010 8:26 pm UTC

grade schoolers learn PEMDAS as an acronym for order of operations (parentheses, exponents, multiply and divide, add and subtract), but this doesn't tell what order to read expressions involving trig or logarithm

In general, from my experience

[imath]sin x^2[/imath] is read as [imath]sin (x^2)[/imath], not [imath](sinx)^2[/imath]
and sin 2x is read as sin(2x) not (sin2)x

The first case shows that when x is affected by a trig function and an exponent, the exponent is applied first.
The second shows that when 2 is affected by a trig function and multiplication, the trig function is applied first.

From this, we can generalize that the trig function is applied after exponents but before multiplication, so we can revise pemdas to peTLmdas (trig and logs).

Of course this is a strictly arbitrary decision of notation. While I've seen the order for pemdas in many early textbooks, I've never seen the order for trig and logs stated formally. Is that a gap in my education or a common gap in instruction? For me, it was so severe that when I was assigned the derivative of [imath]sin x^2[/imath] I actually worked out both possible interpretations then used the textbook solution to reverse-engineer the intend order of operations and [imath]sin(3x)^2[/imath] still leaves me unsettled, but I understand it's read as [imath]sin[(3x)^2][/imath].

How about a movement to ban [imath]sin x^2[/imath] and only use [imath]sin(x^2)[/imath], [imath](sinx)^2[/imath], or [imath]sin^2x[/imath]

[imath]sin^2x[/imath] is a ridiculous written notation, by the way, but makes fantastic sense when spoken to clearly distinguish itself from [imath]sin(x^2)[/imath]
Last edited by oblivimous on Thu Oct 07, 2010 8:33 pm UTC, edited 1 time in total.

Spambot5546
Posts: 1466
Joined: Thu Apr 29, 2010 7:34 pm UTC

Re: Order of operations for trig, logarithms

Postby Spambot5546 » Thu Oct 07, 2010 8:30 pm UTC

That's not really an issue of Order of Operations so much as unclear notation. It's the same reason -2^2 could either be 4 or -4 depending on whether you meant -(2^2) or (-2)^2

That's why i generally use grouping symbols when i use functions. I would write it as sin|2x| or log|x^2|

I don't know where i got the habit of using straight lines rather than parens, but i did so bite me!
"It is bitter – bitter", he answered,
"But I like it
Because it is bitter,
And because it is my heart."

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Order of operations for trig, logarithms

Postby mike-l » Thu Oct 07, 2010 8:38 pm UTC

oblivimous wrote:grade schoolers learn PEMDAS as an acronym for order of operations (parentheses, exponents, multiply and divide, add and subtract), but this doesn't tell what order to read expressions involving trig or logarithm

[imath]sin x^2[/imath] is read as [imath]sin (x^2)[/imath], not [imath](sinx)^2[/imath]
and sin 2x is read as sin(2x) not (sin2)x

The first case shows that when x is affected by a trig function and an exponent, the exponent is applied first.
The second shows that when 2 is affected by a trig function and multiplication, the trig function is applied first.

No, it shows that the multiplication is applied first. Of course, sin x sin y is not read as sin (x sin y), so it's all a little weird.

From this, we can generalize that the trig function is applied after exponents but before multiplication, so we can revise pemdas to peTLmdas (trig and logs).

Of course this is a strictly arbitrary decision of notation. While I've seen the order for pemdas in many early textbooks, I've never seen the order for trig and logs stated formally. Is that a gap in my education or a common gap in instruction? For me, it was so severe that when I was assigned the derivative of [imath]sin x^2[/imath] I actually worked out both possible interpretations then used the textbook solution to reverse-engineer the intend order of operations.

It's not formally stated in most books. The general convention is that for written functions, the precedence is between multiplication and addition, so foo xy = foo (xy) but foo x + y = (foo x) + y. Exponentiation pretty much always gets precedence (someone might argue with me over logs just because log (x^2) = 2 log x). Best though to use brackets to make things clear.

Trig functions are even worse, because for most functions, foo^2 x means foo(foo(x)), but sin^2 x means (sin x)^2. But this is unique to trig functions because they are so rarely applied to themselves, but often raised to a power (except -1, and sin^-1 is usually taken to mean the same thing as foo^-1, that is, the inverse function! So trig functions have all sorts of weird rules.)

Spambot5546 wrote:That's why i generally use grouping symbols when i use functions. I would write it as sin|2x| or log|x^2|

I don't know where i got the habit of using straight lines rather than parens, but i did so bite me!


Ok, I will! |2x| means the absolute value of 2x. You can't just use your own notation and expect to be understood.

Spambot5546 wrote:That's not really an issue of Order of Operations so much as unclear notation. It's the same reason -2^2 could either be 4 or -4 depending on whether you meant -(2^2) or (-2)^2

Yeah, except that's exactly the kind of problem order of operations is meant to solve. How is that different than wondering if 1 + 2*3 means (1+2)*3 or 1+(2*3)?
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

++$_
Mo' Money
Posts: 2370
Joined: Thu Nov 01, 2007 4:06 am UTC

Re: Order of operations for trig, logarithms

Postby ++$_ » Thu Oct 07, 2010 8:42 pm UTC

mike-l wrote:
Spambot5546 wrote:That's why i generally use grouping symbols when i use functions. I would write it as sin|2x| or log|x^2|

I don't know where i got the habit of using straight lines rather than parens, but i did so bite me!


Ok, I will! |2x| means the absolute value of 2x. You can't just use your own notation and expect to be understood.
Yeah, never do this. Not only is it overloaded, it totally eliminates the main benefit of parentheses, which is that the opening and closing delimiters are different. So you can write sin|x|x+3|log|x|+1| without it being impossible to read (and ambiguous)

EDIT:
Yeah, except that's exactly the kind of problem order of operations is meant to solve. How is that different than wondering if 1 + 2*3 means (1+2)*3 or 1+(2*3)?
It's only different in that people disagree on it. Everyone knows in that in theory, [imath]-2^2 = 4[/imath]. But that doesn't mean that in practice, people use that convention in their writing. Similarly, when one sees [imath]1/2x[/imath], it almost never means [imath]0.5x[/imath], even though everyone knows that multiplication and division are left-associative.
Last edited by ++$_ on Thu Oct 07, 2010 8:45 pm UTC, edited 1 time in total.

oblivimous
Posts: 139
Joined: Tue Nov 07, 2006 6:36 pm UTC
Location: Fremont, CA

Re: Order of operations for trig, logarithms

Postby oblivimous » Thu Oct 07, 2010 8:43 pm UTC

mike-l wrote:No, it shows that the multiplication is applied first.


Shamed. I'll refrain from destroying the evidence of my blunder by edit, it would cause subsequent posts to no longer make sense.

pemdTLas

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Order of operations for trig, logarithms

Postby mike-l » Thu Oct 07, 2010 8:45 pm UTC

oblivimous wrote:
mike-l wrote:No, it shows that the multiplication is applied first.


Shamed. I'll refrain from destroying the evidence of my blunder by edit, it would cause subsequent posts to no longer make sense.

pemdTLas


No worries, still a valid question. And trig in particular breaks a lot of rules.
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

User avatar
Mike_Bson
Posts: 252
Joined: Mon Jul 12, 2010 12:00 pm UTC

Re: Order of operations for trig, logarithms

Postby Mike_Bson » Thu Oct 07, 2010 9:08 pm UTC

oblivimous wrote:grade schoolers learn PEMDAS as an acronym for order of operations (parentheses, exponents, multiply and divide, add and subtract), but this doesn't tell what order to read expressions involving trig or logarithm
Haha, I remember learning that in grade school , and I asked my teacher, ''What about logarithms and sins (I didn't know of the word ''trigonometric functions'' back then)?''
How about a movement to ban [imath]sin x^2[/imath] and only use [imath]sin(x^2)[/imath], [imath](sinx)^2[/imath], or [imath]sin^2x[/imath]

How about we ban sinx nonsense altogether? Why the hate on parentheses?
oblivimous wrote:[imath]sin^2x[/imath] is a ridiculous written notation, by the way, but makes fantastic sense when spoken to clearly distinguish itself from [imath]sin(x^2)[/imath]

I disagree. The only thing I don't like about sin^2(x) is the special case of sin^-1(x), which, really, should always be written as arcsin(x), or asin(x).

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Order of operations for trig, logarithms

Postby Qaanol » Thu Oct 07, 2010 9:18 pm UTC

++$_ wrote:Everyone knows in that in theory, [imath]-2^2 = 4[/imath].

What?
wee free kings

User avatar
Dopefish
Posts: 855
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: Order of operations for trig, logarithms

Postby Dopefish » Thu Oct 07, 2010 9:38 pm UTC

If I see -2^2 without further clarification, I'm always going to assume it's -4. That's just your basic pedmas at work.

I think for trig and log functions, they're most often used in application (either as an application within higher maths [i.e. all the trig functions in fourier transforms], or physics or another applied science), and so context makes it clear what is meant, rather than explicit rules. When first learning about those functions at all, I was always drilled on use of parenthesis everywhere, not so much to avoid ambiguity, but rather to emphisize that 'sin' wasn't a function (in contrast to sin[stuff]).

And really, where I'm from, those functions only show up in the last couple years of high school, so you're not going to get particularly complicated expressions where there might be amibiguity anyway. Grabbing my first year calc book too, and checking out random context-less problems involving trig functions, they all seem to be good about useing parentheses to be clear, so it may be that really you always 'should' be using parenetheses, it's just since people are lazy and context is good enough, they're usually omitted.

++$_
Mo' Money
Posts: 2370
Joined: Thu Nov 01, 2007 4:06 am UTC

Re: Order of operations for trig, logarithms

Postby ++$_ » Thu Oct 07, 2010 10:01 pm UTC

Qaanol wrote:
++$_ wrote:Everyone knows in that in theory, [imath]-2^2 = 4[/imath].

What?
I should probably go to sleep :P

Chazs
Posts: 17
Joined: Sun Dec 20, 2009 7:04 am UTC

Re: Order of operations for trig, logarithms

Postby Chazs » Sat Oct 09, 2010 4:52 am UTC

I really detest the lazy notation such as cos x or ln x, ln 2, cos 3.2, etc. To me ln, log, sin, cos, etc. are names of functions, and proper function notation is f(x). One would never write f 3 when meaning f(3), so why write cos 2 when meaning cos(2). It's because of pure laziness. If it's a function, use proper function notation. I make it a habit when in class to always use parentheses after trig functions and logarithms to hopefully impart to my students that they are just two or three letter names for functions , and should be used as such, instead of the usual one letter name. Who knows if it's fruitful or not. Just my own little crusade.

CHUCK

voidPtr
Posts: 140
Joined: Sun Apr 26, 2009 6:53 pm UTC

Re: Order of operations for trig, logarithms

Postby voidPtr » Sat Oct 09, 2010 6:41 pm UTC

heh..funny thread.

I think one of the reason brackets aren't always used is because although strict bracket use may remove ambiguity, it also makes long equations harder to read and write, so there's a trade-off for useability. The main thing is that you are consistent and clear, and so is your audience (e.g. your teachers or your students). Something like "sin2x" is pretty clear to me without having to use brackets because it's a very common shortcut, but "sin2 x" wouldn't be because of that extra space and uncommon useage.

And Chuck, I have to disagree with you on the shorthand for functions. For example when doing operations on functions themselves people often just use the function name. For example in the multiplication rule for derivatives. [fg]' = f'g + fg'.


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 12 guests