dharr

Dr. David Harrington

8270 Reputation

22 Badges

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

@salim-barzani The eq15 in the paper seems to work, together with the indefinite integral.

Edit: nonlinear problem pointed out by @mmcdara fixed.

pdeint.mw

I don't think the integral from -infinity to x is any different from your indefinite integral earlier - I would stick to the indefinite integral. Are you sure the ansatz in eq 17 applies to this case?

@acer I missed that because checking the structured types page, i see identical(expr) and not identical(exprseq). After you pointed it out I see it further down in the notes (and vaguely recall using it earlier). I have a expectation that the top of the page will have all calling sequences, but this is not always the case. Makes me miss BNF in help pages (no, not really).

@Christopher2222 Interesting. I didn't think 10 was a type.

@salim-barzani As I said before "I do not yet know how to arrive at the limiting form for fN." That means I tried it but couldn't figure it out. (I don't know how to do it by hand.)

As for when to use simplify, my rule would be:  when you think your answer should be simpler, try simplify.

@mary120 I cannot read the equations and conditions properly. But you said "For some values of parameteres, the output curves were very similar to what I expected". I took that to mean you have some suitable ouput. I would like to see that, because it would clarify the questions I asked and your reply does not help.

Did you try the code provided here? (Hint: you may have to simplify the result.)

@mary120 @mmcdara has suggested you were really wanting a different differential equation than the one you specified in your worksheet, and since you have changed his answer to best I'm assuming that is correct? But now you are saying you can get the correct answers with my worksheet, which uses one branch of the original ode. So is that the right ode and the right branch? Which was the correct initial condition? I suggest you upload a corrected worksheet in which your parameters that do give close to the required solution are given, so we can see the answers to these questions.

The answer to your immediate question is that to get V(phi) values down to phi=0, you need to solve the de all the way out to large enough x values that phi is close to zero, i.e., choose a wider range in

 

x_vals := [seq(i*0.01, i = 0 .. 100)];

From your graph of phi vs x at initial condition phi(0) = 0.022, it looks as though going to x = 250 is about right.

 

@mmcdara You are pobably right, but the OP titled the question with "first oder ode", which I took at face value.

@salim-barzani OK, I understand. Here's how to automate the substitutions. But it is not a solution. Each of your pdes needs some individual attention, to find independent equations. For most cases, the expx in f are the same exps that survive after substituting into the pde, but if thay get messed up, then one needs to work harder, as here. I don't know the general solution to this issue. It may be that simplification with side relations can work; I'll give this some more thought.

Dr.D-pde.mw

I guess my alien powers have deserted me!

@salim-barzani If you only want the variables, and not the more complicated expression, use indets(something, name).

I think this is what you are asking, but if it is not, please be more specific about what you want.

@mmcdara I'm not sure of the point you are making. If it is just that you have to be careful of branch cut issues, I agree. In this case the solve strategy I used to answer the OP works - if both solutions had been real there would have been less of a problem.

(Strangely, the worksheet is not displaying, in a way I haven't seen before.)

Download DE_solve.mw

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).

First 9 10 11 12 13 14 15 Last Page 11 of 86