Question: How plot complex function including two complex function ?

This question is related to the Question Why i can't find x&y C-point ?

why i get error in end and how i can fix this error?

restart

with(PDEtools)

undeclare(prime, quiet); declare(u(x, y, t), quiet); declare(f(x, y, t), quiet)

theta := i -> t*w[i]+y*l[i]+x:

eqf := f(x, y, t) = theta(1)*theta(2)+Bij(1, 2):

eqfcomplex := eval(eqf, l[2] = conjugate(l[1])):

eq17 := u(x, y, t) =2*diff(f(x, y, t), x)/f(x, y, t):

equ := eval(eq17, eqfcomplex):

sys := map(normal, {diff(rhs(equ), x), diff(rhs(equ), y)}):

nsys  := map(numer, sys):
nroot := solve(nsys, {x, y}, explicit):

dsys  := map(denom, sys):
droot := solve(dsys, {x, y}, explicit):

{nroot} intersect {droot}

{}

(1)

compact_ans1 := nroot[1]:

__w := seq(w[i] = (-beta*l[i]^2 - b*l[i] - a), i=1..2):

__Bij := (i,j) -> 12*alpha/(beta*(l[i] - l[j])^2):

eval(eval(compact_ans1, {__w, Bij(1, 2) = __Bij(1, 2)}), l[1]=lambda[1]+I*lambda[2])
assuming lambda[1]::real, lambda[2]::real:
 

ans1 := map(simplify, %, size): # it's up to you to use another simplification strategy

eqp1 := eval(eval(ans1, l[2] = conjugate(l[1])), l[1] = lambda[1]+I*lambda[2])

NULL

# Do the same for the other nroot solutions

eqp := {x = xp+((1/2)*beta*lambda[2]^3+I*(-beta*lambda[1]-b)*lambda[2]^2*(1/2)-((1/2)*beta*conjugate(lambda[1]+I*lambda[2])^2-(1/2)*beta*lambda[1]^2+(1/2)*b*conjugate(lambda[1]+I*lambda[2])+a)*lambda[2]+I*lambda[1]*(conjugate(lambda[1]+I*lambda[2])-lambda[1])*(beta*conjugate(lambda[1]+I*lambda[2])+beta*lambda[1]+b)*(1/2))*t/lambda[2], y = yp-(I*beta*lambda[2]^2+(2*beta*lambda[1]+b)*lambda[2]+I*((conjugate(lambda[1]+I*lambda[2])+lambda[1])*beta+b)*(conjugate(lambda[1]+I*lambda[2])-lambda[1]))*t/(2*lambda[2])}

NULL

vx, vy := diff(eval(x, eqp), t), diff(eval(y, eqp), t); dydx := simplify(vy/vx)

eqfp := dchange(eqp, eqfcomplex, [xp, yp], params = [a, b, alpha, beta, `λ__1`, `λ__2`], simplify); eq17p := dchange(eqp, eq17, [xp, yp], params = [a, b, alpha, beta, `λ__1`, `λ__2`], simplify); eqt := simplify(eval(eq17p, eqfp))

eqt1 := eval(subs({xp = x, yp = y}, eqt), l[1] = lambda[1]+I*lambda[2])

with(plots); lambda[1] := .14; lambda[2] := .68; alpha := -.46; beta := 1.83; a := 1.56; b := -.19; eq := y = (-beta*conjugate(lambda[1]+I*lambda[2])^2-b*conjugate(lambda[1]+I*lambda[2])-beta*lambda[2]^2+I*(2*beta*lambda[1]+b)*lambda[2]+lambda[1]*(beta*lambda[1]+b))*(x+(2*I)*sqrt(3)*lambda[1]*sqrt(alpha/(beta*(lambda[1]+I*lambda[2]-conjugate(lambda[1]+I*lambda[2]))^2))/lambda[2])/((lambda[1]+I*lambda[2])*beta*conjugate(lambda[1]+I*lambda[2])^2+(lambda[1]+I*lambda[2])*b*conjugate(lambda[1]+I*lambda[2])-I*beta*lambda[2]^3+(-beta*lambda[1]-b)*lambda[2]^2+I*(-beta*lambda[1]^2+2*a)*lambda[2]-beta*lambda[1]^3-b*lambda[1]^2); U := proc (x, y, a, b, alpha, beta, `λ__1`, `λ__2`) options operator, arrow; rhs(eqt1) end proc; contour1 := contourplot(eval(U(x, y, a, b, alpha, beta, `λ__1`, `λ__2`), t = -50), x = -200 .. 200, y = -100 .. 100, contours = 30, color = red, grid = [100, 100], transparency = .1); contour2 := contourplot(eval(U(x, y, a, b, alpha, beta, `λ__1`, `λ__2`), t = 0), x = -200 .. 200, y = -100 .. 100, contours = 30, color = green, grid = [100, 100], transparency = .1); contour3 := contourplot(eval(U(x, y, a, b, alpha, beta, `λ__1`, `λ__2`), t = 50), x = -200 .. 200, y = -100 .. 100, contours = 30, color = blue, grid = [100, 100], transparency = .1); trajectory_plot := implicitplot(eq, x = -200 .. 200, y = -200 .. 200, color = black, thickness = 1); T := textplot([[100, 45, "t=50", color = blue], [45, -10, "t=0", color = green], [-100, -45, "t=-50", color = red]], font = [Times, Roman, 16]); display(contour1, contour2, contour3, trajectory_plot, T, labels = ["x", "y"], scaling = constrained, size = [1200, 800])

.14

 

.68

 

-.46

 

1.83

 

1.56

 

-.19

 

y = (.4755583090+0.*I)*(x+(-0.+.1517971372*I)*3^(1/2))

 

proc (x, y, a, b, alpha, beta, lambda__1, lambda__2) options operator, arrow; rhs(eqt1) end proc

 

Error, (in plot/iplot2d) invalid input: Plot:-ColorBar expects its 2nd argument, ymin, to be of type numeric, but received infinity

 

Error, (in plot/iplot2d) invalid input: Plot:-ColorBar expects its 2nd argument, ymin, to be of type numeric, but received infinity

 

Error, (in plot/iplot2d) invalid input: Plot:-ColorBar expects its 2nd argument, ymin, to be of type numeric, but received infinity

 

Error, (in plots:-display) expecting plot structure but received: contour1

 
8

Download line-plot.mw

Please Wait...