Question: How generate systems of equation and solve?

in here How we can seperate the coefficent of conjugate this conjugate sign how remove from my equation ?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(u(x, t)); declare(U(xi)); declare(V(xi)); declare(P(x, t)); declare(q(x, t))

u(x, t)*`will now be displayed as`*u

 

U(xi)*`will now be displayed as`*U

 

V(xi)*`will now be displayed as`*V

 

P(x, t)*`will now be displayed as`*P

 

q(x, t)*`will now be displayed as`*q

(2)

pde := I*(diff(u(x, t), t))+diff(u(x, t), `$`(x, 2))+abs(u(x, t))^2*u(x, t) = 0

I*(diff(u(x, t), t))+diff(diff(u(x, t), x), x)+abs(u(x, t))^2*u(x, t) = 0

(3)

S := u(x, t) = (sqrt(a)+P(x, t))*exp(I*a*t)

u(x, t) = (a^(1/2)+P(x, t))*exp(I*a*t)

(4)

S1 := conjugate(u(x, t)) = (sqrt(a)+conjugate(P(x, t)))*exp(-I*a*t)

conjugate(u(x, t)) = (a^(1/2)+conjugate(P(x, t)))*exp(-I*a*t)

(5)

Q := abs(u(x, t))^2 = u(x, t)*conjugate(u(x, t))

abs(u(x, t))^2 = u(x, t)*conjugate(u(x, t))

(6)

F1 := expand(simplify(subs({S, S1}, rhs(Q))))

a+a^(1/2)*P(x, t)+a^(1/2)*conjugate(P(x, t))+abs(P(x, t))^2

(7)

F2 := abs(u(x, t))^2 = remove(has, F1, abs(P(x, t))^2)

abs(u(x, t))^2 = a+a^(1/2)*P(x, t)+a^(1/2)*conjugate(P(x, t))

(8)

FF := collect(F2, sqrt(a))

abs(u(x, t))^2 = a+(P(x, t)+conjugate(P(x, t)))*a^(1/2)

(9)

F3 := abs(u(x, t))^2*u(x, t) = (a+(P(x, t)+conjugate(P(x, t)))*sqrt(a))*rhs(S)

abs(u(x, t))^2*u(x, t) = (a+(P(x, t)+conjugate(P(x, t)))*a^(1/2))*(a^(1/2)+P(x, t))*exp(I*a*t)

(10)

F4 := remove(has, F3, P(x, t)*conjugate(P(x, t)))

abs(u(x, t))^2*u(x, t) = (a+(P(x, t)+conjugate(P(x, t)))*a^(1/2))*(a^(1/2)+P(x, t))*exp(I*a*t)

(11)

expand(%)

abs(u(x, t))^2*u(x, t) = exp(I*a*t)*a^(3/2)+2*exp(I*a*t)*a*P(x, t)+exp(I*a*t)*a^(1/2)*P(x, t)^2+exp(I*a*t)*a*conjugate(P(x, t))+exp(I*a*t)*a^(1/2)*conjugate(P(x, t))*P(x, t)

(12)

pde_linear, pde_nonlinear := selectremove(proc (term) options operator, arrow; not has((eval(term, P(x, t) = T*P(x, t)))/T, T) end proc, expand(%))

() = (), abs(u(x, t))^2*u(x, t) = exp(I*a*t)*a^(3/2)+2*exp(I*a*t)*a*P(x, t)+exp(I*a*t)*a^(1/2)*P(x, t)^2+exp(I*a*t)*a*conjugate(P(x, t))+exp(I*a*t)*a^(1/2)*conjugate(P(x, t))*P(x, t)

(13)

F6 := abs(u(x, t))^2*u(x, t) = exp(I*a*t)*a^(3/2)+2*exp(I*a*t)*a*P(x, t)+exp(I*a*t)*a*conjugate(P(x, t))

abs(u(x, t))^2*u(x, t) = exp(a*t*I)*a^(3/2)+2*exp(a*t*I)*a*P(x, t)+exp(a*t*I)*a*conjugate(P(x, t))

(14)

subs({F6, S}, pde)

