dharr

Dr. David Harrington

8215 Reputation

22 Badges

20 years, 339 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@Carl Love True, but the standard way to abbreviate input for anything nontrivial would be with diff_table. For example

declare(u(x));
U:=diff_table(u(x));

then U[x,x] is used to abbreviate diff(u(x),x,x) and U[] for u(x).

@FZ Sorry, I don't understand what they are doing.

@FZ Please expand the image. As far as I can see, they use the first integral, which didn't work for your case unless you know the form for the integrating factor.

@FZ Your equation has a derivative on the rhs, unlike your textbook example, which can be done like this:

restart

with(PDEtools); declare(U(xi), Phi(xi))

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

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

de1 := diff(U(xi), xi, xi) = R__1*U(xi)+R__2*U(xi)^3

diff(diff(U(xi), xi), xi) = R__1*U(xi)+R__2*U(xi)^3

Ultimately the method consists of integrating the negative of the rhs, treating U as a simple variable, and then adding (1/2)*Phi^2

subs(U(xi) = u, -rhs(de1)); int(%, u = 0 .. u); H := (1/2)*Phi(xi)^2+subs(u = U(xi), %)

-R__2*u^3-R__1*u

-(1/4)*R__2*u^4-(1/2)*R__1*u^2

(1/2)*Phi(xi)^2-(1/4)*R__2*U(xi)^4-(1/2)*R__1*U(xi)^2

``

Download Hamiltonian3.mw

@FZ Sorry, I don't understand; r1 or r2 are not in the form of your first equation.

Hamiltonian2.mw

@Tom GIV Yes, that's correct.

@janhardo I managed to get various other solutions using various combinations of dchange and HINT=, but never sol11. Here's one attempt:

restart;

with(PDEtools): declare(u(x,t)); U := diff_table(u(x,t));

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

table( [(  ) = u(x, t) ] )

PDE1 := a^2*U[x,x] + b*exp(beta*U[]) - U[t,t];
Sol11 := u(x,t) = 1/beta*ln(2*(B^2-a^2*A^2)/(b*beta*(A*x+B*t+C)^2));
Test11 := pdetest(Sol11,PDE1);

a^2*(diff(diff(u(x, t), x), x))+b*exp(beta*u(x, t))-(diff(diff(u(x, t), t), t))

u(x, t) = ln(2*(-A^2*a^2+B^2)/(b*beta*(A*x+B*t+C)^2))/beta

0

An obvious change of variables that would lead to this form is

tr := u(x,t) = ln(w(x,t)/beta)/beta:
PDE2:=numer(dchange(tr,PDE1,[w],normal));

(diff(diff(w(x, t), x), x))*w(x, t)*a^2+b*w(x, t)^3-(diff(w(x, t), x))^2*a^2-(diff(diff(w(x, t), t), t))*w(x, t)+(diff(w(x, t), t))^2

solw := pdsolve(PDE2);

w(x, t) = -2*(_C2^2*a^2-_C3^2)*tanh(_C2*x+_C3*t+_C1)^2/b+2*(_C2^2*a^2-_C3^2)/b

sol2:=eval(tr, simplify(solw));

u(x, t) = ln((2*_C2^2*a^2-2*_C3^2)*sech(_C2*x+_C3*t+_C1)^2/(b*beta))/beta

pdetest(sol2, PDE1);

0

NULL

Download pdsolve.mw

@Andiguys You can manipulate the pieces with op, see: Q_12.mw

The empty otherwise just means there are no other possibilities.

@salim-barzani I simply followed the logic of the paper. I don't know about bilinear forms in this context; perhaps the nonlinear parts hare are bilinear forms? Here the linear part was set to zero, which implies the nonlinear part is also zero.

@FZ This is _a, not a; just a name Maple chose for the dummy integration variable.

