Manual Maple 2.1.6.mws

Comandos Úteis e Simples

Seção 2.1: Simplificação

Session 2.1.6: simplify

>    restart;

>    e := cos(x)^5 + sin(x)^4 + 2*cos(x)^2 - 2*sin(x)^2 - cos(2*x);

e := cos(x)^5+sin(x)^4+2*cos(x)^2-2*sin(x)^2-cos(2*x)

>    simplify( e );

cos(x)^5+cos(x)^4

>    restart;

>    Next := (x,N) ->  x - (x^2 - N*x - 1)/(2*x - N);

Next := proc (x, N) options operator, arrow; x-(x^2-N*x-1)/(2*x-N) end proc

>    top := k ->  c*a^k + d*(-1/a)^k;

top := proc (k) options operator, arrow; c*a^k+d*(-1/a)^k end proc

>    bot := k ->  e*a^k + f*(-1/a)^k;

bot := proc (k) options operator, arrow; e*a^k+f*(-1/a)^k end proc

>    N :=  a - 1/a;

N := a-1/a

>    solve( {top(0) = N, top(1) = N^2 + 1}, {c,d});

{d = -1/(a*(1+a^2)), c = a^3/(1+a^2)}

>    assign( % );

>    solve( {bot(0) = 1, bot(1) = N}, {e,f});

{f = 1/(1+a^2), e = a^2/(1+a^2)}

>    assign( % );

>    X := top(k)/bot(k);

X := (a^3/(1+a^2)*a^k-1/a/(1+a^2)*(-1/a)^k)/(a^2/(1+a^2)*a^k+1/(1+a^2)*(-1/a)^k)

>    nxt := Next( X, N ):

>    testeq( nxt, top(2*k+1)/bot(2*k+1) );

true

>    zero := simplify( nxt - top(2*k+1)/bot(2*k+1) );

zero := 0