Re: FullSimplify question

• To: mathgroup at smc.vnet.net
• Subject: [mg73670] Re: [mg73619] FullSimplify question
• From: "Chris Chiasson" <chris at chiasson.name>
• Date: Sat, 24 Feb 2007 02:17:40 -0500 (EST)
• References: <200702230934.EAA17512@smc.vnet.net>

```You could try to Block it, perhaps by Block[{TrigReduce=Identity},...]

On 2/23/07, dimitris <dimmechan at yahoo.com> wrote:
> Consider the expression Tan[x] - Cot[x]
>
> Then
>
> Simplify[Tan[x] - Cot[x]]
> 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.
>
> So
>
> 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
> Cantrell.
>
> Using Chris Chiasson's code from another recent post we get
>
> Developer`ClearCache []
>
>  Block[{\$Output = {OpenWrite["C:\\msgStream.m"]}},
>  TracePrint[FullSimplify[TrigToExp[ArcSinh[2]/ArcCsch[2]]],
>  TraceInternal -> True]; Close /@ \$Output];
>  HoldComplete[Expression]],
> symb_Symbol /; AtomQ[Unevaluated[symb]] &&
>  Context[Unevaluated[symb]] === "System`" :> HoldComplete[symb], {0,
> Infinity},
>
> HoldComplete[{Abs, AiryAi,
>    AiryAiPrime, AiryBi, AiryBiPrime, Algebraics, Alternatives, And,
> Apart, \
> Apply, ArcCos, ArcCosh, ArcCot, ArcCoth, ArcCsc, ArcCsch, ArcSec,
> ArcSech,
>     ArcSin, ArcSinh, ArcTan, ArcTanh, Arg, Assumptions, AtomQ,
> Attributes,
>     Automatic, BesselI, BesselJ, BesselK, BesselY, Beta,
> BetaRegularized,
>      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, \
> ExpandAll,
>     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,
> GaussianIntegers,
>     GCD, GegenbauerC, General, GoldenRatio, Greater,
>      HoldAllComplete, HoldComplete, HoldFirst,
>     HoldForm, HoldPattern, HoldRest, Hypergeometric0F1, \
> Hypergeometric0F1Regularized, Hypergeometric1F1,
>     Hypergeometric1F1Regularized, Hypergeometric2F1, \
> Hypergeometric2F1Regularized, HypergeometricPFQ, \
> HypergeometricPFQRegularized, HypergeometricU, \[ImaginaryI],
> Identity,
>     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,
> MessageName,
>     Mod, Module, Modulus, MoebiusMu, Multinomial, N, Negative, None,
>     Not, Null, NumberQ,
>     Numerator, NumericFunction, NumericQ, Off, On, OneIdentity,
> Optional,
>     Options, Or, Part, PartitionsP, Pattern, PatternTest, =CF=80, Plus,
> Pochhammer,
>      PolyGamma, PolyLog, PolynomialQ, Position, Positive,
>     Power, PowerExpand, Prime, PrimePi, ProductLog, Protected,
> Quotient,
>     Rational, Rationalize, Re, ReplaceAll, Return,
> RiemannSiegelTheta,
>     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
> called.
> How is it possible to PREVENT the calling of TrigReduce?
>
> Thanks a lot.
>
> Dimitris
>
>
>

--
http://chris.chiasson.name/

```

• Prev by Date: simple question
• Next by Date: Re: RE: Re: Showing that ArcSinh[2]/ArcCsch[2] is 3?
• Previous by thread: FullSimplify question
• Next by thread: How to manipulate globals in a function?