dharr

Dr. David Harrington

7533 Reputation

21 Badges

20 years, 211 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

Perhaps the simplified solution is not correct? When I substitute in, I don't find everything zero. The nonzero equation is very similar to the rifsimp expression, but with 4 instead of 8.

restart:

with(DETools):with(PDEtools):declare(z(x,y)):

z(x, y)*`will now be displayed as`*z

PDE1 := y*diff(z(x,y), x$3) - x*diff(z(x,y),x,y$2) = diff(z(x,y),y$2) - y*diff(z(x,y), y);

y*(diff(diff(diff(z(x, y), x), x), x))-x*(diff(diff(diff(z(x, y), x), y), y)) = diff(diff(z(x, y), y), y)-y*(diff(z(x, y), y))

PDE2 := 2*x*y*diff(z(x,y),x$3)*diff(z(x,y),x,y$2) + x*(diff(z(x,y),x$3))^2 + x*y^2*(diff(z(x,y),x,y$2))^2 = 0;

2*x*y*(diff(diff(diff(z(x, y), x), x), x))*(diff(diff(diff(z(x, y), x), y), y))+x*(diff(diff(diff(z(x, y), x), x), x))^2+x*y^2*(diff(diff(diff(z(x, y), x), y), y))^2 = 0

PDE3 := y*diff(z(x,y),x,y$2) - x*w(x,y) + 2*x^2*y*z(x,y)^2 = 0;

y*(diff(diff(diff(z(x, y), x), y), y))-x*w(x, y)+2*x^2*y*z(x, y)^2 = 0

PDE4 := diff(z(x,y), y$2) - y*diff(z(x,y),y) + 2*x^2*y*w(x,y)^2 = x*w(x,y);

diff(diff(z(x, y), y), y)-y*(diff(z(x, y), y))+2*x^2*y*w(x, y)^2 = x*w(x, y)

sys := [PDE1, PDE2, PDE3, PDE4]:

Should simplify to

simple := {diff(z(x,y), x$3) = 0, diff(z(x,y),x,y) = 0, diff(z(x,y),y$2) = y*diff(z(x,y),y), w(x,y) = 2*x*y*z(x,y)^2};

 

{diff(diff(diff(z(x, y), x), x), x) = 0, diff(diff(z(x, y), x), y) = 0, diff(diff(z(x, y), y), y) = y*(diff(z(x, y), y)), w(x, y) = 2*x*y*z(x, y)^2}

eval(sys, simple);

[0 = 0, 0 = 0, 0 = 0, 8*x^4*y^3*z(x, y)^4 = 2*x^2*y*z(x, y)^2]

dsubs(simple,sys);

[0 = 0, 0 = 0, 0 = 0, 8*x^4*y^3*z(x, y)^4 = 2*x^2*y*z(x, y)^2]

rif := rifsimp(sys, [[w], [z]], indep = [x,y]);

table( [( Case ) = [[z(x, y)*(8*z(x, y)^2*y^2*x^2-1) = 0, diff(z(x, y), x), "false split"]], ( Solved ) = [w(x, y) = 0, z(x, y) = 0] ] )

 

NULL

Download demo_question.mw

@mmcdara But you have ode := diff(phi(x), x) : sqrt(1-phi(x)): instead of ode := diff(phi(x), x) = sqrt(1-phi(x)): Then the numeric one does agree with one of the two solutions.

@mmcdara Very nice, vote up. You probably meant B[j[]] not B[j] (as for theta).

@salim-barzani If you need to, you can use assuming n::posint to assume n is a positive integer, assuming n::positive or assuming n>0 for n positive.

Does simplify give you what you want?

In general, Maple will not assume n is a positive integer unless you tell it. (Not needed here, though.)

Internally z is Float(16,-3); op(0,z) gives Float and op(z) gives 16,-3. lprint(z) gives .16e-1, which I assume is some sort of canonical form.

So the 0.016 is just for display. While it might be possible to recreate that display routine, probably sprinf gives you the ultimate in control for this.

@scottwr For inner nested loops, use print for the things you want to see. So in this case just use print(x*y) instead of x*y. 

@mmcdara That was my comment. In the paper they condense products of subscripted symbols into single subscripted symbols, where the new subscripts are the set union of the subscripts of the factors. After looking further at the paper, I think it is a bad idea to do this since one loses information.

@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

1 2 3 4 5 6 7 Last Page 3 of 77