mary120

75 Reputation

4 Badges

5 years, 105 days

MaplePrimes Activity


These are replies submitted by mary120

@mmcdara 

As I said before, I have an image from the plotted curve of phi vs. x and V(phi) vs. phi.
I send a better quality file from these plotted curve to see the values of phi and x easily.
Meanwhile, I tried to plot V(phi) vs phi and I understood for mu=0.010283 the results is completely the same with V(phi) in curve "A", but plot of phi vs. x for this value of mu is again too far from the expexted plot!

Test my last update for mu=0.010283:
 

restart;
mu := 0.010283:
nu := 1-mu:
beta := 0.05:
alpha := 0.3:
M := sqrt(0.704):
gamma1 := 0.001:

v := (1-alpha)*M**2-(1-alpha)*M*(M**2-2*phi)**(1/2)+mu*(mu+beta*nu)*(1-exp(phi/(mu+beta*nu)))+(nu/beta)*(mu+beta*nu)*(1-exp(beta*phi/(mu+beta*nu)))+(alpha/gamma1)*(1-exp(-gamma1*phi)):

plot(v,phi=-0.01..0.07);
 


  From the last figure, it is seen that phi=phi_m and dphi/dx=0 for x=0 and phi=0 for x->infinity, where phi_m has been defined in my last reply to @dharr

@dharr 
Please, see the attached files.

@dharr 
Thanks for your reply. 
Let me explain the problem again. I
m going to solve this equation numerically and plot V(ϕ) vs. ϕ and ϕ vs. x:
(d
ϕ/dx)^2+2* V(ϕ)=0,
To obtain the expected curve(see my following attachment), the following requirements must be fulfilled: (i)
V (0) = V (ϕm) = 0, (ii) (dV/dϕ)ϕ=0 = (dV/dϕ)ϕ=ϕm = 0 and (d^2V (ϕ)/d ϕ^2)ϕ=0,ϕm < 0, where 0 and ϕm  are two extreme points of V (ϕ).
Now, considering the previous mentioned V for mu = 0.01, nu = 1-mu, beta = 0.05, alpha = 0.3, M = sqrt(0.704) and gamma1 = 0.001, the curve
A from the attached figure should be obtained.

 

What is your suggestion for solving this problem and drawing the figures? My main problem is in plotting the phi curve in terms of x.

@dharr 
Thanks for your discussion and the attachment.
I run your attached file (Download rk4.mw) several times with different parameters. For some values of parameteres, the output curves were very similar to what I expected, but I need to plot V(phi) along more interval of phi to sure the similarity of the obtained results. How can I modify your attached file to plot V(phi) in an arbitrary interval of phi? 

@mmcdara 
Thanks for your great comments and uploaded worksheet. It is very useful.
I try to change some values of parametes to see the behavior of V(phi) vs. phi and phi vs. x. To do this, I need two things:
1- Plot of V(phi) in a desired range (for example, from 0 to 0.08), because as you seen from my attached figure, among the various V(phi) curves (due to different parameters), I am looking for a curve that is tangent to the horizontal axis at origin (x=0) and also x=x_m where x_m may be greater or smaller that 0(see the following attached figure)
2- I can export data of the plotted curves as a .txt file containing two columns of (phi,x) or (V(phi), phi) [a T-shape .txt file]. Maybe I need to plot the curve with another software such as Origin, etc.

What can I do to make your code fulfill both of my requests?

attached Figure:

May I have a answer sooner?

@acer 
The assumptions are as follows:
kappa>3/2
All variables are positive and real (phi0 is the only negative variable)
deltab and deltae are les than 1.
Is it possible to simpify the mentiond relation by this assumptions?

@dharr 
Thank you for your comments. 
If I want to simplify f in the form (M^6-const)/(M^2*(M^6-const)), how can I find the "const"s  in the numerator and denominator?

@dharr 
About your question: "But you didn't explain the significance of x=0 so it is not clear how the x axis is defined" I should say that

phi=phimax/2 at x=0 and, F(phi)=0 and dF(phi)/dphi=0 at phi=phimax

(Please, see my attached 34.mw file in one of my above reply to observe the favorite phi-x curve)

Also, I tried to attached my worksheet in that I tried to plot phi-x curve in symmetric interval, but the mapleprimes.com does not support attached file since last night. So, I had to copy it here.

