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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
f[t_] = -4 + Sqrt[(-Sqrt[3] + 2*Cos[t])^2 + Sin[t]^2] + Sqrt[(Sqrt[3] 
+ 2*Cos[t])^2 + Sin[t]^2] 

The function above is identically 0 for all real values of t. However:


just spits back the original function.

I also tried TrigReduce, TrigExpand, etc, to no avail.

How do I make Mathematica simplify things like this?

For those interested: I'm playing w/ ellipses, and f[t] represents the sum of the distance from the focii minus the actual value of the sum of the distance from the focii. The more general case:

x[t_] = a*Cos[t]  
y[t_] = b*Sin[t]  
focus[a_,b_] = Sqrt[a^2-b^2]  
f[t_]=Sqrt[(x[t]-focus[a,b])^2 + y[t]^2] + Sqrt[(x[t]+focus[a,b])^2 + y[t]^2] 

where f[t] is constant for real t when a >= b (probably when a < b too, but things get a bit complex in that case)

share|improve this question

Simplification uses heuristics, so there's no guarantee it'll find the simplest form. As you'll see below, it takes some work to make the simplification possible.

Note: In your example you were using incorrect syntax: the second argument of FullSimplify can't be Reals. It must be a set of assumptions about some variables. Take a look at the examples on the doc page to see how to use assumptions: FullSimplify.

After correcting this mistake, Mathematica still needs some guidance to be able to handle this. Your expression has the sum of two square roots:

expr = -4 + Sqrt[(-Sqrt[3] + 2*Cos[t])^2 + Sin[t]^2] + 
  Sqrt[(Sqrt[3] + 2*Cos[t])^2 + Sin[t]^2]

Let's transform it so it'll only have one square root and see if that helps:

Simplify[Expand[(expr + 4)^2], t \[Element] Reals]

(* ==> 16 *)

Since (expr + 4)^2 is 16 for all real t, expr is either 0 or -8. By substituting in t -> 0 and noting that the function is continuous, we can quickly verify that expr == 0 for all real t.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.