Question: derivative from finite difference

Since (1/h)[f(i+1,t)-f(i,t)]=f(x,t)_{x} as h goes to zero, 'i' is the discrete index along x-axis. How to do it in Maple? How to reduce Eq. (5) into continuous derivatives?

restart

with(LinearAlgebra)

with(PDEtools)

with(Physics)

with(plots)

Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1)

``

U := proc (i, t) options operator, arrow; Matrix([[1+I*(q(i+1, t)-q(i, t))/lambda, I*(r(i+1, t)-r(i, t))/lambda], [I*(r(i+1, t)-r(i, t))/lambda, 1-I*(q(i+1, t)-q(i, t))/lambda]]) end proc

proc (i, t) options operator, arrow; Matrix([[1+Physics:-`*`(Physics:-`*`(I, q(i+1, t)-q(i, t)), Physics:-`^`(lambda, -1)), Physics:-`*`(Physics:-`*`(I, r(i+1, t)-r(i, t)), Physics:-`^`(lambda, -1))], [Physics:-`*`(Physics:-`*`(I, r(i+1, t)-r(i, t)), Physics:-`^`(lambda, -1)), 1-Physics:-`*`(Physics:-`*`(I, q(i+1, t)-q(i, t)), Physics:-`^`(lambda, -1))]]) end proc

(2)

``

V := proc (i, t) options operator, arrow; Matrix([[-((1/2)*I)*lambda, -r(i, t)], [r(i, t), ((1/2)*I)*lambda]]) end proc

proc (i, t) options operator, arrow; Matrix([[Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1, Physics:-`^`(2, -1)), I), lambda), -1), Physics:-`*`(r(i, t), -1)], [r(i, t), Physics:-`*`(Physics:-`*`(Physics:-`*`(1, Physics:-`^`(2, -1)), I), lambda)]]) end proc

(3)

NULL

z := diff(U(i, t), t)+U(i, t).V(i, t)-V(i+1, t).U(i, t)

Matrix(%id = 4525182530)

(4)

z11 := simplify(lambda*z[1, 1]/h, size) = 0

I*(r(i+1, t)^2-r(i, t)^2+(D[2](q))(i+1, t)-(diff(q(i, t), t)))/h = 0

(5)

NULL

Download limit.mw

Please Wait...