WA573

80 Reputation

4 Badges

2 years, 47 days

MaplePrimes Activity


These are questions asked by WA573

Are the results consistent either we use simplify(expression) or simplify(expression,size)? It seems (2) and (3) are not consistent.

restart

with(PDEtools); with(LinearAlgebra)

b := -(2*I)*exp(2*t*Im(lambda1))*(exp(I*a*x/conjugate(lambda1))*exp((2*I)*a*x/lambda1)*exp((-I*a*x)*(1/conjugate(lambda1)))*exp(I*conjugate(lambda1)*t)+exp(I*lambda1*t)*exp(I*a*x/lambda1)*exp((-I*a*x)*(1/lambda1))*exp((2*I)*a*x/conjugate(lambda1))*(abs(`ε1`)^2+abs(`ε2`)^2))*conjugate(`ε1`)*Im(lambda1)/(exp((2*I)*a*x/lambda1)*abs(`ε1`)^2*exp(-(2*I)*a*x/conjugate(lambda1))*exp(2*t*Im(lambda1))+exp(-(2*I)*a*x/lambda1)*abs(`ε1`)^2*exp((2*I)*a*x/conjugate(lambda1))*exp(2*t*Im(lambda1))+exp(I*a*x/lambda1)*exp((-I*a*x)*(1/lambda1))*exp(I*a*x/conjugate(lambda1))*exp((-I*a*x)*(1/conjugate(lambda1)))*(abs(`ε2`)^4+2*abs(`ε1`)^2*abs(`ε2`)^2+abs(`ε1`)^4+2*abs(`ε2`)^2*exp(2*t*Im(lambda1))+exp(4*t*Im(lambda1))))

-(2*I)*exp(2*t*Im(lambda1))*(exp(I*a*x/conjugate(lambda1))*exp((2*I)*a*x/lambda1)*exp(-I*a*x/conjugate(lambda1))*exp(I*conjugate(lambda1)*t)+exp(I*lambda1*t)*exp(I*a*x/lambda1)*exp(-I*a*x/lambda1)*exp((2*I)*a*x/conjugate(lambda1))*(abs(epsilon1)^2+abs(epsilon2)^2))*conjugate(epsilon1)*Im(lambda1)/(exp((2*I)*a*x/lambda1)*abs(epsilon1)^2*exp(-(2*I)*a*x/conjugate(lambda1))*exp(2*t*Im(lambda1))+exp(-(2*I)*a*x/lambda1)*abs(epsilon1)^2*exp((2*I)*a*x/conjugate(lambda1))*exp(2*t*Im(lambda1))+exp(I*a*x/lambda1)*exp(-I*a*x/lambda1)*exp(I*a*x/conjugate(lambda1))*exp(-I*a*x/conjugate(lambda1))*(abs(epsilon2)^4+2*abs(epsilon1)^2*abs(epsilon2)^2+abs(epsilon1)^4+2*abs(epsilon2)^2*exp(2*t*Im(lambda1))+exp(4*t*Im(lambda1))))

(1)

bdif := simplify(diff(b, x)); bdifxzero := simplify(subs({x = 0}, bdif))

