Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@9009134 I don't quite see the connection of the two equations in the paper to your problem. The equations in the paper are
 

ode1:=diff(f(eta),eta$3)+1/Pr*(3*f(eta)*diff(f(eta),eta,eta)-2*diff(f(eta),eta)^2)+1=0;
ode2:=diff(theta(eta),eta,eta)+3*f(eta)*diff(theta(eta),eta)=0;
bcs:=f(0)=0,D(f)(0)=0,(D@@2)(f)(etad)=0,theta(0)=1,theta(etad)=0;

Your system has F, K, Omega, and theta with orders 3, 2, 2, and 2, respectively.

Is there any relationship between f and theta above and F,K,Omega, and theta in your system? If so, what is it?

The system in the paper is easily solved numerically at least in this case (etad=1,Pr=7):

restart;
ode1:=diff(f(eta),eta$3)+1/Pr*(3*f(eta)*diff(f(eta),eta,eta)-2*diff(f(eta),eta)^2)+1=0;
ode2:=diff(theta(eta),eta,eta)+3*f(eta)*diff(theta(eta),eta)=0;
bcs:=f(0)=0,D(f)(0)=0,(D@@2)(f)(etad)=0,theta(0)=1,theta(etad)=0;
res:=dsolve(eval({ode1,ode2,bcs},{etad=1,Pr=7}),numeric);
plots:-odeplot(res,[[eta,diff(f(eta),eta)],[eta,theta(eta)]]);

 

@J4James Whether you are using one program or the other the dependence on f0 is quite apparent.
Here in Maple:
 

restart;
ode1:=diff(f(x), x,x)+(f(x)+g(x))*diff(f(x),x)=0;
ode2:=diff(g(x), x,x)+(f(x)+g(x))*diff(g(x),x)=0;
ics:=f(0)=f0,g(0)=1-f0,D(f)(0) =0,D(g)(0) =1;
res:=dsolve({ode1,ode2,ics},numeric,parameters=[f0]);
p:=proc(f0) res(parameters=[f0]);
   plots:-odeplot(res,[[x,f(x)],[x,g(x)]],0..5)
end proc; 
plots:-animate(p,[f0],f0=-1..1);

 

If you happen to be only interested in h(x)=f(x)+g(x), then it is a different matter, but then why all this complication? Because then you only have one ode:
 

simplify(eval(ode1+ode2,f(x)=h(x)-g(x)));

This ode is second order in h and you just need two initial conditions for h:

h(0)=1, D(h)(0)=1.
 

@J4James To answer your two questions:

1. You can (in principle, but there may be numerical problems) choose any value for f0 you like including of course negative values.
2. If you are only going to use one or very few different values of f0, then it won't make much of a difference, but if you are going to find the solution for many values of f0, then using the parameters option is much more efficient.

I wonder though, what kind of physical, chemical, or whatever, setup you have, where it doesn't matter which value f0 has. The system you gave us is a trivial example of a more complicated one, I understand. But I wonder why there is such an indifference in your baby example. Is that present in the complicated one as well?

@shakuntala nops(m,n,p) is never valid syntax in Maple since nops only takes one argument, and you are giving it 3.
You have an unfinished sentence:
"... if it is not then how can we represent "
What did you want to represent?

@jessica99 I did this in Maple 8.00:

V:=A*exp(-b*abs(r)^1.5)*abs(r)^a;
H:=R0+R1*abs(sin(c*theta/2))^d;
Vp:=1+r^2*A1*sin(p*theta);
params:=[a=0.5,b=0.15,A=2,c=5,d=0.5,R0=0.5,R1=0.5,p=15,A1=0.05];
plot3d(eval([H*r*cos(theta),H*r*sin(theta),V+Vp],params),theta=0..2*Pi,r=-1..1,style=patchnogrid);

@J4James 4 conditions cannot be written as 3. That way you might as well have added all your ics as in this:
f(0)+g(0)+D(f)(0) +D(g)(0) =2;

which is ludicrous.
If you want to find all the different solutions satisfying f(0)+g(0)=1, you could use
ics:= f(0) = f0, g(0)= 1-f0, D(f)(0)=0, D(g)(0)=1;

and then use the parameters option in dsolve/numeric, parameters=[f0] .

@Parham2016 I looked at what you say is the solution found by Matlab. I see an infinite series plus an O(epsilon) term. What is epsilon, and why is that then a solution since presumably the O-term has the usual meaning?
Is some epsilon-approximation going on, and if so how?

@das1404 I just checked the suggestion made by Tom Leslie in Maple 8.
RegMatch exists and the commands work there. I don't have Maple 7 on this computer, but it may work there too.
 

@Kitonum In recent versions of Maple dsolve accepts vector equations; no need for conversion:
 

restart;
x:=<x1(t), x2(t)>;
A:=<1,1; 1,-1>;
##
sys:=diff~(x,t)=A.x; #Not =~
##
ic:=eval(x,t=0)=<1, -1>; # Not =~

dsolve({sys,ic});

 

@Christopher2222 Removed spam titles used to disappear quickly, which was helpful: you could see what more you had to remove.
With the new MaplePrimes they don't disappear quickly. This has been mentioned before, but it is really a nuisance. If you click on the title of one of those removed items you are told that the resource if no longer available, and that may very well be because you just removed it yourself. Who wants to remember those silly http titles or what have you? Who is going to use time to make a note of what you have already removed?

@amrramadaneg Let me illustrate by using a system consisting of only two pdes.
This system has the same problem as yours, though. I remedy the situation with a piecewise as in your case.

 

restart; 
sys:={diff(R(x, t), t)=-diff(U(x, t), x)+R(x, t), diff(U(x, t), t)=-(diff(U(x, t), x))};
pdsolve(sys,{R(0,t)=0,U(0,t)=0,R(x,0)=0,U(x,0)=sin(Pi*x)},numeric,time=t,range=0..1); #ERROR as in your case
sys1:={diff(R(x, t), t)=-diff(U(x, t), x)+R(x, t)+piecewise(x>1,1,0)*diff(R(x,t),x), diff(U(x, t), t)=-(diff(U(x, t), x))}; #The new sys.
simplify(sys1) assuming x<=1; #It simplifies to sys, but don't use this below.
res1:=pdsolve(sys1,{R(0,t)=0,U(0,t)=0,R(x,0)=0,U(x,0)=sin(Pi*x)},numeric,time=t,range=0..1);
res1:-plot3d(R,t=2);
res1:-plot3d(U,t=2);
res1:-animate(U,t=1);
res1:-animate(R,t=2);
res1:-value([R,U],t=.5)(.567);
res1:-value([R,U])(0.567,0.5);
res1:-value(R)(0.567,0.5);

See more in the help page:
?pdsolve,numeric

 

@amrramadaneg I tried changing the troublesome equation into

eta*(diff(R(x, t), t))+diff(U(x, t), x)-R(x, t)+piecewise(x>1,1,0)*diff(R(x,t),x) = 0;

where the point is that for x<=1 the last term is just zero. The number 1 was chosen since I used the range 0..1. 
This fools the check in  `pdsolve/numeric/par_hyp` I mentioned in my answer, and a "result" is returned. Whether that "result" is total nonsense I shall let you decide.

It appears that you are using code that I wrote in response to this question of yours:
http://mapleprimes.com/questions/219344-How-To-Solve-Odeproblem#answer232922

I find it appalling that you don't give a link to that yourself. If you had, people would also have a somewhat nicer version to look at.

@shakuntala You ask Tom Leslie about what appears to me my code (from what I can see in this rather confusing forrest of letters without any line breaks).

I find that odd.

If I copy your code and execute, I get a syntax error.
Is this what you intended:
solve(subs(m=ha,f(m))*subs(m=subs(c(t)=a(t),ha), f(m)) = subs(m=ha+subs(c(t)=a(t),ha), f(m)), f);
i.e. the equation to be solved is:

Obviously, if you could solve f(a+c)=f(a)*f(c) for f then you have a solution. You cannot expect solve to do that.
We all know that f=exp is a solution, though.

First 74 75 76 77 78 79 80 Last Page 76 of 231