Next: Convert to Hyperbolic Functions, Previous: Convert to sin and cos, Up: Functions and Variables for trigtools [Contents][Index]

#### 96.2.2 Convert to Trignometric Functions

Function: c2trig (x) ¶

  The function c2trig (convert to trigonometric) reduce expression with hyperbolic functions sinh, cosh, tanh, coth to trigonometric expression with sin, cos, tan, cot.

  Examples:

  1.     (%i1) load(trigtools)$
         (%i2) sinh(x)=c2trig(sinh(x));
         cosh(x)=c2trig(cosh(x));
         tanh(x)=c2trig(tanh(x));
         coth(x)=c2trig(coth(x));
         (%o2)                     sinh(x) = - %i sin(%i x)
         (%o3)                        cosh(x) = cos(%i x)
         (%o4)                     tanh(x) = - %i tan(%i x)
         (%o5)                      coth(x) = %i cot(%i x)

  2. see http://www.math.utexas.edu/pipermail/maxima/2013/034585.html

         (%i6) cos(p+q*%i);
         (%o6)                           cos(%i q + p)
         (%i7) trigexpand(%);
         (%o7)                cos(p) cosh(q) - %i sin(p) sinh(q)
         (%i8) c2trig(%);
         (%o8)                           cos(%i q + p)

  3.     (%i9) sin(a+b*%i);
         (%o9)                           sin(%i b + a)
         (%i10) trigexpand(%);
         (%o10)                %i cos(a) sinh(b) + sin(a) cosh(b)
         (%i11) c2trig(%);
         (%o11)                           sin(%i b + a)

  4.     (%i12) cos(a*%i+b*%i);
         (%o12)                         cos(%i b + %i a)
         (%i13) trigexpand(%);
         (%o13)                 sinh(a) sinh(b) + cosh(a) cosh(b)
         (%i14) c2trig(%);
         (%o14)                         cos(%i b + %i a)

  5.     (%i15) tan(a+%i*b);
         (%o15)                           tan(%i b + a)

         (%i16) trigexpand(%);
                                       %i tanh(b) + tan(a)
         (%o16)                       ---------------------
                                      1 - %i tan(a) tanh(b)

         (%i17) c2trig(%);
         (%o217)                           tan(%i b + a)

  6.     (%i18) cot(x+%i*y);
         (%o18)                           cot(%i y + x)
         (%i19) trigexpand(%);
                                    (- %i cot(x) coth(y)) - 1
         (%o19)                     -------------------------
                                       cot(x) - %i coth(y)
         (%i20) c2trig(%);
         (%o20)                           cot(%i y + x)

Next: Convert to Hyperbolic Functions, Previous: Convert to sin and cos, Up: Functions and Variables for trigtools [Contents][Index]