4*Im(lambda1)*exp(2*t*Im(lambda1))*a*conjugate(epsilon1)*(conjugate(lambda1)*abs(epsilon1)^2*(abs(epsilon1)^2+abs(epsilon2)^2)*exp((t*(I*lambda1+2*Im(lambda1))*abs(lambda1)^2+(4*I)*a*(lambda1-(1/2)*conjugate(lambda1))*x)/abs(lambda1)^2)+exp(((I*conjugate(lambda1)+2*Im(lambda1))*t*abs(lambda1)^2-(2*I)*(lambda1-2*conjugate(lambda1))*a*x)/abs(lambda1)^2)*abs(epsilon1)^2*lambda1+2*abs(epsilon1)^2*(conjugate(lambda1)-(1/2)*lambda1)*exp((I*conjugate(lambda1)^2*t+(2*I)*a*x+2*t*Im(lambda1)*conjugate(lambda1))/conjugate(lambda1))+2*abs(epsilon2)^2*lambda1*(abs(epsilon1)^2+abs(epsilon2)^2)*exp((I*t*abs(lambda1)^2+(2*I)*a*x+2*t*Im(lambda1)*conjugate(lambda1))/conjugate(lambda1))+lambda1*(abs(epsilon1)^2+abs(epsilon2)^2)*exp((I*t*abs(lambda1)^2+(2*I)*a*x+4*t*Im(lambda1)*conjugate(lambda1))/conjugate(lambda1))+2*conjugate(lambda1)*exp((I*t*abs(lambda1)^2+(2*I)*a*x+2*t*Im(lambda1)*lambda1)/lambda1)*abs(epsilon2)^2+conjugate(lambda1)*exp((I*t*abs(lambda1)^2+(2*I)*a*x+4*t*Im(lambda1)*lambda1)/lambda1)+(-abs(epsilon1)^2*(conjugate(lambda1)-2*lambda1)*exp((I*lambda1^2*t+(2*I)*a*x+2*t*Im(lambda1)*lambda1)/lambda1)+(abs(epsilon1)^2+abs(epsilon2)^2)*(lambda1*(abs(epsilon1)^2+abs(epsilon2)^2)*exp(I*(t*abs(lambda1)^2+2*a*x)/conjugate(lambda1))+conjugate(lambda1)*exp(I*(t*abs(lambda1)^2+2*a*x)/lambda1)))*(abs(epsilon1)^2+abs(epsilon2)^2))/((abs(epsilon1)^4+2*abs(epsilon1)^2*abs(epsilon2)^2+abs(epsilon2)^4+2*abs(epsilon2)^2*exp(2*t*Im(lambda1))+exp((2*t*Im(lambda1)*abs(lambda1)^2-(2*I)*(lambda1-conjugate(lambda1))*a*x)/abs(lambda1)^2)*abs(epsilon1)^2+exp((2*t*Im(lambda1)*abs(lambda1)^2+(2*I)*(lambda1-conjugate(lambda1))*a*x)/abs(lambda1)^2)*abs(epsilon1)^2+exp(4*t*Im(lambda1)))^2*abs(lambda1)^2)

 

12*Im(lambda1)*exp(2*t*Im(lambda1))*((2/3)*abs(epsilon2)^2*lambda1*(abs(epsilon1)^2+abs(epsilon2)^2)*exp(t*(I*abs(lambda1)^2+2*Im(lambda1)*conjugate(lambda1))/conjugate(lambda1))+(1/3)*lambda1*(abs(epsilon1)^2+abs(epsilon2)^2)*exp(t*(I*abs(lambda1)^2+4*Im(lambda1)*conjugate(lambda1))/conjugate(lambda1))+(2/3)*conjugate(lambda1)*exp(t*(I*abs(lambda1)^2+2*lambda1*Im(lambda1))/lambda1)*abs(epsilon2)^2+(1/3)*conjugate(lambda1)*exp(t*(I*abs(lambda1)^2+4*lambda1*Im(lambda1))/lambda1)+(1/3)*lambda1*(abs(epsilon1)^2+abs(epsilon2)^2)^3*exp(I*abs(lambda1)^2*t/conjugate(lambda1))+(1/3)*conjugate(lambda1)*(abs(epsilon1)^2+abs(epsilon2)^2)^2*exp(I*abs(lambda1)^2*t/lambda1)+((-I*Im(lambda1)+(1/3)*lambda1+(1/3)*Re(lambda1))*exp((I*conjugate(lambda1)+2*Im(lambda1))*t)+(I*Im(lambda1)+(1/3)*conjugate(lambda1)+(1/3)*Re(lambda1))*(abs(epsilon1)^2+abs(epsilon2)^2)*exp(t*(I*lambda1+2*Im(lambda1))))*abs(epsilon1)^2)*a*conjugate(epsilon1)/(abs(lambda1)^2*((2*abs(epsilon2)^2+2*abs(epsilon1)^2)*exp(2*t*Im(lambda1))+abs(epsilon2)^4+2*abs(epsilon1)^2*abs(epsilon2)^2+abs(epsilon1)^4+exp(4*t*Im(lambda1)))^2)

(2)

bdif1 := simplify(diff(b, x), size); bdif1xzero := simplify(subs({x = 0}, bdif1), size)

