Question: Combined plots of two functions

Dear All,

I am having problem in plotting two function(which themselves are functions of elliptical integrals of first and third kind) together.

If I plot them separately, it has no issues but while combining it plots just one.

I am attaching the maple worksheet here, I have to plot alpha and beta together with 'z' as independent variable.

Please reply asap.
 

restart

a := .5:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

b__sc := -a+2*s*sqrt(3*(3-x))*cos((1/3)*arccos(-s*sqrt(3*a/(3-x)))):

d__sc := -a+2*t*sqrt(3*(3-x))*cos((1/3)*arccos(-t*sqrt(3*a/(3-x)))):

--------------------------------------------------------------------------------------------------------------------

b := proc (z) options operator, arrow; s*b__sc/(1-z) end proc:

d := proc (z) options operator, arrow; t*b__sca/(1-z) end proc:

--------------------------------------------------------------------------------------------------------------------

w__s := proc (z) options operator, arrow; a/b(z) end proc:

v__s := proc (z) options operator, arrow; a/d(z) end proc:

--------------------------------------------------------------------------------------------------------------------

h__sc := proc (z) options operator, arrow; (b(z)+a)/(b(z)-a) end proc:

j__sc := proc (z) options operator, arrow; (d(z)+a)/(d(z)-a) end proc:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

r := proc (z) options operator, arrow; (1/3)*x+2*sqrt(b(z)^2-a^2-(1/3)*x^2)*cos((1/3)*arccos(-(3/2)*sqrt(3)*(2*(b(z)-a)^2-(1/3)*x*(-a^2+b(z)^2)-(2/27)*x^3)/(b(z)^2-a^2-(1/3)*x^2)^(3/2)))/sqrt(3) end proc:

u := proc (z) options operator, arrow; (1/3)*x+2*sqrt(d(z)^2-a^2+(1/3)*x^2)*cos((1/3)*arccos(-(3/2)*sqrt(3)*(2*(d(z)-a)^2-(1/3)*x*(-a^2+d(z)^2)-(2/27)*x^3)/(d(z)^2-a^2+(1/3)*x^2)^(3/2)))/sqrt(3) end proc:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

H := proc (z) options operator, arrow; 1/r(z) end proc:

J := proc (z) options operator, arrow; 1/u(z) end proc:

---------------------------------------------------------------------------------------------------------------------------------------------------------

M := proc (z) options operator, arrow; ((h__sc(z)-2*H(z))*(6*H(z)+h__sc(z))+8*x^2/(b(z)^2*(1-w__s(z))^2))^(1/2) end proc:

P := proc (z) options operator, arrow; ((j__sc(z)-2*J(z))*(6*J(z)+j__sc(z))+8*x^2/(d(z)^2*(1-v__s(z))^2))^(1/2) end proc:

---------------------------------------------------------------------------------------------------------------------------------------------------------

n__1 := proc (z) options operator, arrow; evalf((1-6*H(z)/h__sc(z)+M(z)/h__sc(z))/(1-2*H(z)/h__sc(z)-(4+2*x)/(h__sc(z)*(a^2+2*x))+M(z)/h__sc(z)+sqrt((2+x)^2-4*a^2-8*x)/(h__sc(z)*(a^2+2*x)))) end proc:

n__3 := proc (z) options operator, arrow; evalf((1-6*J(z)/j__sc(z)+P(z)/j__sc(z))/(1-2*J(z)/j__sc(z)-(4+2*x)/(j__sc(z)*(a^2+2*x))+P(z)/j__sc(z)+sqrt((2+x)^2-4*a^2-8*x)/(j__sc(z)*(a^2+2*x)))) end proc:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

n__2 := proc (z) options operator, arrow; evalf((1-6*H(z)/h__sc(z)+M(z)/h__sc(z))/(1-2*H(z)/h__sc(z)-(4+2*x)/(h__sc(z)*(a^2+2*x))+M(z)/h__sc(z)-sqrt((2+x)^2-4*a^2-8*x)/(h__sc(z)*(a^2+2*x)))) end proc:

