Group Abstract Group Abstract

Message Boards Message Boards

0
|
28.6K Views
|
17 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Applying Norm[ ] to the trig identity Sin^2 + Cos^2 = 1?

Posted 9 years ago

Hi;

It doesn't seem that the Norm[ ] command is applying the trig identity Sin^2 + Cos^2 = 1 to give the correct answer - please see attached.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
17 Replies

Thanks so much, that worked great!

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Hi Macro;

I tried the Simplify[ ] command with the Reals definition on both the Norm[ ] and Normalize[ ] commands without any change to either output - see attached. If I am doing something wrong, I certainly can't figure it out.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin

Hi,

if I add

Simplify[Norm[normalize], t \[Element] Reals]

at the and of your Example3.nb notebook it gives 1 as expected.

Cheers,

Marco

POSTED BY: Marco Thiel

Hi Sander;

I tried your last recommendation of using the Reals keyword, and all it did was remove the Abs in front of the Sin[ ] and Cos[ ]. It still did not apply the trig identity, which would have reduced the answer to SqRoot(29).

Thanks,

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Hi,

is this not how it looks:

enter image description here

Cheers,

M.

POSTED BY: Marco Thiel

Hi Marco;

In your example, you are exactly correct.

However, my question concerns both the Norm[ ] and Normalize[ ] commands not applying the well know trig identity (Sin(t)^2 + (Cos(t))^2 = 1 in the final answer, even using the Simplify[ ], FullSimplify[ ] and TrigReduce[ ] commands. In my attached example (example3), I manually created the Norm[ ] command and the output can be found in output[15] which is very similar to output[14], which is the output from the Norm[ ] command. When I use the Simplify[ ] command with the manually created norm command I get the desired simplified answer in output (16). I cannot find any command that I can prefix to either the Norm[ ] and Normalize[ ] commands to get the trig identity to be applied to the final answer.

Incidentally, in the trig identity (Sin(t)^2 + (Cos(t))^2 = 1, it doesn’t make any difference whether t is a real, imaginary or complex number, the answer is always the same.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin

As Marco points out you need to make the assumption that t is real, you can do so like this:

Simplify[... , t \[Element] Reals]
POSTED BY: Sander Huisman
Posted 5 years ago

This is the code that works for that. Thank you!

POSTED BY: do chris

Hi;

Attached is yet another example of the Norm[ ] command not reducing to the correct answer when using Trig functions. As can be seen by inspection the answer should be SqRoot(29). However it appears that the subsequent Integrate[ ] command produced the correct answer. In using the Norm[ ] command, I have tried Simplify[ ], FullSimplify[ ] and TrigReduce[ ] commands and they all produce very similar answers to just using the Norm[ ] command by itself. I realize that I am using the Norm[ ] command in a very simplistic manner, but it still seems that it should produce the expected reduced answer.

Is there someone at Mathematica that can tell me what I am doing wrong, if I am in fact doing something wrong, or can this be reported as possibly broken code. By the way, I am using version 9 of Mathematica.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin

Dear Mitch,

I am sorry but I still do not understand why you are expecting this to evaluate to $\sqrt{29}$ for all $t$. It is true that this should evaluate to $\sqrt{29}$ if $t$ was real, but if it wasn't it is a mistake to make that particular simplification. For example:

FullSimplify[Norm[r'[t]] /. t -> 1] 

gives $\sqrt{29}$, but if I substitute another perfectly valid number for $t$ this expression does not evaluate to $\sqrt{29}$:

FullSimplify[Norm[r'[t]] /. t -> I]

enter image description here

So if, without further information, Mathematica were to reduce the equation to $\sqrt{29}$, that would be incorrect, because it does not hold for complex numbers in general. So I think that Mathematica does not simplify the equation in the way you wish it to do, because it would be incorrect in general. So I would think that this can definitely not be reported as broken code, but rather as expected and desired behaviour.

Or am I missing the point here?

Cheers,

Marco

POSTED BY: Marco Thiel

I have attached a copy of file where the Norm[ ] and Normalize[ ] commands give the expected answers. However, the attached file does not have any trig functions.

Attachments:
POSTED BY: Mitchell Sandlin

Hi Sander,

It is my understanding that the Norm is a scalar length of a vector (or magnitude). It converts the vector into a scalar by summing the squares of the individual vector components and then takes the square root, and this is what I am assuming that the Norm[ ] command does in Mathematica.

My end goal is to normalize the vector, which I would do by dividing the individual vector values by the norm. Incidentally, I tried to use the Normalize[ ] command in Mathematica, and it didn’t give me the expected results either – see attached.

In the attached, the answers are somewhat correct. However, the denominators are not reduced. In this example, the denominators should simplify to 2.

Thanks so much, I certainly appreciate your time in helping me with this.

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin

Ok, I also do not quite understand what the actual problem is. But it is relatively easy to force Norm to apply to a scalar, if we interpret the scalar as a "one-dimensional vector", i.e. wrapping it in curly brackets. Using the original notebook posted above it looks like this:

f[t_] := 2 Cos[t] + 2 Sin[t] + 4;
FullSimplify[f'[t]/Norm[{f'[t]}]]

which gives

enter image description here

Note, that I needed to enclose f'[t] in "{}"; this is of course quite clumsy, because Abs[] would have achieved the same thing without the curly brackets. Obviously, this is not always one, as can be seen when we plot the function:

Plot[f'[t]/Norm[{f'[t]}], {t, 0, 2 Pi}]

enter image description here

Plotting the nominator and denominator separately, we see that the result makes sense:

Plot[{f'[t], Norm[{f'[t]}]}, {t, 0, 2 Pi}]

enter image description here

Cheers,

Marco

PS: As I said it would make more sense to use Abs here:

FullSimplify[f'[t]/Abs[f'[t]]]

gives

enter image description here

without the use of the artificial curly brackets...

POSTED BY: Marco Thiel

As I understand it, the Norm[ ] should be doing this - Sqrt[(-2 Sin[t])^2 + (2 Cos[t])^2 + (0)^2]. Basically, it should add the square the value for vectors x, y and z and then take the square root.

POSTED BY: Mitchell Sandlin

As you say, you need a vector, you gave it a formula, that simplify doesn't work the way you want it to. Perhaps you want to normalize using an integral over a certain domain?

POSTED BY: Sander Huisman
Posted 9 years ago

Your notebook does not contain Sin[x]^2 + Cos[x]^2. Even if it did, as Sander says, it is not a convention that Norm simplifies trig expressions. However:

In[9]:= TrigReduce[Sin[x]^2 + Cos[x]^2]

Out[9]= 1

In[10]:= Simplify[Sin[x]^2 + Cos[x]^2]

Out[10]= 1
POSTED BY: David Keith

What would you like to do:

Norm[2 Cos[t] - 2 Sin[t]] 

I would have no idea what you would like it to do... It is not the conventional use of Norm...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard