Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

wolf

cos^2(a) or cos(a)^2

This topic is 5474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
there most certainly is.

cos(a)^2 is taking the cosine of a squared

you wrote:

cos^2(a) which can be (cos(a))^2 which is cosine squared of a

To masonium:

no, they are not the same with the last sentence you wrote.

Share this post


Link to post
Share on other sites
I''d have to agree with masonium. So does Maple.

The notation used is ambiguous, but since it''s easy enough to put the "^2" inside the brakets, in practice the extra brackets are dropped when the entire cos() term is being squared.

Share this post


Link to post
Share on other sites
quote:
Original post by Geoff the Medio
I'd have to agree with masonium. So does Maple.

The notation used is ambiguous, but since it's easy enough to put the "^2" inside the brakets, in practice the extra brackets are dropped when the entire cos() term is being squared.


What if lets say a = 3x + 5 ?

Then:

cos (a)2 will be unequal to (cos a)2 quite blatantly.

In practice just like others the power will be between the trigonomtric function and the operand, but its kind of hard to do that here...unless I use html characters for it.

[edited by - nervo on September 25, 2003 3:12:43 AM]

Share this post


Link to post
Share on other sites
Interestingly enough, I graphed what I said above on my graphing calculator. I had to input cos((3x+5)^2) to be different from cos(3x+5)^2, which is the same as cos^2(3x+5).

So, I stand corrected. In practice though, I wouldn''t have written it that way.

Share this post


Link to post
Share on other sites
quote:
Original post by Nervo
cos (a)2 will be unequal to (cos a)2 quite blatantly.

In practice just like others the power will be between the trigonomtric function and the operand, but its kind of hard to do that here...unless I use html characters for it.

The function "cos(a)" is treated as whole notational unit (lack of better term?). It is not "cosine * a" such that "cos(a)^2" = "cos * a^2". Rather, it is "cos(a) ^ 2" = "(cos(a))^2".

At least, that''s how I think of it...

Share this post


Link to post
Share on other sites
quote:
Original post by Geoff the Medio
quote:
Original post by Nervo
cos (a)2 will be unequal to (cos a)2 quite blatantly.

In practice just like others the power will be between the trigonomtric function and the operand, but its kind of hard to do that here...unless I use html characters for it.

The function "cos(a)" is treated as whole notational unit (lack of better term?). It is not "cosine * a" such that "cos(a)^2" = "cos * a^2". Rather, it is "cos(a) ^ 2" = "(cos(a))^2".

At least, that''s how I think of it...


I understand. I believe that it comes down to one''s personal preference overall. For myself, I would avoid placing an exponent to the right so as to eliminate the possibility of mis-interpreting it in calculations. But for others this may not be a problem.

Share this post


Link to post
Share on other sites
just to say that I hate when my professors don''t enclose the variable inside the sin/cos.. functions with a couple of parenthesis, it''s so ambiguous.

Share this post


Link to post
Share on other sites
This is why the notation cos2a was adopted: it is unambiguous understood to be (cos a)2. It''s also very concise, and the lack of brackets means that complex expressions that use it are easier to understand.

So:
For (cos a) * (cos a) write cos2a.
For cos (a * a) write cos (a2).

Avoid cos a2 and cos (a)2 as they aren''t clear. Note that this it''s difficult to express this in code without extra brackets and/or temporary variables, complexity the mathematical notation avoids.

John

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!