n__4 := proc (z) options operator, arrow; evalf((1-6*J(z)/j__sc(z)+P(z)/j__sc(z))/(1-2*J(z)/j__sc(z)-(4+2*x)/(j__sc(z)*(a^2+2*x))+P(z)/j__sc(z)-sqrt((2+x)^2-4*a^2-8*x)/(j__sc(z)*(a^2+2*x)))) end proc:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

k := proc (z) options operator, arrow; evalf((1/2)*2^(1/2)*(h__sc(z)/M(z))^(1/2)*(M(z)/h__sc(z)+6*H(z)/h__sc(z)-1)^(1/2)) end proc:

l := proc (z) options operator, arrow; evalf((1/2)*2^(1/2)*(j__sc(z)/P(z))^(1/2)*(P(z)/j__sc(z)+6*J(z)/j__sc(z)-1)^(1/2)) end proc:

----------------------------------------------------------------------------------------------------------------------------------------------------------------

psi := proc (z) options operator, arrow; evalf(arcsin((1-2*H(z)/h__sc(z)-M(z)/h__sc(z))/(1-6*H(z)/h__sc(z)-M(z)/h__sc(z)))) end proc:

phi := proc (z) options operator, arrow; evalf(arcsin((1-2*J(z)/j__sc(z)-P(z)/j__sc(z))/(1-6*J(z)/j__sc(z)-P(z)/j__sc(z)))) end proc:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Omega__1 := proc (z) options operator, arrow; evalf((4*(1-w__s(z))*(2+x+sqrt((2+x)^2-4*a^2-8*x))-4*a^2-8*x)/(a*((2+x)^2-4*a^2-8*x)^(1/2)*((4+2*x)/(a^2+2*x)+2*H(z)-h__sc(z)+M(z)+sqrt((2+x)^2-4*a^2-8*x)/(a^2+2*x)))) end proc:

Omega__3 := proc (z) options operator, arrow; evalf((4*(1-v__s(z))*(2+x+sqrt((2+x)^2-4*a^2-8*x))-4*a^2-8*x)/(a*((2+x)^2-4*a^2-8*x)^(1/2)*((4+2*x)/(a^2+2*x)+2*J(z)-j__sc(z)+P(z)+sqrt((2+x)^2-4*a^2-8*x)/(a^2+2*x)))) end proc:

----------------------------------------------------------------------------------------------------------------------------------------

Omega__2 := proc (z) options operator, arrow; evalf((4*(1-w__s(z))*(2+x+sqrt((2+x)^2-4*a^2-8*x))+8*x+4*a^2)/(a*((2+x)^2-4*a^2-8*x)^(1/2)*((4+2*x)/(a^2+2*x)+2*H(z)-h__sc(z)+M(z)-sqrt((2+x)^2-4*a^2-8*x)/(a^2+2*x)))) end proc:

Omega__4 := proc (z) options operator, arrow; evalf((4*(1-v__s(z))*(2+x+sqrt((2+x)^2-4*a^2-8*x))+8*x+4*a^2)/(a*((2+x)^2-4*a^2-8*x)^(1/2)*((4+2*x)/(a^2+2*x)+2*J(z)-j__sc(z)+P(z)-sqrt((2+x)^2-4*a^2-8*x)/(a^2+2*x)))) end proc:

---------------------------------------------------------------------------------------------------------------------------------------------

alpha := proc (z) options operator, arrow; evalf(-Pi+4*(Omega__1(z)*(EllipticPi(n__1(z), k(z))-EllipticPi(psi(z), n__1(z), k(z)))+Omega__2(z)*(EllipticPi(n__2(z), k(z))-EllipticPi(psi(z), n__2(z), k(z))))/((1-w__s(z))*(M(z)*h__sc(z))^(1/4))) end proc:

beta := proc (z) options operator, arrow; evalf(-Pi+4*(Omega__3(z)*(EllipticPi(n__3(z), l(z))-EllipticPi(phi(z), n__3(z), l(z)))+Omega__4(z)*(EllipticPi(n__4(z), l(z))-EllipticPi(phi(z), n__4(z), l(z))))/((1-v__s(z))*(P(z)*j__sc(z))^(1/4))) end proc:

plot([alpha, beta], 0 .. 1);

Warning, unable to evaluate 1 of the 2 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

 

``


 

Download deflection-angle-comd.mw

Please Wait...