unexpected behaviour of normalize(1-(cos(x))^2)

View: New views
4 Messages — Rating Filter:   Alert me  

unexpected behaviour of normalize(1-(cos(x))^2)

by Michael Becker-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



    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
to receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein. If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your co-operation.
------------------------------------------------------------------------------------
We make your business move.




_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: unexpected behaviour of normalize(1-(cos(x))^2)

by Tim Daly-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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)

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
>  



_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: unexpected behaviour of normalize(1-(cos(x))^2)

by Michael Becker-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
to receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein. If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your co-operation.
------------------------------------------------------------------------------------
We make your business move.




_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: unexpected behaviour of normalize(1-(cos(x))^2)

by Bill Page-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Why not use removeCosSq ?

(3) -> removeCosSq(f)

              2
   (3)  sin(x)
                                                    Type: Expression(Integer)
(4) -> removeCosSq(f+3)

              2
   (4)  sin(x)  + 3
                                                    Type: Expression(Integer)
(5) -> removeCosSq(f+a)

              2
   (5)  sin(x)  + a
                                                    Type: Expression(Integer)

(6) -> removeCosSq(2*(f+a))

               2
   (6)  2sin(x)  + 2a
                                                    Type: Expression(Integer)
(7) -> removeCosSq(1/(f+a))

             1
   (7)  -----------
              2
        sin(x)  + a
                                                    Type: Expression(Integer)

See also:

removeCoshSq
removeSinSq
removeSinhSq


Regards,
Bill Page.

On Wed, Aug 12, 2009 at 10:47 PM, Michael Becker wrote:

> 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
> to receive this for the addressee, you must not use, copy,
> disclose or take any action based on this message or any
> information herein. If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your co-operation.
> ------------------------------------------------------------------------------------
> We make your business move.
>
>
>
>
> _______________________________________________
> Axiom-developer mailing list
> Axiom-developer@...
> http://lists.nongnu.org/mailman/listinfo/axiom-developer
>


_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer