Sage returning 0 for curve arc length (integrals)

770 Views Asked by At

I'm using Sage to calculate a curve arc length.

Basically, the curve is given by this equation:

enter image description here

In sage, I'm calculating it's arc length by using this formula:

var('t')
integral(sqrt((derivative(t - sin(t)))^2 + (derivative(1 - cos(t)))^2 + (derivative(4 * cos(t/2)))^2), t, 0, 8*pi); 

The formula is from here: http://www.mathwords.com/a/arc_length_of_a_curve.htm

Basically, it should return

32 * sqrt(2)

but it always returns 0.

Could anyone tell me why? I probably did something wrong with the syntax, but can't figure out where.

1

There are 1 best solutions below

0
On BEST ANSWER

Probably Sage did not keep track of branches, and used a discontinuous anti-derivative. Maple, also, has a discontinuous anti-derivative. But Maple manages to take the jumps into account and gets the right answer. $$ \begin{align} &\int 2 \sqrt{2} \mathrm{sgn} \Biggl(\operatorname{sin} \biggl(\frac{t}{2}\biggr)\Biggr) \operatorname{sin} \biggl(\frac{t}{2}\biggr) d t = -4\sqrt{2} \mathrm{sgn} \Biggl(\operatorname{sin} \biggl(\frac{t}{2}\biggr)\Biggr) \operatorname{cos} \biggl(\frac{t}{2}\biggr) \\ &\int_{0}^{8 \pi} 2 \sqrt{2} \mathrm{sgn} \Biggl(\operatorname{sin} \biggl(\frac{t}{2}\biggr)\Biggr) \operatorname{sin} \biggl(\frac{t}{2}\biggr) d t = 32 \sqrt{2} \end{align} $$