restart;
F1:=phi-> 3.924999-0.24999e-1/sqrt(1-2*phi)-3.900/((1-(1/6)*phi)^(3/2))-1.648094618*10^(-14)*sqrt(3)*sqrt(1836)*(((1.3972+sqrt(3)*sqrt(1836))^2+3672*phi)^(3/2)-(1.3972+sqrt(3)*sqrt(1836))^3-((1.3972-sqrt(3)*sqrt(1836))^2+3672*phi)^(3/2)+((1.3972-sqrt(3)*sqrt(1836))^2)^(3/2))-(1/18)*sqrt(3)*sqrt(300)*(((1.4472+(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)-(1.4472+(1/300)*sqrt(3)*sqrt(300))^3-((1.4472-(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)+(1.4472-(1/300)*sqrt(3)*sqrt(300))^3)*(sqrt(3)*sqrt(300)*(((1.4472+(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)-(1.4472+(1/300)*sqrt(3)*sqrt(300))^3-((1.4472-(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)+(1.4472-(1/300)*sqrt(3)*sqrt(300))^3));
#
F2:=phi->3.927999-0.23999e-1/sqrt(1-2*phi)-3.904/((1-(1/6)*phi)^(3/2))-1.648094618*10^(-14)*sqrt(3)*sqrt(1836)*(((1.401517+sqrt(3)*sqrt(1836))^2+3672*phi)^(3/2)-(1.401517+sqrt(3)*sqrt(1836))^3-((1.401517-sqrt(3)*sqrt(1836))^2+3672*phi)^(3/2)+((1.401517-sqrt(3)*sqrt(1836))^2)^(3/2))-(1/18)*sqrt(3)*sqrt(300)*(((1.451517+(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)-(1.451517+(1/300)*sqrt(3)*sqrt(300))^3-((1.451517-(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)+(1.451517-(1/300)*sqrt(3)*sqrt(300))^3)*(sqrt(3)*sqrt(300)*(((1.451517+(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)-(1.451517+(1/300)*sqrt(3)*sqrt(300))^3-((1.451517-(1/300)*sqrt(3)*sqrt(300))^2-2*phi)^(3/2)+(1.451517-(1/300)*sqrt(3)*sqrt(300))^3));

plot([F1(phi),F2(phi)],phi=0.0..0.14);
phimax1:=fsolve(D(F1)(phi)=0,phi=0.08..0.14);
phimax2:=fsolve(D(F2)(phi)=0,phi=0.08..0.14);
integrand1:=1/sqrt(-2*F1(phi)):
integrand2:=1/sqrt(-2*F2(phi)):
ode1:=diff(x(phi),phi)=-integrand1:
ode2:=diff(x(phi),phi)=-integrand2:
ans1:=dsolve({ode1,x(phimax1/2)=0},numeric):
ans2:=dsolve({ode2,x(phimax2/2)=0},numeric):
plots:-odeplot([ans1,ans2],[x(phi),phi],[1e-2..phimax1,1e-2..phimax2]);

xmax1:=eval(x(phi),ans1(phimax1));
xmax2:=eval(x(phi),ans2(phimax2));
p1:=plots:-odeplot(ans1,[x(phi)-xmax1/2,phi],-1.4*phimax1..1.4*phimax1):
p2:=plots:-odeplot(ans2,[x(phi)-xmax2/2,phi],-1.4*phimax2..1.4*phimax2):
display(p1,p2);
M1:=plottools:-getdata(p1)[3];
M2:=plottools:-getdata(p2)[3];
 

@dharr 
If I have two different F(phi) functions (for example, see F1(phi) and F2(phi) in attached file):
1- How can solve these two ODE(s) and  plot phi vs x in one phi-x coordinate?

2- How can I plot phi-x in a symmetric interval of x (for example, from x=-100..100)
3- How can I export data of plot of these ODEs in the form of two distinct ascii table? (I couldn’t export data of the last figure in your last uploaded worksheet in the form of a ascii table)

Two_function.mw

@mary120 
I'll try to do your comment

@dharr 
Thanks for your answer. It was very useful.
How can I export the data of the phi-x plots in your attached file in  the form of an ASCII file or a two-column .txt or .dat file? 

@dharr 
Considering the problem as an ODE is a good suggestion. In fact, assuming (dphi/dx)**2+2F(phi)=0, I want to plot phi versus x.
(From your first plot, it is clear that F(phi) and dF(phi)/dx =0 at both phi=0 and nearly phi=0.09)
For an assumed F(phi), I expect the phi-x curve should be as follows(see the second Fig. in the attached file), but despite having F(phi), I could not draw the curve of phi  vs. x.

34.mw

@Rouben Rostamian  
Thanks for your comment. There was a mistake in my uploaded worksheet and I correted it (Please, see the following attached file).

Integral-New.mw

@tomleslie 
Great!
Tahnks a lot!

1 2 3 Page 1 of 3