4*Im(lambda1)*(2*exp(I*a*x/lambda1)*exp(I*conjugate(lambda1)*t)*(exp(I*a*x/conjugate(lambda1)))^2*exp(-I*a*x/lambda1)*((1/2)*abs(epsilon1)^4+abs(epsilon1)^2*abs(epsilon2)^2+(1/2)*abs(epsilon2)^4+abs(epsilon2)^2*exp(2*t*Im(lambda1))+(1/2)*exp(4*t*Im(lambda1)))*exp((2*I)*a*x/lambda1)*conjugate(lambda1)*(exp(-I*a*x/conjugate(lambda1)))^2+2*exp(I*a*x/conjugate(lambda1))*(((exp(I*a*x/lambda1))^2*lambda1*exp(I*lambda1*t)*((1/2)*abs(epsilon1)^4+abs(epsilon1)^2*abs(epsilon2)^2+(1/2)*abs(epsilon2)^4+abs(epsilon2)^2*exp(2*t*Im(lambda1))+(1/2)*exp(4*t*Im(lambda1)))*(abs(epsilon1)^2+abs(epsilon2)^2)*(exp(-I*a*x/lambda1))^2+exp(-(2*I)*a*x/lambda1)*exp((2*I)*a*x/lambda1)*exp(2*t*Im(lambda1))*exp(I*conjugate(lambda1)*t)*abs(epsilon1)^2*(conjugate(lambda1)-(1/2)*lambda1))*exp((2*I)*a*x/conjugate(lambda1))+(1/2)*(exp((2*I)*a*x/lambda1))^2*exp(2*t*Im(lambda1))*exp(I*conjugate(lambda1)*t)*exp(-(2*I)*a*x/conjugate(lambda1))*lambda1*abs(epsilon1)^2)*exp(-I*a*x/conjugate(lambda1))+exp(I*a*x/lambda1)*abs(epsilon1)^2*exp(I*lambda1*t)*exp(-I*a*x/lambda1)*exp((2*I)*a*x/conjugate(lambda1))*(conjugate(lambda1)*exp(-(2*I)*a*x/lambda1)*exp((2*I)*a*x/conjugate(lambda1))-exp((2*I)*a*x/lambda1)*exp(-(2*I)*a*x/conjugate(lambda1))*(conjugate(lambda1)-2*lambda1))*exp(2*t*Im(lambda1))*(abs(epsilon1)^2+abs(epsilon2)^2))*conjugate(epsilon1)*a*exp(2*t*Im(lambda1))/((2*exp(I*a*x/lambda1)*exp(I*a*x/conjugate(lambda1))*exp(-I*a*x/lambda1)*((1/2)*abs(epsilon1)^4+abs(epsilon1)^2*abs(epsilon2)^2+(1/2)*abs(epsilon2)^4+abs(epsilon2)^2*exp(2*t*Im(lambda1))+(1/2)*exp(4*t*Im(lambda1)))*exp(-I*a*x/conjugate(lambda1))+exp(2*t*Im(lambda1))*abs(epsilon1)^2*(exp(-(2*I)*a*x/lambda1)*exp((2*I)*a*x/conjugate(lambda1))+exp((2*I)*a*x/lambda1)*exp(-(2*I)*a*x/conjugate(lambda1))))^2*lambda1*conjugate(lambda1))

 

2*Im(lambda1)*exp(0)*conjugate(epsilon1)*exp(2*t*Im(lambda1))*a*(conjugate(lambda1)*exp(I*conjugate(lambda1)*t)+exp(I*lambda1*t)*lambda1*(abs(epsilon1)^2+abs(epsilon2)^2))/((((exp(0))^2*abs(epsilon2)^2+abs(epsilon1)^2)*exp(2*t*Im(lambda1))+(1/2)*(exp(0))^2*(exp(4*t*Im(lambda1))+(abs(epsilon1)^2+abs(epsilon2)^2)^2))*lambda1*conjugate(lambda1))

(3)

NULL

Download simplisize.mw

I am trying to find the value of y4 at t=infinity and t=-infinity when lambda1>lambda2 or lambda1<lambda2. But every time I got the same answer. For example, if we do it by hand then the terms which are responsible for making the indeterminate form can be extracted and canceled (see Fig.). 

But in limit.mw y4 is too lengthy-expression and very difficult to do it manually.

How to handle these errors in plotting the solutions?compare.mw

As I assumed 'n' and 'm' are real, eta is complex. But still, there is a bar on these discrete independent variables. Secondly, the substitution of (8) applies in some terms of 'r2', and the remaining terms remain as is it.

restart

with(LinearAlgebra); with(PDEtools); with(plots); with(LREtools)

setup(mathematicalnotation = true)

setup(mathematicalnotation = true)

(1)

assume(n::real); assume(m::real)

A := proc (n, m) options operator, arrow; Matrix([[eta*phi(n, m), conjugate(eta)*conjugate(psi(n, m))], [phi(n, m), conjugate(psi(n, m))]]) end proc; Adet := Determinant(A(n, m))

eta*phi(n, m)*conjugate(psi(n, m))-conjugate(eta)*conjugate(psi(n, m))*phi(n, m)