@vv Thanks. (I'm still waiting for this to finish.) But I am also playing around with subsets of the eigenvalues (in disguised form), for which this will work, and be faster.

@acer Thanks. Much faster than @vv's.

@dharr 

restart;

with(PDEtools):

interface(showassumed=0):

#assume(x::real);assume(t::real);assume(lambda1::complex);assume(lambda2::complex);assume(A1::real);assume(A2::real);assume(B1::real);assume(B2::real);assume(delta1::real); assume(delta2::real);assume(y::real);assume(a::real);

z := -2*delta2*exp((-2*I*a*delta1^3*y + (x + y + t)^2*(B2 + B1)*delta1^2 + (-2*I*a*y*delta2^2 + t*I)*delta1 + delta2^2*(x + y + t)^2*(B2 + B1))/(delta1^2 + delta2^2))/((exp((2*(delta1^2 + delta2^2)*(x + y + t)^2*B2 + 2*(a*y*delta1^2 + a*y*delta2^2 + 1/2*t)*delta2)/(delta1^2 + delta2^2)) + exp((2*(delta1^2 + delta2^2)*(x + y + t)^2*B1 - 2*(a*y*delta1^2 + a*y*delta2^2 + 1/2*t)*delta2)/(delta1^2 + delta2^2)))*(delta1^2 + delta2^2)):

pde:=diff(u(x,t),t)-diff(u(x,t),x)=eval(z,y=0):

infolevel[pdsolve]:=3;

3

pdsolve(pde,u(x,t));

First set of solution methods (general or quasi general solution)

   -> trying characteristic strip method for first order PDEs

   <- characteristic strip method for first order PDEs successful

<- First set of solution methods successful

<- Returning a *general* solution

u(x, t) = 2*Intat(delta2*exp(B1*(x+t)^2*delta1^2/(delta1^2+delta2^2)+B1*(x+t)^2*delta2^2/(delta1^2+delta2^2)+B2*(x+t)^2*delta1^2/(delta1^2+delta2^2)+B2*(x+t)^2*delta2^2/(delta1^2+delta2^2)+I*delta1*(x+t)/(delta1^2+delta2^2)-I*delta1*_a/(delta1^2+delta2^2))/((delta1^2+delta2^2)*(exp(2*B2*(x+t)^2*delta1^2/(delta1^2+delta2^2)+2*B2*(x+t)^2*delta2^2/(delta1^2+delta2^2)+delta2*(x+t)/(delta1^2+delta2^2)-delta2*_a/(delta1^2+delta2^2))+exp(2*B1*(x+t)^2*delta1^2/(delta1^2+delta2^2)+2*B1*(x+t)^2*delta2^2/(delta1^2+delta2^2)-delta2*(x+t)/(delta1^2+delta2^2)+delta2*_a/(delta1^2+delta2^2)))), _a = x)+f__1(x+t)

 

NULL

Download pdsolve1.mw

@FZ The assumptions about real are probably not effective. Since y is not involved, I would leave it out. If you know the general form of the solution you can give it as a hint. HINT=`*` is equivalent to HINT=f(x)*g(t) but you can put in other expressions here. 

restart;

with(PDEtools):

interface(showassumed=0):

#assume(x::real);assume(t::real);assume(lambda1::complex);assume(lambda2::complex);assume(A1::real);assume(A2::real);assume(B1::real);assume(B2::real);assume(delta1::real); assume(delta2::real);assume(y::real);assume(a::real);

z := -2*delta2*exp((-2*I*a*delta1^3*y + (x + y + t)^2*(B2 + B1)*delta1^2 + (-2*I*a*y*delta2^2 + t*I)*delta1 + delta2^2*(x + y + t)^2*(B2 + B1))/(delta1^2 + delta2^2))/((exp((2*(delta1^2 + delta2^2)*(x + y + t)^2*B2 + 2*(a*y*delta1^2 + a*y*delta2^2 + 1/2*t)*delta2)/(delta1^2 + delta2^2)) + exp((2*(delta1^2 + delta2^2)*(x + y + t)^2*B1 - 2*(a*y*delta1^2 + a*y*delta2^2 + 1/2*t)*delta2)/(delta1^2 + delta2^2)))*(delta1^2 + delta2^2)):

pde:=diff(u(x,t),t)-diff(u(x,t),x)=z:

infolevel[pdsolve]:=3;

3

This one I canceled out of after a while.

pdsolve(pde,u(x,t));

First set of solution methods (general or quasi general solution)

   -> trying characteristic strip method for first order PDEs

This one I canceled out of after a while.

pdsolve(pde,u(x,t),HINT=strip);

HINT = strip

Next try jumps out after a short time, so no solution of this form

pdsolve(pde,u(x,t),HINT=`*`);

HINT = *

Preparing a solution HINT ...

-> trying HINT = _F1(x)*_F2(t)

Trying travelling wave solutions as power series in tanh ...

   Trying travelling wave solutions as power series in ln ...

   Trying a general ODE solution to the travelling wave related ODE system using ln and tanh

 

NULL

Download pdsolve1.mw

@Alfred_F Good; I'm always up for a challenge, especially if I learn something new in the process.

First 10 11 12 13 14 15 16 Last Page 12 of 85