Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Trigrat Calculator

Trigrat

Function: trigrat (<expr>) Gives a canonical simplifyed quasilinear form of a trigonometrical expression; <expr> is a rational fraction of several sin, cos or tan, the arguments of them are linear forms in some variables (or kernels) and %pi/<n> (<n> integer) with integer coefficients. The result is a simplified fraction with numerator and denominator linear in sin and cos. Thus trigrat linearize always when it is possible.

display2d:false;
px(t):= 2*cos(t) + (1 - 2*sin(t)^2);
py(t):= 2*sin(t) - (2*cos(t)*sin(t));
m(t) := (cos(t) - 1)/sin(t);
sols: solve([(oy - py(t1)) = (ox - px(t1)) * m(t1), (oy - py(t2)) = (ox - px(t2)) * m(t2)], [ox,oy]);
ox12: ox, sols[1];
ox23: ox12, t2=t3, t1=t2;
zz:trigreduce(ox23-ox12);
trigrat(zz);
trigrat(ox12);
trigrat(sin(x)/cos(x));

          (%i1) trigrat(sin(3*a)/sin(a+%pi/3));
          (%o1)            sqrt(3) sin(2 a) + cos(2 a) - 1

The following example is taken from Davenport, Siret, and Tournier, Calcul Formel, Masson (or in English, Addison-Wesley), section 1.5.5, Morley theorem.

          (%i1) c : %pi/3 - a - b$
          (%i2) bc : sin(a)*sin(3*c)/sin(a+b);
                                                    %pi
                            sin(a) sin(3 (- b - a + ---))
                                                     3
          (%o2)             -----------------------------
                                     sin(b + a)
          (%i3) ba : bc, c=a, a=c;
                                                   %pi
                              sin(3 a) sin(b + a - ---)
                                                    3
          (%o3)               -------------------------
                                            %pi
                                    sin(a - ---)
                                             3
          (%i4) ac2 : ba^2 + bc^2 - 2*bc*ba*cos(b);
                   2         2         %pi
                sin (3 a) sin (b + a - ---)
                                        3
          (%o4) ---------------------------
                          2     %pi
                       sin (a - ---)
                                 3
                                                 %pi
           - (2 sin(a) sin(3 a) sin(3 (- b - a + ---)) cos(b)
                                                  3
                       %pi            %pi
           sin(b + a - ---))/(sin(a - ---) sin(b + a))
                        3              3
                2       2              %pi
             sin (a) sin (3 (- b - a + ---))
                                        3
           + -------------------------------
                          2
                       sin (b + a)
          (%i5) trigrat (ac2);
          (%o5) - (sqrt(3) sin(4 b + 4 a) - cos(4 b + 4 a)
           - 2 sqrt(3) sin(4 b + 2 a) + 2 cos(4 b + 2 a)
           - 2 sqrt(3) sin(2 b + 4 a) + 2 cos(2 b + 4 a)
           + 4 sqrt(3) sin(2 b + 2 a) - 8 cos(2 b + 2 a) - 4 cos(2 b - 2 a)
           + sqrt(3) sin(4 b) - cos(4 b) - 2 sqrt(3) sin(2 b) + 10 cos(2 b)
           + sqrt(3) sin(4 a) - cos(4 a) - 2 sqrt(3) sin(2 a) + 10 cos(2 a)
           - 9)/4

(%o1)                                true
(%i2) 

Trigrat Example

Related Examples

trigrat

y:x^2-4;

x:5;

trigrat(y);

Calculate

trigrat

y:x^2-4;

x:5;

trigrat(y);

Calculate