MathGroup Archive 2006

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

Search the Archive

Re: Re: Re: Trigonometric simplification

I would not like Mathematica to return any answers with PlusMinus  
etc, since such answers would be ambigious and the ambiguity would  
then propagate into any more complex formulae composed of such  
formulae, giving rise to very high Smale complexity (the number of  
branch points in an algorithm)  as well as ambiguity. Expressions  
involving If etc, would also lead through nesting to high Smale  
complexity, but at lest would not be ambiguous. However, all this is  
not necessary in this particular case since much better (and un- 
ambiguous) answer is Abs[Cos[a]]*Sin[a]^2. Actually, it seems  
difficult to make FullSimplify return this answer but FullSimplify  
can easily prove it:



Note however that this is slightly problematic, since it is not  
entirely  clear if according to  Mathematica's conventions the two  
expressions Abs[Cos[a]]*Sin[a]^2 and Tan[a]^2/(Sec[a]^2)^(3/2) should  
be considered equal when a is an integer multiple of Pi/2. Certainly  
substituting such a value directly into the two expressions will not  
produce the same output.

Andrzej Kozlowski

On 23 Aug 2006, at 13:16, Kai Gauer wrote:

> When Mathematica does its simplifications, is there a method to
> specify for a functional  type of return value, rather than just an
> equation that matches the way that Mathematica returns its numerical
> sign choice approximations? ie is it possible to set up rules that
> FullSimplify can act on to try and write the result in the form:
> ((\[PlusMinus*1])*Cos[a])*Sin[a]^2,
> rather than the two distinct partial solutions which are given below?
> The answer in the above form would be a decent method of more
> efficient return for more general answers that I usually get when
> using Simplify, etc, and frequently come in pairs like this. However,
> I am uncertain of how to extend the \[PlusMinus] operator to be
> extensive enough to allow it to appear as a simplification tool.
> One idea that comes to mind is to write the above in the form of
> trying to return a similar idea to:
> Which[newSimplify[r], Pi/2 < a < 3*(Pi/2), newSimplify[r], -Pi/2 < a <
> Pi/2] -> Assuming[n \[Element] Integers, ((-1)^n)*Cos[a]*Sin[a]^2]
> (** untested syntax here - sorry... possibly someone can improve on
> it?! the idea being that Mathematica should try and take both
> solutions, and basically union them to look like one solution,
> subjected to the way that \[PlusMinus is extended to the Mathematica
> syntax of mathematical simplifications on operators such as Plus and
> Minus. I also had trouble deciding on whether to write the conditional
> as a Which, Switch or If type of conditional **),
> Here, I am guessing that
> Assuming[n \[Element] Integers, (\[PlusMinus*1])*Cos[a]*Sin[a]^2]
> would match something like the solution set
> {+Cos[a]*Sin[a]^2, -Cos[a]*Sin[a]^2}
> and at this point, I would be not so inclined on what the
> If-And-Only-If is that is imposed on n for Mathematica's choice of
> when to pick which function that it should use. Even better, it could
> even be useful to have an extended definition of n returned as a
> result that still would stay compatible witht the formula return
> values if n is not just in Integers, say Rationals or Complex,
> instead. For me however, such a tool would be beneficial, but not
> necessary.
> Does anyone have any packages to recommend that make this easier  
> for the user?
> I would rather be able to relax the restraints on the interval
> conditions returned in such a solution than to try and constrain the
> number of (mostly failed) total simplification attempts as unattempted
> at Evaluated. This is because it is easier for the user to pick which
> interval the functional should be in, and, since humans think with
> human arithmetic rules rather than mathematica arithmetic tries, it
> would be sensible to allow for such an extension.
> Much of the time, my access is limited to version 3 syntax, but am
> wondering hether the latest versions would expect to have such a
> revised symbolic simplification syntax for regrouping solutions.
> On 8/22/06, Andrzej Kozlowski <akoz at> wrote:
>> On 21 Aug 2006, at 09:27, carlos at wrote:
>>> As an intermediate result of some calculations I have
>>> the expression
>>>    r=Tan[a]^2/(Sec[a]^2)^(3/2)
>>> where a is real. How can I coerce Mathematica into
>>> simplifying that to
>>>    r=Cos[a]*Sin[a]^2
>>> Both Simplify and FullSimplify with assumptions on a
>>> fail to get the simpler form.
>> I would not be very happy if Mathematica did what you seem to want it
>> to do only under the assumptions that a is real since:
>> r = Tan[a]^2/(Sec[a]^2)^(3/2)
>> Assuming[Pi/2 < a < 3*(Pi/2), Simplify[r]]
>> (-Cos[a])*Sin[a]^2
>> On the other hand:
>> Assuming[-Pi/2 < a < Pi/2, Simplify[r]]
>> Cos[a]*Sin[a]^2
>> Andrzej Kozlowski

  • Prev by Date: Re: General--Difficulties in Understanding Mathematica Syntax
  • Next by Date: nullspaces
  • Previous by thread: Re: Re: Trigonometric simplification
  • Next by thread: Re: Trigonometric simplification