0
$\begingroup$

We know that $$\cos(45^{\circ})=\sin(45^{\circ})=\frac{\sqrt{2}}{2}$$

But when I type this in Maple and use it in my calculations, I get a different result compared to when I use $\frac{\sqrt{2}}{2}$. For example:

$$31\sin(45^{\circ})=26.37$$

$$31\cdot \frac{\sqrt{2}}{2}=21.92$$

Perhaps this is a dumb question, but is there something I need to change in my settings?

  • 1
    Do you just write "sin(45)" in Maple? That is not degrees, that is radians.2017-02-16
  • 0
    How do you enter $31\sin(45^\circ)$? It happens that $31\sin(45)\approx 26.37$ ($45$ in radians).2017-02-16
  • 0
    @Neutronic That's what I did. How am I supposed to type it in? Do I have to multiply by $\frac{180}{\pi}i$ first?2017-02-16
  • 0
    @mickep Like this: $31 \sin(45)$. How should I type it in then?2017-02-16

2 Answers 2

4

Maple does not work with degrees. If you want to take $\sin$ of $45^{\circ}$ in Maple you would write

$$ \sin\left(45 \frac{\pi}{180}\right) $$

to get the correct result.

1

As everyone has mentioned, MAPLE works with radians. If you are feeling particular lazy, Maple has a convert to radians procedure: convert(x, radians) will convert x to radians, where x is of the form "15degrees" (i.e. a number immediately followed by degrees).

If you wanted, you could also write a trivial function SIN(x) that would take degrees as an argument, something along the lines of:

SIN:= unapply( sin(x*Pi/180), x);

Similar can be done for the other trig functions.