Question: test solution of PDE

restart

with(PDEtools)

undeclare(prime)

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

(1)

with(DEtools)

NULL

with(DifferentialAlgebra)

"with(Student[ODEs][Solve]): "

with(IntegrationTools)

with(inttrans)

with(PDEtools)

with(Physics)

with(PolynomialTools)

with(RootFinding)

with(SolveTools)

with(LinearAlgebra)

with(sumtools)

pde := I*(diff(psi(x, t), t))+alpha*(diff(psi(x, t), `$`(x, 2)))+(beta[3]*abs(psi(x, t))+beta[4]*abs(psi(x, t))^2)*psi(x, t)+gamma*(diff(abs(psi(x, t))^2, `$`(x, 2)))*psi(x, t)/abs(psi(x, t)) = 0

case1 := {k = k, lambda = sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3], w = -(9*alpha*k^2*beta[4]+2*beta[3]^2)/(9*beta[4]), A[0] = -beta[3]/(3*beta[4]), A[1] = beta[3]/(3*beta[4]), B[1] = 0}

" psi(x,t):=U(xi)*exp(I*(-k*x+w*t+theta))"

proc (x, t) options operator, arrow, function_assign; U(xi)*exp(I*(-k*x+w*t+theta)) end proc

(2)

" U(xi):=-(beta[3] (cosh(xi)-sinh(xi)))/(3 beta[4] cosh(xi))"

proc (xi) options operator, arrow, function_assign; -(1/3)*beta[3]*(cosh(xi)-sinh(xi))/(beta[4]*cosh(xi)) end proc

(3)

convert(U(xi), trig)

-(1/3)*beta[3]*(cosh(xi)-sinh(xi))/(beta[4]*cosh(xi))

(4)

xi := sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*kt+x)

(-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)

(5)

S := psi(x, t)

-(1/3)*beta[3]*(cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x))-sinh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))*exp(I*(-k*x+t*w+theta))/(beta[4]*cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))

(6)

solution := subs(case1, S)

-(1/3)*beta[3]*(cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x))-sinh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))*exp(I*(-k*x-(1/9)*(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/beta[4]+theta))/(beta[4]*cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))

(7)

pdetest(psi(x, t) = -beta[3]*(cosh(sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*k+x))-sinh(sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*k+x)))*exp(I*(-k*x-(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/(9*beta[4])+theta))/(3*beta[4]*cosh(sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*k+x)))*exp(I*(-k*x-(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/(9*beta[4])+theta)), pde)

Error, (in pdetest) unable to determine the indeterminate function

 

NULL

 

 

 

 

Download pde-solve.mw

Please Wait...