adel-00

130 Reputation

9 Badges

11 years, 313 days

MaplePrimes Activity


These are replies submitted by adel-00

@Christian Wolinski 

many thankx for ur reply...

why you are calculating the roots..

 

Im really grateful...

I excpect optical bistability shape...

but many thanks

thanks for ur code

------------------------- Defining the nature of the variables used ----------------------

epsilon:=epsilon1/(2*Pi):gamma1:=8*Pi:gamma2:=0.002*Pi:x1:=100*Pi:omega2:=200*Pi:delta1:=0.2*Pi:Delta:=25*Pi:G:=20*Pi:Omega:=0:


lambda1:=G*Omega*gamma1/(2*(0.25*gamma1^2+Delta^2)):lambda2:=G*Omega*Delta/(0.25*gamma1^2+Delta^2):lambda3:=gamma1+lambda1:lambda4:=delta1-G^2*Delta/(0.25*gamma1^2+Delta^2):lambda5:=2*x1^2*omega2/(omega2^2+gamma2^2):c:=a^2+b^2:
f:=epsilon-(lambda1-I*lambda2)=(a+I*b)(lambda3+I*(lambda4+lambda5*(c))):
f:=convert(epsilon-(lambda1-I*lambda2)=(a+I*b)*(lambda3+I*(lambda4+lambda5*(a^2+b^2))),rational):
f1:=(lhs-rhs)(evalc(f)):

B:=coeff(f1,I):    

A:=expand(f1-B*I):
    
F:=t->fsolve({eval(A,epsilon=t),B}):
    
plot('eval(a^2+b^2,F(t))', t=0..5, labels=[epsilon,a^2+b^2], view=[0..5,0..0.5], labelfont=[times,16],color=black,axes=boxed,font=[1,1,18],tickmarks=[4,2],thickness=2);
Warning,  computation interrupted

@acer 

thanks.. but how can i know the  approximation function lambda2=ao+a1lambda1+a2lambda1^2

@acer 

thanks for ur answer,,

what i mean is for example we have y=x^2 the approximation function is : y=ao+a1x+a2x^2+a3x^3 

all we need 4 pair (x,y) which are (0,0),(1,1),(2,4),(3,9)

and then subsitue the points in the approximation function to find ao,a1,a2,a3

in the plot below all I need 4 point from the figure and substitue in y=ao+a1x+a2x^2+a3x^3

contourplot(4*lambda2*result^2/(Pi*(lambda2+1)^2)-lambda1,lambda1=0..1,lambda2=0..1,contours=[0],axes=boxed,title=tit,titlefont=[SYMBOL,16],thickness=1,color=black,font=[1,1,18],tickmarks=[2, 4],linestyle=1,view=[0.002..1,0.002..1]);

@Ramakrishnan 

how did u got it

mamy thanks

@acer 

k1:=sqrt(1-lambda1^2):
result:=int(sqrt(1-k1^2*sin(x)*sin(x)),x=0..Pi/2):

 

@Rouben Rostamian  

Many thanks that is useful 

 

@Rouben Rostamian  

 

In the Deplot3D it must have initial conditions, but the example I have is plot of the phase portraits for the system where the inc are unkown

 

                 /          (1/2)\         (1/2)         
                 |/    2   \     | /  1   \      / 2    \
      2 EllipticE||- ------|     | |------|      \a  - 1/
                 ||   2    |     | | 2    |              
                 \\  a  - 1/     / \a  - 1/              
                      /          (1/2)\         (1/2)
                      |/    2   \     | / 2    \     
           2 EllipticE||- ------|     | \a  - 1/     
                      ||   2    |     |              
                      \\  a  - 1/     /              
                  /                 (1/2)\         (1/2)
                  | (1/2) /    1   \     | / 2    \     
       2 EllipticE|2      |- ------|     | \a  - 1/     
                  |       |   2    |     |              
                  \       \  a  - 1/     /              

 

@ThU 

 

that is easy many thanks

I was thinking of (wich is work)

eq1:=u=(3*x-1)*(1-x):
eq2:=v=2*x*(1-2*x):
U:=[solve(eval(eq1),x)]: 
vua:=eval(solve(eq2,v)); 
V:=eval~(vua,x=~U): 
P3:=plot(V,u=-1..1,view=[-1..1,-2..2],color=red,labels=[u,v],axes=boxed,numpoints=9000,linestyle=1,font=[1,1,18],tickmarks=[3,4],thickness=2);

 

@Carl Love 

thanks .. true the roots (for these fixed parameters) are between 0..1 & 8..10.

and in general (changing the parameters) the roots will be different.

many thanks indeed. 

@tomleslie 

1- the plots of the +ve roots aganst arbitrary so(4..5) is done by carl.

2 - want to subsitute these positive roots in the expressions xs,zs also for arbitrary so for example: 

if so=4.3 then we sebstitue it in Q --> we get two +ve roots and  then subsitute them in xs hence, zs ..etc then plot xs against so, plot zs against so.

many thanks for ur patients.

 

@Carl Love 

Many thanks Carl

if I want to use the +ve roots to calculate 

xs:=(so-u)*d*(a1+u)/(m1*u);

zs:=((m2-d2)*xs-a2*d2)*(a3+ys)/(m3*(a2+xs));

where u are the +ve roots of Q

I try to do

g1:=eval(subs(u=S[1],xs)); and so the other roots but how to put these expresions in loop cuz so(from 4..5)

 

REGARDS

@tomleslie 

Dear i try to make it clear as i understand see below (need ur comments)

Plot the roots S[1, 2, 3] against continous value of so,

Plot xs &zs against so
restart:
assume(so,real):
m1:=5:m2:=2:m3:=1.5:a1:=0.16:a2:=0.45:a3:=0.833:d1:=0.25:d2:=0.1:d3:=0.075:
ys:=a3*d3/(m3-d3):
d:=0.5:so:=4.9:
w3:=d*(m1-d1):w2:=d*d1*so-d*m1*so-2*a1*d*d1+a1*d*m1-a2*m1^2+a2*d1*m1+m1*m2*ys:w1:=2*a1*d*d1*so-a1*d*m1*so-a1^2*d*d1+a1*a2*d1*m1+a1*m1*m2*ys:wo:=a1^2*d*d1*so:
Q:=s->w3*s^3+w2*s^2+w1*s+wo:
for so from 4 to 5 do # s0 from 4 to 5(continous value)
sol:=evalf(solve(Q(s),s)): S:=array([],1..3): S[1]:=sol[1];S[2]:=sol[2];S[3]:=sol[3];

xs:=(so-u)*d*(a1+u)/(m1*u);zs:=((m2-d2)*xs-a2*d2)*(a3+ys)/(m3*(a2+xs));
g1:=eval(subs(u=S[1],xs));g2:=eval(subs(u=S[2],xs));g3:=eval(subs(u=S[3],xs));
k1:=eval(subs(u=S[1],zs));k2:=eval(subs(u=S[2],zs));k3:=eval(subs(u=S[3],zs));
end do;
with(plots):pointplot([[so,k1],[so,k2],[so,k3]],axes=boxed);# all value of [so,S[1,2,3] and [so,xs],[so,zs]

as u c the functions xs,zs depend on the three roots.

Any improvements of the above code (im sure its not right)

3 4 5 6 7 8 9 Page 5 of 12