1
$\begingroup$

So I was playing with my calculator and I typed this out:

$$\int_{0}^{2\pi} \sin{(x)} dx$$

And what do I get:

$$0.3441690684$$

I guessed that's a reasonable amount of error from a machine using numeric techniques to calculate these things. Then I tried:

$$\int_{0}^{2\pi} \cos{(x)} dx$$

And get:

$$6.270599475$$

Why? Which numeric integration method leads to this erroneous answer. While integrating, which functions do I trust the calculator to give me correct answers for and which functions will tend to make me more wrong than with a paper-and-pen.

And why is the error different for sine and cosine functions? Makes no sense.

$\endgroup$

1 Answer 1

10
$\begingroup$

Your calculator has probably been set to degrees rather than radians

Note that (using radians in the trigonometric functions)

$$\int_0^{2\pi}\sin\left( \frac{\pi x}{180}\right) \,dx= \frac{180}{\pi}\left(1-\cos\left(\frac{2\pi^2}{180}\right)\right) \approx 0.3441690684217562$$

$$\int_0^{2\pi}\cos\left( \frac{\pi x}{180}\right) \,dx= \frac{180}{\pi}\left(\sin\left(\frac{2\pi^2}{180}\right)-0\right) \approx 6.270599474641442$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .