axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-mail] Failure to simplify trig functions of simple rational


From: Bill Page
Subject: Re: [Axiom-mail] Failure to simplify trig functions of simple rational multiples of %pi
Date: Fri, 14 Aug 2009 12:00:22 -0400

What do you mean by "automatic"? Using 'simiplfy' I get

...
eq1:=subst(%,z = 1/(2*n));


                                          Type: Equation(Expression(Integer))
s1:=solve(%,f1);


                                    Type: List(Equation(Expression(Integer)))
simplify eval(f1,s1)


                 e1
   (13)  ------------------
           2    2    2    2
         (n  + m  + l )%pi
                                                    Type: Expression(Integer)
(14) ->


Is this what you expect?

Regards,
Bill Page.

On Fri, Aug 14, 2009 at 11:42 AM, Dan Hatton<address@hidden> wrote:
>
> Dear All,
>
> Appended below is an Axiom input script whose last two lines (the
> subst() and solve()) produce output involving cos(%pi/2), sin(%pi/2),
> and sin(%pi), which I'd naively expect to be automatically simplfied
> to 0, 1, and 0 respectively.  How can I get this automatic
> simplification to happen, please?
>
> Thanks,
>
> Dan
>
> l:Union(Variable l,Integer)
> m:Union(Variable m,Integer)
> n:Union(Variable n,Integer)
>
> A :=  a*sin(l*%pi*x)*cos(m*%pi*y)*cos(n*%pi*z)
> B :=  b*cos(l*%pi*x)*sin(m*%pi*y)*cos(n*%pi*z)
> C :=  c*cos(l*%pi*x)*cos(m*%pi*y)*sin(n*%pi*z)
> D :=  d*cos(l*%pi*x)*cos(m*%pi*y)*sin(n*%pi*z)
>
> E :=
>  
> e1*cos(l*%pi*x)*cos(m*%pi*y)*sin(n*%pi*z)+(e2+e3*cos(2*l*%pi*x)+e4*cos(2*m*%pi*y))*sin(2*n*%pi*z)
> F :=
>  
> f1*cos(l*%pi*x)*cos(m*%pi*y)*sin(n*%pi*z)+(f2+f3*cos(2*l*%pi*x)+f4*cos(2*m*%pi*y))*sin(2*n*%pi*z)
>
> A*differentiate(D,x)+B*differentiate(D,y)+C*differentiate(D,z)-E-differentiate(F,x,2)-differentiate(F,y,2)-differentiate(F,z,2)
>  = 0
>
> subst(%,z = 1/(2*n))
>
> solve(%,f1)
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]