Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

Hello

I am revising the unstable period orbits of the Logistic map, y[n]=4*y[n-1]*(1-y[n]), in Maple.  Although I have implemented the equation and use a loop for the iterations, I wonder whether there is a faster and concise way to code the equation in Maple. 

Here it is what I did:

y[0] := (-sqrt(5)+5)*(1/8);

for n to 10 do y[n] := 4*y[n-1]*(1-y[n-1]) end do;
soly := [seq(simplify(expand(y[n]), radical), n = 0 .. 10)];
dat := [seq([n, Re(evalf(soly[n]))], n = 1 .. 10)]; plot(dat, labels = ["k", "x(k)"], style = pointline,title="Period 2");

Since only few iterations are needed, the solution is symbolic (and then convert to float).  

Many thanks.

Ed

 

 

Hello

I wonder how I could use Maple commands to do the following:

An irrational number, ir, (a huge symbolic expression as a result of iterating a discrete map) is converted to single precision (Real16) and then to hexadecimal as a string. Example: using matlab it will be something like single(ir)=0.25(float representation) =3e800000 (hexadecimal representation).

I am not sure if single precision is available in Maple 2017 but I guess Real32, Real64 and Real128 are.

Once the hexadecimal representation is acquired I need to convert it back to Real16, Real 32 and etc.

Your help is much appreciated.

Many thanks

Ed

Trying to simulate tossing 10 coins. What  am i doing rong? Thanks

 

``

restart

a := Vector[row](1 .. 10)

Vector[row](%id = 18446745395177063238)

(1)

randomize()

for k to 10 do r := rand(1 .. 2); if r < .5 then a[k] := "H" else a[k] := "T"; print(a[k]) end if end do

proc () (proc () option builtin = RandNumberInterface; end proc)(6, 2, 1)+1 end proc

 

Error, cannot determine if this expression is true or false: r < .5

 

a

Vector[row](%id = 18446745395177063238)

(2)

``


 

Download CoinToss.mw

 

 

I need to know how to submit a maple job in HPC cluster. I have a code which needs large memory to run. Thank you

If I add "restart" to a program, then interface(imaginaryunit=j) don't work. Why? 

***********************************
restart;
interface(imaginaryunit = j);
j^2;
************************************
The output is j^2  but the output should be -1. 

 

Hello,
I am new to Maple and have some problems with fonts in Maple's forms. How can I increase the size of the monospaced font? (see the screenshot).

Hi!

I want to plot the approximation of a surface by polynomials. The surface is given by (x,y,f(x,y)) where f(x,y) is given by the following expression

proc (x) options operator, arrow; (sum(i*cos((i+1)*(-2+4*x[1])+i), i = 1 .. 5))*(sum(i*cos((i+1)*(-2+4*x[2])+i), i = 1 .. 5)) end proc

