12

Consider the following statement:

Max[0, Sqrt[1 - Cos[4 \[Theta]]]]

You'll find that Mathematica won't evaluate this, because it doesn't know the range of $\theta$. Okay, that makes sense, so change it to:

Simplify[Max[0, Sqrt[1 - Cos[4 \[Theta]]]], {0 <= \[Theta] <= 2 \[Pi]}]

This evaluates happily. As it should. But then consider this not-impactful adjustment:

Simplify[Max[0, Sqrt[1 - Cos[4 \[Theta]]]/
  Sqrt[2]], {0 <= \[Theta] <= 2 \[Pi]}]

This doesn't evaluate. I don't know why; because it seems quite obvious that it should be exactly the same as the previous case, right? (The constant factor of 1/Sqrt[2] can't change the fact that it is still $\geq 0$). Any thoughts on how to fix this? Of course, in my case I want to actually keep the Max ..., but I don't know the exact form of the other side, so I can't just arbitrarily remove constants ...

Noon Silk
  • 523
  • 3
  • 11
  • 1
    Simplify[Max[0, Simplify[Sqrt[1 - Cos[4 \[Theta]]]/Sqrt[2]]], {0 <= \[Theta] <= 2 \[Pi]}] seems to work. – Yves Klett Sep 26 '12 at 07:11
  • ...and what happens if you use FullSimplify[] instead? – J. M.'s missing motivation Sep 26 '12 at 07:14
  • Thanks for the Accept, but I encourage all users to wait 24 hours before Accepting as answer so that other users have a chance to read and answer the question before it appears concluded. Quick Accepts may prevent the posting of other, potentially better answers. – Mr.Wizard Sep 26 '12 at 07:20
  • Thanks @Mr.Wizard; I did try and un-accept yesterday, but for some reason actions on this site occasionally don't work (like voting and commenting.) – Noon Silk Sep 26 '12 at 22:15

1 Answers1

11

There are many potential simplifications that Simplify and FullSimplify do not make, presumably because they are deemed too costly to attempt.

In this case it appears that parts are at too deep a level for the required simplifications to be made:

expr = Max[0, Sqrt[1 - Cos[4 t]]/Sqrt[2]];
simp = FullSimplify[#, {0 <= t <= 2 Pi}] &;

simp @ expr
Max[0, 1/Sqrt[Csc[2 t]^2]]

If you apply the simplification function to all the subexpressions further transformations are made:

simp //@ expr
Abs[Sin[2 t]]
Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371