Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.


Norm[{1, Sin[t], Cos[t]}]
Norm[{1, Sin[t], Cos[t]}] // Simplify
Sqrt[1 + Abs[Cos[t]]^2 + Abs[Sin[t]]^2]    
Sqrt[1 + Abs[Cos[t]]^2 + Abs[Sin[t]]^2]


How do I coax Mathematica to output Sqrt[2]?

share|improve this question

2 Answers 2

up vote 16 down vote accepted
Simplify[Norm[{1, Sin[t], Cos[t]}], Element[t, Reals]]


Plot3D[Norm[{1, Sin[a + b I], Cos[a + b I]}], {a, -1, 1}, {b, -1, 1}]

enter image description here

share|improve this answer
so basically, the problem is that Mathematica is smarter than me, and I was not aware that cos^2 x + sin^2 x = 1 only for real x ? – user1602 Jul 11 '12 at 3:39
@term-rewritica: no, you are right $\cos^2 x + \sin^2 x$ is always 1. However $|\cos x|^2+ | \sin x|^2$ is not always equal to 1. – Fabian Jul 11 '12 at 16:41
@belisarius Wow, this was elegantly done! – drN Oct 13 '12 at 18:16

Just so that all the i's are dotted and t's crossed:

$$\cos^2(z)+\sin^2(z)=1$$ for all complex $z$ (since $\cos^2(z)+\sin^2(z)-1$ is a holomorphic function that vanishes on the real axis, it vanishes everywhere); but $$|\cos(z)|^2+|\sin(z)|^2 \neq 1$$ in general unless $z$ is real.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.