with both variables varying in the interval [0,1]. Then, by using the Bernstein polynomials of two variables (see, for instance, this paper for details  https://www.sciencedirect.com/science/article/pii/0021904589900956), the graph of the resulting (plot3d) surface (x,y,p(x,y))  it is not even like to the original surfaces.

Please, see this PDF of what I have done:  plots.pdf

Some idea or suggestion?

Thanks!

Dear all,

Following the comments I am editing this post:

I have a function F of variables (r1,r2,theta1,theta2,r,theta,a). r1, r2,theta1,theta2 are function of r,  theta and a. I want to take derivative of F with respect to a. r and theta are independent of a . I expressed everything in terms of 'a' as a function of 'a' at first. Then I use diff(F, a). I see there is an error in the final expression G .There is a restriction that theta1 should lie between -Pi to Pi and theta2 between 0 to 2*Pi. I speculate this is the source of error. Work sheet is attached. Reason: value of G: integration in 0 to pi/4 gives some  value but for 0 to pi it evaluates to zero and so is the case with 0 to 2*Pi. As "G "physically represents energy it must be a positive value.
 


restart;

theta1 := unapply(arctan(r*sin(theta)/(r*cos(theta)-a)), a);

proc (a) options operator, arrow; arctan(r*sin(theta)/(r*cos(theta)-a)) end proc

(1)

 

## theta1 -->[-Pi,Pi] and theta2-->[0,2*Pi]

NULL

theta2 := unapply(arctan(r*sin(theta)/(r*cos(theta)+a)), a);

proc (a) options operator, arrow; arctan(r*sin(theta)/(r*cos(theta)+a)) end proc

(2)

``

r1:=unapply(sqrt((r*cos(theta)-a)^2+r^2*(sin(theta))^2),a);r2:=unapply(sqrt((r*cos(theta)+a)^2+r^2*(sin(theta))^2),a);

proc (a) options operator, arrow; ((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2) end proc

 

proc (a) options operator, arrow; ((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2) end proc

(3)

sigma12:=0;sigma22:=sigma;

0

 

sigma

(4)

plot(arctan(tan(x)), x = (1/2)*Pi .. Pi)

 

## I have to use a constraint that

assume(theta1(a) < Pi, theta1(a) > -Pi, theta2(a) > 0, theta2(a) < 2*Pi, a>0,r>0)

u1:=(1+nu)*sigma22*sqrt(r1(a)*r2(a))*(4*(1-2*nu)*cos((theta1(a)+(theta2(a)))/2)-4*r*(1-nu)*cos(theta)/sqrt(r1(a)*r2(a))-2*r^2/(r1(a)*r2(a))*(cos((theta1(a)+(theta2(a)))/2)-cos(2*theta-theta1(a)/2-(theta2(a))/2)))/(4*E)+(1+nu)*sigma12*sqrt(r1(a)*r2(a))*(2*(1-2*nu)*sin((theta1(a)+(theta2(a)))/2)-2*r*(1-nu)*sin(theta)/sqrt(r1(a)*r2(a))+1*r^2/(r1(a)*r2(a))*sin(theta)*cos(theta-theta1(a)/2-(theta2(a))/2))/(E);

 

(1/4)*(1+nu)*sigma*(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)*(4*(1-2*nu)*cos((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-4*r*(1-nu)*cos(theta)/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)-2*r^2*(cos((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-cos(2*theta-(1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2)))/E

(5)

NULL

u2:=(1+nu)*sigma*sqrt(r1(a)*r2(a))*(8*(1-nu)*sin((theta1(a)+(theta2(a)))/2)-4*r*(nu)*sin(theta)/sqrt(r1(a)*r2(a))-2*r^2/(r1(a)*r2(a))*(sin((theta1(a)+(theta2(a)))/2)+sin(2*theta-theta1(a)/2-(theta2(a))/2)))/(4*E)+(1+nu)*sigma12*sqrt(r1(a)*r2(a))*((1-2*nu)*cos((theta1(a)+theta2(a))/2)+2*r*(1-nu)*cos(theta)/sqrt(r1(a)*r2(a))-1*r^2/(r1(a)*r2(a))*sin(theta)*sin(theta-theta1(a)/2-theta2(a)/2))/(E);

 

(1/4)*(1+nu)*sigma*(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)*(8*(1-nu)*sin((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-4*r*nu*sin(theta)/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)-2*r^2*(sin((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+sin(2*theta-(1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2)))/E

(6)

 

## get u_r and u_theta as u[1] and u[2]

u[1] := u1*cos(theta)+u2*sin(theta);

(1/4)*(1+nu)*sigma*(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)*(4*(1-2*nu)*cos((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-4*r*(1-nu)*cos(theta)/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)-2*r^2*(cos((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-cos(2*theta-(1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2)))*cos(theta)/E+(1/4)*(1+nu)*sigma*(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)*(8*(1-nu)*sin((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-4*r*nu*sin(theta)/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)-2*r^2*(sin((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+sin(2*theta-(1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2)))*sin(theta)/E

(7)

u[2] := -sin(theta)*u1+cos(theta)*u2;

-(1/4)*sin(theta)*(1+nu)*sigma*(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)*(4*(1-2*nu)*cos((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-4*r*(1-nu)*cos(theta)/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)-2*r^2*(cos((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-cos(2*theta-(1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2)))/E+(1/4)*cos(theta)*(1+nu)*sigma*(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)*(8*(1-nu)*sin((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-4*r*nu*sin(theta)/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2))^(1/2)-2*r^2*(sin((1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))+(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+sin(2*theta-(1/2)*arctan(r*sin(theta)/(r*cos(theta)-a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/(((r*cos(theta)-a)^2+r^2*sin(theta)^2)^(1/2)*((r*cos(theta)+a)^2+r^2*sin(theta)^2)^(1/2)))/E

(8)

Diff_ur := simplify(diff(u[1], a));

(1/2)*sigma*(1+nu)*a*(-(-2*cos(theta)*a*r+a^2+r^2)^(1/2)*(2*cos(theta)*a*r+a^2+r^2)^(1/2)*r^2*cos(theta)*(a-r)*(a+r)*cos(2*theta+(1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+(-2*cos(theta)*a*r+a^2+r^2)^(1/2)*(2*cos(theta)*a*r+a^2+r^2)^(1/2)*r^2*sin(theta)*(a^2+r^2)*sin(2*theta+(1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+((a^2*r^2-r^4)*(2*cos(theta)*a*r+a^2+r^2)^(1/2)*(-2*cos(theta)*a*r+a^2+r^2)^(1/2)-4*(-2*cos(theta)*a*r+a^2+r^2)*(2*cos(theta)*a*r+a^2+r^2)*(-4*r^2*(nu-3/4)*cos(theta)^2+(3*nu-5/2)*r^2+a^2*(nu-1/2)))*cos(theta)*cos((1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-sin(theta)*((2*cos(theta)*a*r+a^2+r^2)^(1/2)*r^2*(a^2+r^2)*(-2*cos(theta)*a*r+a^2+r^2)^(1/2)-4*(-2*cos(theta)*a*r+a^2+r^2)*(2*cos(theta)*a*r+a^2+r^2)*(-4*r^2*(nu-3/4)*cos(theta)^2+(a^2+r^2)*(nu-1)))*sin((1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a))))/((-2*cos(theta)*a*r+a^2+r^2)^(3/2)*(2*cos(theta)*a*r+a^2+r^2)^(3/2)*((-2*cos(theta)*a*r+a^2+r^2)^(1/2)*(2*cos(theta)*a*r+a^2+r^2)^(1/2))^(1/2)*E)

(9)

``

 

Diff_ut := simplify(diff(u[2], a));

-(1/2)*sigma*(1+nu)*a*(-(-2*cos(theta)*a*r+a^2+r^2)^(1/2)*(2*cos(theta)*a*r+a^2+r^2)^(1/2)*r^2*sin(theta)*(a^2+r^2)*cos(2*theta+(1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))-(-2*cos(theta)*a*r+a^2+r^2)^(1/2)*(2*cos(theta)*a*r+a^2+r^2)^(1/2)*r^2*cos(theta)*(a-r)*(a+r)*sin(2*theta+(1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+sin(theta)*((2*cos(theta)*a*r+a^2+r^2)^(1/2)*r^2*(a^2+r^2)*(-2*cos(theta)*a*r+a^2+r^2)^(1/2)-4*(-2*cos(theta)*a*r+a^2+r^2)*(-4*r^2*(nu-3/4)*cos(theta)^2+(a^2+r^2)*(nu-1/2))*(2*cos(theta)*a*r+a^2+r^2))*cos((1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))+((a^2*r^2-r^4)*(2*cos(theta)*a*r+a^2+r^2)^(1/2)*(-2*cos(theta)*a*r+a^2+r^2)^(1/2)-4*(-2*cos(theta)*a*r+a^2+r^2)*(-4*r^2*(nu-3/4)*cos(theta)^2+(3*nu-2)*r^2+a^2*(nu-1))*(2*cos(theta)*a*r+a^2+r^2))*sin((1/2)*arctan(r*sin(theta)/(-r*cos(theta)+a))-(1/2)*arctan(r*sin(theta)/(r*cos(theta)+a)))*cos(theta))/((-2*cos(theta)*a*r+a^2+r^2)^(3/2)*(2*cos(theta)*a*r+a^2+r^2)^(3/2)*((-2*cos(theta)*a*r+a^2+r^2)^(1/2)*(2*cos(theta)*a*r+a^2+r^2)^(1/2))^(1/2)*E)

(10)

``

# find the limiting case

Att := limit(Diff_ut*r*sin(2*theta), r = infinity);

(2*a*sigma*cos(theta)^3*sin(theta)^2*nu+2*a*sigma*cos(theta)*sin(theta)^4*nu+2*a*sigma*cos(theta)^3*sin(theta)^2+2*a*sigma*cos(theta)*sin(theta)^4-8*a*sigma*cos(theta)*sin(theta)^2*nu^2-6*a*sigma*cos(theta)*sin(theta)^2*nu+2*a*sigma*cos(theta)*sin(theta)^2)/(((cos(theta)^2+sin(theta)^2)/cos(theta)^2)^(1/2)*E)

(11)

Arr := limit(Diff_ur*r*(1-cos(2*theta)), r = infinity);

(-16*a*sigma*cos(theta)^6*nu^2-16*a*sigma*cos(theta)^4*sin(theta)^2*nu^2-6*a*sigma*cos(theta)^6*nu-6*a*sigma*cos(theta)^4*nu*sin(theta)^2+10*a*sigma*cos(theta)^6+10*a*sigma*sin(theta)^2*cos(theta)^4+28*a*sigma*cos(theta)^4*nu^2+20*a*sigma*cos(theta)^2*sin(theta)^2*nu^2+10*a*sigma*cos(theta)^4*nu+4*a*sigma*cos(theta)^2*sin(theta)^2*nu-18*a*sigma*cos(theta)^4-16*a*sigma*sin(theta)^2*cos(theta)^2-12*a*sigma*cos(theta)^2*nu^2-4*a*sigma*sin(theta)^2*nu^2-4*a*sigma*cos(theta)^2*nu+2*a*sigma*sin(theta)^2*nu+8*a*sigma*cos(theta)^2+6*a*sigma*sin(theta)^2)/(cos(theta)*((cos(theta)^2+sin(theta)^2)/cos(theta)^2)^(1/2)*E)

(12)

G := (1/8)*(int(Arr+Att, theta = 0 .. Pi/2))*sigma*4;

-(1/8)*Pi*a*sigma^2*(4*nu^2-nu-5)/E

(13)

simplify(G)

-(1/8)*Pi*a*sigma^2*(4*nu^2-nu-5)/E

(14)

 


Download Derivative_implicit_maplePrime.mw

 

Thanks,

Hello everyone!

I am trying to calculate the Killing vectors for the metric below. For such, I used the packages DifferentialGeometry and Physics. However, I found different results these packages. Could someone explain why?

Thanks in advance!

killing_test1.mw

killing_test2.mw

 

Dear Users,

I have difficulty in finding numerical integration of a function f(r,t) which is a function of position r and time t. Function f(r,t) consists 100 terms (for example : BesselJ(0, 151.5793716314014*r)+BesselJ(0, 151.5793716314014*r)*r^2+......100 terms). For a particular time t=t1, f(r,t1) is calculated and then integrated as follows:

I am using evalf(Int(f(r,t1),r=0..1)

Maple takes a lot of time  to evaluate it as it is integrating it in one shot!  Is there a way to

a) pick the terms individually and integrate it

b) then sum these individual terms up together

c) How reliable is evalf(int(f(r,t1),r=0..1)) is? Is evalf (Int()..)  the best way to evaluate integration?

thanks.

Hey there,

 

I'm trying to build a procedure that can function as an adapted form of Prim's algorithm. The idea is that on a graph with just vertices, the procedure has a starting point, and from there will find out which vertex is the cheapest to connect to (currently expressed purely by the lowest distance). Once this is found, the connected vertex is removed from a list that has vertices that aren't connected yet, and added to a list of vertices that are in the minimal spanning tree.

My problem is that I get an error returned that says "invalid Boolean expression", and I'm not sure how to solve it. Can anybody here point me in the right direction?

The procedure is defined as follows:

Primmetje := proc (aantal, posities, begin)
local knopenover, knopeninmst, huidig, V, kaart, e, a;
knopenover := [seq(i, i = 1 .. aantal)];
knopeninmst := {};
huidig := [0, 0];
if begin <> {} then
  V := [begin];
knopeninmst := knopeninmst union {V}
end if;
remove(V, knopenover);
kaart := Graph(aantal);
SetVertexPositions(kaart, posities);
while nops(knopeninmst) < aantal
do for e in knopeninmst
   do for a in knopenover
     do if huidig = [0, 0] or Distance(posities[e], posities[a]) < Distance(posities[huidig[1]], posities[huidig[2]]) then
   huidig := [e, a];
knopeninmst := knopeninmst union {a};
remove(a, knopenover);
AddEdge(kaart, huidig)
end if
end do
end do
end do
end proc

When I try to execute it with some parameters the return is this:

vp := [2.5, 21], [6, 13.5], [8, 10], [11, 24.5], [14.3, 19.4], [16.8, 26], [22, 21.5], [22, 17], [22.2, 12.5], [26.8, 23], [28, 20.5], [30, 25.5], [32, 21], [29.5, 16];
Primmetje(14, vp, 1);
Error, (in Primmetje) invalid boolean expression: [[6, 13.5]]

I think it has something to do with the double brackes, but I'm not sure how to solve it.
 

How to change the numbers shown in the diagram shapes from y=0.5- to rigth form y=-0.5a.mw

Download a.mw


 

 

 

 

 

 

For an Array A, say, and some positive integer n, say, Maple interpretes A^n as raising each entry separately to the same power n. Without the Physics package loaded, A^n can also be written as A . A . ... . A (n times). But with the Physics package loaded, this equality is broken (at least in Maple 2017): If A is a 2D square Array, A . A all of a sudden is no longer equal to A^2, but rather to convert(A,Matrix)^2, i.e., to the square of the Array considered as a Matrix. The presence of the dot operator seems to make the Physics enviroment convert A to a Matrix. This seems to me to be a bug.

Dear users,

I have an issue with finding real part of a complex variable function. In calculating the real part I see two arguments and the plot is not smooth. How to get real part correct. The worksheet is attached.
 

``

 

 

##Toya complex variable method

``

restart;

stress_c:=-(1+1/nu_c)*k*p2*zeta_c/2;

-(1/2)*(1+1/nu_c)*k*p2*zeta_c

(1.1)

p2:=(c0_c-d_1c/k)*(z-a*(cos(alpha)+2*lambda*sin(alpha)))+(1-k)/k*a*(N_infty-T_infty)*exp(2*I*phi_c+2*lambda*(alpha-Pi))*((a*(cos(alpha)-2*lambda*sin(alpha)))/z-a^2/z^2)

(c0_c-d_1c/k)*(z-a*(cos(alpha)+2*lambda*sin(alpha)))+(1-k)*a*(N_infty-T_infty)*exp((2*I)*phi_c+2*lambda*(alpha-Pi))*(a*(cos(alpha)-2*lambda*sin(alpha))/z-a^2/z^2)/k

(1.2)

``

z := exp(I*theta)

exp(I*theta)

(1.3)

``

k := beta_c/(1+nu_c)

beta_c/(1+nu_c)

(1.4)

nu_c := (kappa2*mu+mu2)/(kappa*mu2+mu)

(kappa2*mu+mu2)/(kappa*mu2+mu)

(1.5)

d_1c := (N_infty+T_infty)*(1/2)

(1/2)*N_infty+(1/2)*T_infty

(1.6)

lambda := -evalf(ln(nu_c)/(2*Pi))

-.1591549430*ln((kappa2*mu+mu2)/(kappa*mu2+mu))

(1.7)

``

beta_c := mu*(1+kappa2)/(kappa*mu2+mu)

mu*(1+kappa2)/(kappa*mu2+mu)

(1.8)

zeta_c := ((z-a*exp(I*alpha))/(z-a*exp(-I*alpha)))^(I*lambda)/((z-a*exp(I*alpha))^.5*(z-a*exp(-I*alpha))^.5)

((exp(I*theta)-a*exp(I*alpha))/(exp(I*theta)-a*exp(-I*alpha)))^(-(.1591549430*I)*ln((kappa2*mu+mu2)/(kappa*mu2+mu)))/((exp(I*theta)-a*exp(I*alpha))^.5*(exp(I*theta)-a*exp(-I*alpha))^.5)

(1.9)

``

c0_c := G_c+I*H_c

G_c+I*H_c

(1.10)

G_c:=(0.5*(T_infty+N_infty)*(1-(cos(alpha)+2*lambda*sin(alpha))*exp(2*lambda*(evalf(Pi)-alpha)))-0.5*(1-k)*(1+4*lambda^2)*(N_infty-T_infty)*(sin(alpha))^2*cos(2*phi_c))/(2-k-k*(cos(alpha)+2*lambda*sin(alpha))*exp(evalf(2*lambda*(Pi-alpha))));

(.5*(N_infty+T_infty)*(1-(cos(alpha)-.3183098860*ln((kappa2*mu+mu2)/(kappa*mu2+mu))*sin(alpha))*exp(-.3183098860*ln((kappa2*mu+mu2)/(kappa*mu2+mu))*(3.141592654-alpha)))-.5*(1-mu*(1+kappa2)/((kappa*mu2+mu)*(1+(kappa2*mu+mu2)/(kappa*mu2+mu))))*(.1013211835*ln((kappa2*mu+mu2)/(kappa*mu2+mu))^2+1)*(N_infty-T_infty)*sin(alpha)^2*cos(2*phi_c))/(2-mu*(1+kappa2)/((kappa*mu2+mu)*(1+(kappa2*mu+mu2)/(kappa*mu2+mu)))-mu*(1+kappa2)*(cos(alpha)-.3183098860*ln((kappa2*mu+mu2)/(kappa*mu2+mu))*sin(alpha))*exp(-.3183098860*ln((kappa2*mu+mu2)/(kappa*mu2+mu))*(3.141592654-1.*alpha))/((kappa*mu2+mu)*(1+(kappa2*mu+mu2)/(kappa*mu2+mu))))

(1.11)

H_c:=0.5*(1-k)*(1+4*lambda^2)*(-T_infty+N_infty)*(sin(alpha))^2*sin(2*phi_c)/(k*(1+(cos(alpha)+2*lambda*sin(alpha))*exp(2*lambda*(evalf(Pi)-alpha))));

.5*(1-mu*(1+kappa2)/((kappa*mu2+mu)*(1+(kappa2*mu+mu2)/(kappa*mu2+mu))))*(.1013211835*ln((kappa2*mu+mu2)/(kappa*mu2+mu))^2+1)*(N_infty-T_infty)*sin(alpha)^2*sin(2*phi_c)*(kappa*mu2+mu)*(1+(kappa2*mu+mu2)/(kappa*mu2+mu))/(mu*(1+kappa2)*(1+(cos(alpha)-.3183098860*ln((kappa2*mu+mu2)/(kappa*mu2+mu))*sin(alpha))*exp(-.3183098860*ln((kappa2*mu+mu2)/(kappa*mu2+mu))*(3.141592654-alpha))))

(1.12)

##Input

alpha:=evalf(Pi/6)

.5235987758

(1.13)

phi_c:=alpha;

.5235987758

(1.14)

N_infty:=0;

0

(1.15)

T_infty:=1;

1

(1.16)

a:=1;nu2:=22/100;kappa2:=3-4*nu2;nu:=35/100;kappa:=3-4*nu;mu:=239/100;mu2:=442/10;

1

 

11/50

 

53/25

 

7/20

 

8/5

 

239/100

 

221/5

(1.17)

``

stress_c

-(9321/123167)*(((.5586916801-.5*(.8660254037-.1591549431*ln(123167/182775))*exp(-.8333333329*ln(123167/182775))+0.5946710490e-2*ln(123167/182775)^2)/(22817/11767-(717/11767)*(.8660254037-.1591549431*ln(123167/182775))*exp(-.8333333329*ln(123167/182775)))-(1.668336947*I)*(.1013211835*ln(123167/182775)^2+1)/(1+(.8660254037-.1591549431*ln(123167/182775))*exp(-.8333333329*ln(123167/182775)))-11767/1434)*(exp(I*theta)-.8660254037+.1591549431*ln(123167/182775))-(11050/717)*exp(1.047197552*I+.8333333328*ln(123167/182775))*((.8660254037+.1591549431*ln(123167/182775))/exp(I*theta)-1/(exp(I*theta))^2))*((exp(I*theta)+(-.8660254037-.5000000002*I))/(exp(I*theta)+(-.8660254037+.5000000002*I)))^(-(.1591549430*I)*ln(123167/182775))/((exp(I*theta)+(-.8660254037-.5000000002*I))^.5*(exp(I*theta)+(-.8660254037+.5000000002*I))^.5)

(1.18)

assume((1/6)*Pi < theta, theta < 2*Pi-(1/6)*Pi)

simplify(evalc(Re(stress_c)))

-0.8815855810e-10*((((1.000000000*cos(theta)^7+(0.5294827753e-2+.5671599115*sin(theta))*cos(theta)^6-4.533186669*cos(theta)^5+(-11.80630620+4.886343937*sin(theta))*cos(theta)^4+3.402782742*cos(theta)^3+(9213180122.+0.9866808100e-1*sin(theta))*cos(theta)^2+(-0.1055437876e11+0.1595769608e11*sin(theta))*cos(theta)-5794103792.*sin(theta)+1760041721.)*cos(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037))+(-.5600908440*cos(theta)^7+(0.6523625301e-2+1.134319823*sin(theta))*cos(theta)^6+4.644568297*cos(theta)^5+(-0.2905669688e-1+10.20004207*sin(theta))*cos(theta)^4-0.1774243515e-1*cos(theta)^3+(0.1595769609e11-9.082306669*sin(theta))*cos(theta)^2+(-7023191163.-9213180109.*sin(theta))*cos(theta)-3154310102.*sin(theta)-7408031461.)*sin(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037)))*cos(.5*arctan(sin(theta)-.5000000002, cos(theta)-.8660254037))+(-.5600908440*cos(theta)^7+(1.134319823*sin(theta)+0.4756356038e-2)*cos(theta)^6+4.644568284*cos(theta)^5+(11.37920491*sin(theta)-0.2640575516e-1)*cos(theta)^4-0.1774243890e-1*cos(theta)^3+(-11.39571957*sin(theta)+0.1595769607e11)*cos(theta)^2+(-9213180108.*sin(theta)-7023191160.)*cos(theta)-7408031458.-3154310086.*sin(theta))*sin(.5*arctan(sin(theta)-.5000000002, cos(theta)-.8660254037))*cos(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037))+(-1.000000000*cos(theta)^7+(-.5671599115*sin(theta)-0.5294826902e-2)*cos(theta)^6+4.531921682*cos(theta)^5+(-4.886343941*sin(theta)+11.76153292)*cos(theta)^4-3.358186195*cos(theta)^3+(-0.9866807692e-1*sin(theta)-9213180122.)*cos(theta)^2+(-0.1595769609e11*sin(theta)+0.1055437877e11)*cos(theta)-1760041726.+5794103798.*sin(theta))*sin(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037))*sin(.5*arctan(sin(theta)-.5000000002, cos(theta)-.8660254037)))*cos(0.314104002e-1*ln(1492820323.-1292820323.*cos(theta)+746410161.*sin(theta))-0.314104002e-1*ln(-1292820322.*cos(theta)-746410161.4*sin(theta)+1492820322.))+(((-.5600908440*cos(theta)^7+(1.134319823*sin(theta)+0.4756356038e-2)*cos(theta)^6+4.626658979*cos(theta)^5+(-0.2905667760e-1+10.24488508*sin(theta))*cos(theta)^4-.1341529536*cos(theta)^3+(0.1595769608e11-9.127079936*sin(theta))*cos(theta)^2+(-7023191161.-9213180109.*sin(theta))*cos(theta)-3154310089.*sin(theta)-7408031435.)*cos(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037))+(-1.134319823*cos(theta)^7-.5671599115*sin(theta)*cos(theta)^6+4.531921682*cos(theta)^5+(11.80860365-4.107288978*sin(theta))*cos(theta)^4-3.402959469*cos(theta)^3+(-9213180123.+0.1774243833e-1*sin(theta))*cos(theta)^2+(0.1055437876e11-0.1595769608e11*sin(theta))*cos(theta)+5794103807.*sin(theta)-1760041748.)*sin(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037)))*cos(.5*arctan(sin(theta)-.5000000002, cos(theta)-.8660254037))+(-1.000000000*cos(theta)^7-.5671599115*sin(theta)*cos(theta)^6+4.537223485*cos(theta)^5+(-4.886343950*sin(theta)+11.80860366)*cos(theta)^4-3.358186195*cos(theta)^3+(-0.9866807250e-1*sin(theta)-9213180123.)*cos(theta)^2+(0.1055437876e11-0.1595769608e11*sin(theta))*cos(theta)-1760041739.+5794103821.*sin(theta))*sin(.5*arctan(sin(theta)-.5000000002, cos(theta)-.8660254037))*cos(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037))+(.5600908440*cos(theta)^7+(-1.134319823*sin(theta)-0.4756356038e-2)*cos(theta)^6-4.644554360*cos(theta)^5+(-10.21771474*sin(theta)+0.2905668928e-1)*cos(theta)^4+0.1774243685e-1*cos(theta)^3+(9.082306650*sin(theta)-0.1595769608e11)*cos(theta)^2+(9213180109.*sin(theta)+7023191165.)*cos(theta)+7408031453.+3154310085.*sin(theta))*sin(.5*arctan(sin(theta)+.5000000002, cos(theta)-.8660254037))*sin(.5*arctan(sin(theta)-.5000000002, cos(theta)-.8660254037)))*sin(0.314104002e-1*ln(1492820323.-1292820323.*cos(theta)+746410161.*sin(theta))-0.314104002e-1*ln(-1292820322.*cos(theta)-746410161.4*sin(theta)+1492820322.)))/((-sin(theta)+2.-1.732050807*cos(theta))^(1/4)*(sin(theta)+2.-1.732050807*cos(theta))^(1/4))

(1.19)

plot(%, theta = (1/6)*Pi .. 2*Pi-(1/6)*Pi)

 


 

Download Toya_complexPlot2.mw

I am trying to put a number of related 2-d plots into a 3-d frame so I can see them stacked up in the third dimension (which follows a parameter) and rotate things around.

The way I once did this successfully was to create the 2-d plots and then use plottools:-transform to move the individual plots in the third dimension, like so:

plt:=plot(something);

tr:=plottools:-transform((x,y) -> [x,2,y]); # the "2" gets changed for the other plots (not shown here).

plots:-display(tr(plt));

The only effect I can get is that the GUI gets confused and I have to close and reload the sheet to get it back again. I have a (complicated) sheet where this actually works, but I am not able to make it work even in the small example I am posting below.

Any hint of where I am going off trail is appreciated. Incidentally, this problem is what led to the corrupted sheet I had maybe a week ago.

Thanks,

Mac Dude.

display3d.mw

 

1 2 3 4 5 6 7 Last Page 1 of 31