Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Re: Trigonometric simplification


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 mimuw.edu.pl> wrote:
>
> On 21 Aug 2006, at 09:27, carlos at colorado.edu 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: Need good reference for writing Stylesheets
  • Next by Date: Where Style Sheets are located
  • Previous by thread: Re: Trigonometric simplification
  • Next by thread: Re: Re: Re: Trigonometric simplification