simplification of sin(0) and cos(0)



On 17/11/2013 10:37 AM, Dieter Vanderelst wrote:
> Dear List,
>
> Please tell me if this is not the right place to ask this but I've run 
> into a problem using maxima.
>
> I have an expression (code below) involving a number of trigonometric 
> functions. Now, I want to simplify this expression assuming certain 
> variables are zero. This is, I want to assume that EL_1 and AZ_1 are 
> zero. This would imply that my expression can be simplified as 
> sin(0)=0 and cos(0)=1. However, calling various simplification 
> functions on sigma will not result in this (trivial) simplification.
>
> What am I missing? Typing sin(EL_1); will result in 0.
>
> Best, Dieter
>
> sigma: sin(EL_1) * sin(EL_2) + cos(EL_1) * cos(EL_2) * 
> cos(abs(AZ_1-AZ_2));
> EL_1:0;AZ_1:0

You can:
- set EL_! and AZ_t then reevaulate sigma with the '' (two single 
quotes) operator, as in %i2 to %i5, or
- evaluate sigma with EL_1=0,AZ_1=0, as in %i6

(%i1) sigma: sin(EL_1) * sin(EL_2) + cos(EL_1) * cos(EL_2) * 
cos(abs(AZ_1-AZ_2))$
(%i2) EL_1:0$
(%i3) AZ_1:0$
(%i4) sigma;
(%o4)   sin(EL_1) sin(EL_2) + cos(abs(AZ_2 - AZ_1)) cos(EL_1) cos(EL_2)
(%i5) ''sigma;
(%o5)                      cos(abs(AZ_2)) cos(EL_2)
(%i6) sigma,EL_1=0,AZ_1=0;
(%o6)                      cos(abs(AZ_2)) cos(EL_2)