kill(all)$

maxima : differences equation ( = how to use ),version 1.0
peter.vlasschaert@gmail.com,26/01/2020

load  packages
============

load(lrats)$
load(combinatorics)$

p1:Δ^(2).{u[n]};

definition:differences
================

. = non commutative operator.

defenition 1
=========

p2:Δ.{u[n]}=u[n+1]-u[n];

p2a:rhs(p2) = lhs(p2);

definition 2
========

p3:u[n+1]=E*u[n];

p3a:rhs(p3) = lhs(p3);

definition 3
=========

p4:Δ^(p+q).{u[n]} = Δ^(p).{u[n]}*Δ^(q).{u[n]};

p4a:lhs(p4) =rhs(p4);

rem:extra

p4b:Δ^(1) = Δ;

definition 3a
------------------

p4b1:Δ.{u[n]} =Δ;

definition:3b
------------------

p4b2a:(u[n+1]-u[n])*Δ =Δ.(u[n+1]-u[n]);

p4b2b:Δ*(u[n+1]-u[n]) =Δ.(u[n+1]-u[n]);

definition :3c
------------------

p4c:Δ.u[n] = Δ.{u[n]};

find relation: E & Δ
===============

use  :definition 1
-------------------------

p5: p2;

use: definition 2
----------------------

p5a:lhs(p5)=subst([p3],rhs(p5));

p5b:lhs(p5a)=factorsum(rhs(p5a));

p5c1:part(lhs(p5b),1) =part(rhs(p5b),1);

E=f(Δ)  ?
------------

p5c2:solve(p5c1,E)[1];

definition 4
=========

p6:p5c1;

definition 5
=========

p6a:p5c2;

find :Δ^(2) . {u[n]}
=============

use :definition 3,3a
----------------------------

p7:[p=1];
p7a:subst(p7,p4a);

p7b:lhs(p7a)=subst([p4b1],rhs(p7a));

p7c:subst([q=1],p7b);

use :definition 1
----------------------

p7d:lhs(p7c) =subst([p2],rhs(p7c));

use :definition 3b
-------------------------

p7e:lhs(p7d) = subst([p4b2a],rhs(p7d));

p7f:lhs(p7e) =expand(rhs(p7e));

use :definition 3c
------------------------

p7h:subst([n=n+1],p4c);

p7h1:[p4c,p7h];

p7h2:subst(p7h1,p7f);

uise:definition 1
----------------------
n => n+1

p7i1:subst([n=n+1],p2);

p7i2:p2;

p7i3:lhs(p7h2) =subst([p7i1,p7i2],rhs(p7h2));

find : p7i3 , lhs =g(E)
================

use :definition 2
-----------------------

p8:lhs(p7i3) = rhs(p7i3);

p8a:subst([n=n+1],p3);

p8b:lhs(p8a) =subst([p3],rhs(p8a));

p8c:[p8b,p3];
p8d:lhs(p8) = subst(p8c,rhs(p8));

p8d1:lhs(p8d) =factorsum(rhs(p8d));

p8d2:part(lhs(p8d1) ,1)=part(rhs(p8d1) ,1);

p8d3:expand(p8d2);

we get same result
==============

use definition : 4
-----------------------

p9a:p6;

p9b:(p9a)^2;

p9c:expand(p9b);

check : 'p9c' ? 'p8d3'
================

p10:is(rhs(p9c) =rhs(p8d3));

integer values: k=1,2,3,4, ......
=======================
example :k=1,k=2,k =3,k =4

p11a:p6;
p11b:(p6)^2;
p11c:expand(p11b);
p11b1:(p6)^3;
p11c1:expand(p11b1);
p11b2:(p6)^4;
p11c2:expand(p11b2);

rem : Δ =r1(E)
==========

1a:
==

k = odd  => E^0 = -1
k = even => E^0 = +1

1b:
==

binomial coef : with alternating sign
===========================
k=1,{1,1}           => {1,-1}              ,odd
k=2,{1,2,1}        => {1,-2,1}          ,even
k=3,{1,3,3,1}     => {1,-3,3,-1}      ,odd
k=4,{1,4,6,4,1}  => {1,-4,6,-4,1}   ,even

analog : E = r2(Δ).