(2)

B := proc (n, m) options operator, arrow; Matrix([[phi(n, m), conjugate(psi(n, m))], [-psi(n, m), conjugate(phi(n, m))]]) end proc; Bdet := Determinant(B(n, m))

phi(n, m)*conjugate(phi(n, m))+conjugate(psi(n, m))*psi(n, m)

(3)

r := Adet/Bdet

(eta*phi(n, m)*conjugate(psi(n, m))-conjugate(eta)*conjugate(psi(n, m))*phi(n, m))/(phi(n, m)*conjugate(phi(n, m))+conjugate(psi(n, m))*psi(n, m))

(4)

p := {eta = 1+I, phi(n, m) = (1+I*a*eta)^n*(1+I*b*eta^2)^m, psi(n, m) = (1-I*a*eta)^n*(1-I*b*eta^2)^m, conjugate(eta) = 1-I, conjugate(phi(n, m)) = (1-I*a*conjugate(eta))^n*(1-I*b*conjugate(eta)^2)^m, conjugate(phi(n, m)) = (1+I*a*conjugate(eta))^n*(1+I*b*conjugate(eta)^2)^m}

{eta = 1+I, phi(n, m) = (1+I*a*eta)^n*(1+I*b*eta^2)^m, psi(n, m) = (1-I*a*eta)^n*(1-I*b*eta^2)^m, conjugate(eta) = 1-I, conjugate(phi(n, m)) = (1-I*a*conjugate(eta))^n*(1-I*b*conjugate(eta)^2)^m, conjugate(phi(n, m)) = (1+I*a*conjugate(eta))^n*(1+I*b*conjugate(eta)^2)^m}

(5)

r1 := simplify(subs(p, r))

(2*I)*(1+I*a*eta)^n*(1+I*b*eta^2)^m*conjugate((1-I*a*eta)^n*(1-I*b*eta^2)^m)/((1+I*a*eta)^n*(1+I*b*eta^2)^m*(1-I*a*conjugate(eta))^n*(1-I*b*conjugate(eta)^2)^m+abs(-1+I*a*eta)^(2*n)*abs(I*b*eta^2-1)^(2*m))

(6)

r2 := 1-I*delta(r1, n)

1-I*((2*I)*(1+I*a*eta)^(n+1)*(1+I*b*eta^2)^m*conjugate((1-I*a*eta)^(n+1)*(1-I*b*eta^2)^m)/((1+I*a*eta)^(n+1)*(1+I*b*eta^2)^m*(1-I*a*conjugate(eta))^(n+1)*(1-I*b*conjugate(eta)^2)^m+abs(-1+I*a*eta)^(2*n+2)*abs(I*b*eta^2-1)^(2*m))-(2*I)*(1+I*a*eta)^n*(1+I*b*eta^2)^m*conjugate((1-I*a*eta)^n*(1-I*b*eta^2)^m)/((1+I*a*eta)^n*(1+I*b*eta^2)^m*(1-I*a*conjugate(eta))^n*(1-I*b*conjugate(eta)^2)^m+abs(-1+I*a*eta)^(2*n)*abs(I*b*eta^2-1)^(2*m)))

(7)

exp_expr := subs({(1+I*b*eta^2)^m = exp(I*eta^2*t)}, r2)

1-I*((2*I)*(1+I*a*eta)^(n+1)*exp(I*eta^2*t)*conjugate((1-I*a*eta)^(n+1)*(1-I*b*eta^2)^m)/((1+I*a*eta)^(n+1)*exp(I*eta^2*t)*(1-I*a*conjugate(eta))^(n+1)*(1-I*b*conjugate(eta)^2)^m+abs(-1+I*a*eta)^(2*n+2)*abs(I*b*eta^2-1)^(2*m))-(2*I)*(1+I*a*eta)^n*exp(I*eta^2*t)*conjugate((1-I*a*eta)^n*(1-I*b*eta^2)^m)/((1+I*a*eta)^n*exp(I*eta^2*t)*(1-I*a*conjugate(eta))^n*(1-I*b*conjugate(eta)^2)^m+abs(-1+I*a*eta)^(2*n)*abs(I*b*eta^2-1)^(2*m)))

(8)

``

NULL

NULL

NULL

plot3d(abs(exp_expr), n = -5 .. 5, t = -5 .. 5, eta = 1+I)

Error, (in plot3d) unexpected option: eta = 1+I

 
 

Download soldis.mw

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

1 2 3 4 5 Page 2 of 5