axiom-developer
[Top][All Lists]

Re: [Axiom-developer] unexpected behaviour of normalize(1-(cos(x))^2)

 From: Michael Becker Subject: Re: [Axiom-developer] unexpected behaviour of normalize(1-(cos(x))^2) Date: Thu, 13 Aug 2009 04:47:09 +0200 User-agent: KMail/1.7.1

```Am Mittwoch, 5. August 2009 15:59 schrieben Sie:
> Michael,
>
> Trig identity substitutions are somewhat problematic in Axiom.
> See the src/input/schaum* files for examples.
>
> If the subexpression (1-cos(x)^2) occurs in your expression E you can
> write:
>
>    sinrule:=rule((1-cos(x)^2) == sin(x)^2)
>
> and then use this rule for your expression E thus
>
>   sinrule(E)

Tim,

this does not always  work (see (6) and (7)) :

(1) -> )set mess auto off
(1) ->  sinrule:=rule((1-cos(x)^2) == sin(x)^2)
(1) ->
2                   2
(1)  - cos(x)  + %C + 1 == sin(x)  + %C
Type: RewriteRule(Integer,Integer,Expression Integer)
(2) -> f:= 1 - cos(x)^2
(2) ->
2
(2)  - cos(x)  + 1
Type: Expression Integer
(3) -> sinrule(f)
(3) ->
2
(3)  sin(x)
Type: Expression Integer
(4) -> sinrule(f+3)
(4) ->
2
(4)  - cos(x)  + 4
Type: Expression Integer
(5) -> sinrule(f+a)
(5) ->
2
(5)  sin(x)  + a
Type: Expression Integer
(6) -> sinrule (2*(f+a))
(6) ->
2
(6)  - 2cos(x)  + 2a + 2
Type: Expression Integer
(7) -> sinrule (1/(f+a))
(7) ->
1
(7)  - ---------------
2
cos(x)  - a - 1
Type: Expression Integer

- Michael

>
> Axiom will not derive several of the trig identities from scratch.
>
> In your expression we have something of the form
>     (4a^2) / (a^2 + 1)^2    where a = tan(x/2)
> so Axiom needs to show that
>    (a^2+1)^2 != 0
>    (a^2+1) != 0
>    a^2 != -1
>    a != i
> or, by back-substitution
>   tan(x/2) != i
> which it does not conclude automatically, even though this
> is clearly true in the domain Expression(Integer).
>
> Michael Becker wrote:
> >     Hi,
> >
> >
> >    Is this (30)  the expected bevaviour of 'normalize' ??
> >
> >
> > (29) -> normalize ((sin(x))^2+(cos(x))^2)
> > (29) ->
> >    (29)  1
> >                                                      Type: Expression
> > Integer
> >
> >
> >
> > (30) -> normalize (1-(cos(x))^2)
> > (30) ->
> >                      x 2
> >                 4tan(-)
> >                      2
> >    (30)  ----------------------
> >              x 4        x 2
> >          tan(-)  + 2tan(-)  + 1
> >              2          2
> >                                                      Type: Expression
> > Integer
> >
> >
> >
> >
> >
> >
> >     -- Michael

------------------------------------------------------------------------------------

Diese Nachricht könnte vertrauliche und/oder rechtlich
geschützte Informationen enthalten. Wenn Sie nicht der
Adressat dieser Email sind oder nicht autorisiert sind, diese
für den Adressaten entgegenzunehmen, so ist es untersagt,
diese Nachricht oder in ihr enthaltene Informationen zu nutzen,
zu kopieren, offen zu legen oder anderweitig weiterzuverarbeiten.
Sollten Sie diese Nachricht fälschlicherweise erhalten haben,
verständigen Sie den Absender bitte unverzüglich per Antwort auf
diese Mail und löschen sie diese anschließend.
Vielen Dank für Ihre Kooperation.
------------------------------------------------------------------------------------

This message may contain confidential and/or privileged
information. If you are not the addressee or authorized
disclose or take any action based on this message or any
information herein. If you have received this message in
and delete this message. Thank you for your co-operation.
------------------------------------------------------------------------------------