I*(diff((a^(1/2)+P(x, t))*exp(a*t*I), t))+diff(diff((a^(1/2)+P(x, t))*exp(a*t*I), x), x)+exp(a*t*I)*a^(3/2)+2*exp(a*t*I)*a*P(x, t)+exp(a*t*I)*a*conjugate(P(x, t)) = 0

(15)

eval(%)

I*((diff(P(x, t), t))*exp(a*t*I)+I*(a^(1/2)+P(x, t))*a*exp(a*t*I))+(diff(diff(P(x, t), x), x))*exp(a*t*I)+exp(a*t*I)*a^(3/2)+2*exp(a*t*I)*a*P(x, t)+exp(a*t*I)*a*conjugate(P(x, t)) = 0

(16)

expand(%)

I*(diff(P(x, t), t))*exp(a*t*I)+exp(a*t*I)*a*P(x, t)+(diff(diff(P(x, t), x), x))*exp(a*t*I)+exp(a*t*I)*a*conjugate(P(x, t)) = 0

(17)

expand(%/exp(I*a*t))

I*(diff(P(x, t), t))+a*P(x, t)+diff(diff(P(x, t), x), x)+a*conjugate(P(x, t)) = 0

(18)

PP := collect(%, a)

(P(x, t)+conjugate(P(x, t)))*a+I*(diff(P(x, t), t))+diff(diff(P(x, t), x), x) = 0

(19)

U1 := P(x, t) = r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))

P(x, t) = r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))

(20)

eval(subs(U1, PP))

(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))+conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))))*a+I*(-I*r[1]*m*exp(I*(l*x-m*t))+I*r[2]*m*exp(-I*(l*x-m*t)))-r[1]*l^2*exp(I*(l*x-m*t))-r[2]*l^2*exp(-I*(l*x-m*t)) = 0

(21)

simplify((r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))+conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))))*a+I*(-I*r[1]*m*exp(I*(l*x-m*t))+I*r[2]*m*exp(-I*(l*x-m*t)))-r[1]*l^2*exp(I*(l*x-m*t))-r[2]*l^2*exp(-I*(l*x-m*t)) = 0)

conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t)))*a+r[2]*(-l^2+a-m)*exp(-I*(l*x-m*t))+r[1]*exp(I*(l*x-m*t))*(-l^2+a+m) = 0

(22)

J := eval(%)

conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t)))*a+r[2]*(-l^2+a-m)*exp(-I*(l*x-m*t))+r[1]*exp(I*(l*x-m*t))*(-l^2+a+m) = 0

(23)

expand(%)

a*conjugate(r[1])*exp(I*conjugate(m)*conjugate(t))/exp(I*conjugate(l)*conjugate(x))+a*conjugate(r[2])*exp(I*conjugate(l)*conjugate(x))/exp(I*conjugate(m)*conjugate(t))-r[2]*exp(I*m*t)*l^2/exp(I*l*x)+r[2]*exp(I*m*t)*a/exp(I*l*x)-r[2]*exp(I*m*t)*m/exp(I*l*x)-r[1]*exp(I*l*x)*l^2/exp(I*m*t)+r[1]*exp(I*l*x)*a/exp(I*m*t)+r[1]*exp(I*l*x)*m/exp(I*m*t) = 0

(24)

indets(%)

{a, l, m, t, x, r[1], r[2], exp(I*l*x), exp(I*m*t), exp(I*conjugate(l)*conjugate(x)), exp(I*conjugate(m)*conjugate(t)), conjugate(l), conjugate(m), conjugate(t), conjugate(x), conjugate(r[1]), conjugate(r[2])}

(25)

subs({exp(-I*(l*x-m*t)) = Y, exp(I*(l*x-m*t)) = X}, J)

conjugate(X*r[1]+Y*r[2])*a+r[2]*(-l^2+a-m)*Y+r[1]*X*(-l^2+a+m) = 0

(26)

collect(%, {X, Y})

conjugate(X*r[1]+Y*r[2])*a+r[2]*(-l^2+a-m)*Y+r[1]*X*(-l^2+a+m) = 0

(27)

Download conjugate.mw

Please Wait...