Degrees and radians in Maple

25.4k Views Asked by At

Does Maple give the possibility to switch between degrees and radians while making calculations? If so, how do you switch?

2

There are 2 best solutions below

0
On BEST ANSWER

Maple doesn't have "degree mode". But you could simply define the trig functions you need, and theu use them to do what you want.

For example on a line after the prompt > write

$\operatorname{degsin} := x \to \sin(\frac{x\,\pi}{180})$;

and after that use "degsin" where you want sine of an angle in degrees.

Do the same for the other five direct trig functions cos,tan, etc.

For the inverse trig functions, the change is done after evaluation, so that you could define for example

$\operatorname{degarctan }:= x \to (\frac{180}{\pi})\arctan(x)$;

and similarly for the other five inverse trig functions.

You'd have to set these up every session, or there are ways in maple to store them in a file somwhere and load it at use time.

0
On

I found out that Maple has a function called convert(). It can be used to switch between degrees and radians back and forth like this:

convert(Pi/2,degrees);
convert(2*Pi,degrees);

convert(90*degrees,radians);
convert(45*degrees,radians);  

Always include the *degrees though when inputting degrees that you want converted to radians.
To automize it a bit one could use this setup:

v:=45;
v:=convert(v*degrees,radians);

Here v is as an example set as 45 degrees, which is then converted to radians and redefined as v.
Just for your information.