MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

FullSimplify question

  • To: mathgroup at
  • Subject: [mg73619] FullSimplify question
  • From: "dimitris" <dimmechan at>
  • Date: Fri, 23 Feb 2007 04:34:23 -0500 (EST)

Consider the expression Tan[x] - Cot[x]


Simplify[Tan[x] - Cot[x]]

Simplify always tries to minimize the value returned by the setting of
the ComplexityFunction. This means that the functions Tan and Cot will
not be present in the following result.


Simplify[Tan[x] - Cot[x], ComplexityFunction ->
             (Count[#, _Tan | _Cot, Infinity]&)]
-Cos[2 x] Csc[x] Sec[x]

When we explicitly INCLUDE TrigToExp in the list of transformations to
be applied, we get a result that does not contain any trig functions.

Simplify[Tan[x] - Cot[x], ComplexityFunction ->
   (Count[#, _Tan | _Cot | _Sin | _Cos | _Csc | _Sec, Infinity]&),
         TransformationFunctions -> {TrigToExp}]
(I*(E^((-I)*x) - E^(I*x)))/(E^((-I)*x) + E^(I*x)) + (I*(E^((-I)*x) +
E^(I*x)))/(E^((-I)*x) - E^(I*x))

Now consider the expression TrigToExp[ArcSinh[2]/ArcCsch[2]] from a
recent post of David

Using Chris Chiasson's code from another recent post we get

Developer`ClearCache []

 Block[{$Output = {OpenWrite["C:\\msgStream.m"]}},
 TraceInternal -> True]; Close /@ $Output];
symb_Symbol /; AtomQ[Unevaluated[symb]] &&
 Context[Unevaluated[symb]] === "System`" :> HoldComplete[symb], {0,
 Heads -> True]], HoldComplete]

HoldComplete[{Abs, AiryAi,
   AiryAiPrime, AiryBi, AiryBiPrime, Algebraics, Alternatives, And,
Apart, \
Apply, ArcCos, ArcCosh, ArcCot, ArcCoth, ArcCsc, ArcCsch, ArcSec,
    ArcSin, ArcSinh, ArcTan, ArcTanh, Arg, Assumptions, AtomQ,
    Automatic, BesselI, BesselJ, BesselK, BesselY, Beta,
     Binomial, Blank, BlankNullSequence, Block, Ceiling, ChebyshevT,
    ChebyshevU, Coefficient, CoefficientList, Complement, Complex, \
ComplexityFunction, CompoundExpression, Condition, Conjugate, Cos,
    Cosh, CoshIntegral, CosIntegral, Cot, Coth, Cross, Csc,
    Csch, =C2=B0, Denominator, Derivative, DiracDelta, Dispatch, Divide,
    DivisorSigma, \[ExponentialE], EllipticE, EllipticF, EllipticK, \
EllipticNomeQ, EllipticPi, Equal, Erf,
    Erfc, Erfi, EulerE, EulerPhi, EvenQ, ExcludedForms, Exp, Expand, \
    ExpIntegralE, ExpIntegralEi, Exponent, ExpToTrig, Extension,
Factor, \
FactorComplete, Factorial, Factorial2, FactorInteger,
FactorSquareFree, \
FactorTerms, Fail, False, Fibonacci, First, Floor,
    FractionalPart, FreeQ, FresnelC, FresnelS,
     FullSimplify, Function, Gamma, GammaRegularized,
    GCD, GegenbauerC, General, GoldenRatio, Greater,
    HarmonicNumber, Head, Heads, HermiteH, HoldAll,
     HoldAllComplete, HoldComplete, HoldFirst,
    HoldForm, HoldPattern, HoldRest, Hypergeometric0F1, \
Hypergeometric0F1Regularized, Hypergeometric1F1,
    Hypergeometric1F1Regularized, Hypergeometric2F1, \
Hypergeometric2F1Regularized, HypergeometricPFQ, \
HypergeometricPFQRegularized, HypergeometricU, \[ImaginaryI],
    If, Im, Inequality, =E2=88=9E, Integer, IntegerPart, IntegerQ,
    Integrate, Intersection, InverseEllipticNomeQ, InverseErf,
JacobiCD, \
JacobiCS, JacobiDC, JacobiDS,
    JacobiNC, JacobiND, JacobiNS, JacobiP, JacobiSC, JacobiSD,
    JacobiSymbol, JacobiZeta, LaguerreL, Last, LCM, LeafCount,
LegendreP, \
LegendreQ, Length, Less, LessEqual, List, Listable, Log, LogGamma,
    LogIntegral, Map, MatchQ, Max, MeijerG, MemberQ, Message,
    Mod, Module, Modulus, MoebiusMu, Multinomial, N, Negative, None,
    Not, Null, NumberQ,
    Numerator, NumericFunction, NumericQ, Off, On, OneIdentity,
    Options, Or, Part, PartitionsP, Pattern, PatternTest, =CF=80, Plus,
     PolyGamma, PolyLog, PolynomialQ, Position, Positive,
    Power, PowerExpand, Prime, PrimePi, ProductLog, Protected,
    Rational, Rationalize, Re, ReplaceAll, Return,
    RiemannSiegelZ, Root, Round, Rule, RuleCondition, RuleDelayed,
SameQ, \
SameTest, Sec, Sech, Select, Set, Sign, Sin, Sinh, SinhIntegral,
    SinIntegral, Slot, SphericalHarmonicY, Sqrt, StruveH, StruveL,
    Sum, Switch, Symbol, Tan, Tanh, TimeConstraint, Times,
    Together, TransformationFunctions, Trig, TrigReduce, True,
    TrueQ, Unevaluated, Union, UnitStep, UnsameQ, Variables,
    With, Zeta, $Assumptions, $ConditionHold, $MessageList, $Off}]

During the process of simplification the function TrigReduce is
How is it possible to PREVENT the calling of TrigReduce?

Thanks a lot.


  • Prev by Date: Re: record intermediate steps
  • Next by Date: Re: Approximate/asymptotic factorization
  • Previous by thread: Re: ArcCosh[x] (1)
  • Next by thread: Re: FullSimplify question