dharr

Dr. David Harrington

9157 Reputation

22 Badges

21 years, 282 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@salim-barzani Here's how to transform back to Eq 3.5, which was the original starting point of this question

fp3.mw

I think the subcases in the paper are not all different when e1=0, so it is simpler to go through them without the classification scheme. Knowing when the quartic is a perfect square is useful to simplify the integral, but it is not clear to me that knowing when the various roots are real or not has much to do with evaluating the integral. Probably the solutions can be interconverted. In the end, Maple can just solve the ode directly, so I'm not sure I can see the point.

roots.mw

@Alfred_F That's a nice observation. e0 is lost, but there are now two integration constants. But the square root is gone, which I think is more important.

Here's a simpler way to find two of the solutions, and of course the general solution is easy to find.

roots2.mw

@dharr I found a slightly different tan solution which only works for a special relationship between e0 and e2, so probably that is what is meant. 

fp3.mw

@salim-barzani OK, lets take epsilon=1 then I agree with Eq 3.7. I needed W because you can't integrate wrt a function in Maple, i.e. int(..., w(xi__1)) doesn't work.

But as I showed there is no way to transform F to F2, so the integral that gives the arctan result is invalid, and so Eq 3.13 is incorrect, so it will not satisfy the ode. You can perfom the integral with e2 and e0 in (just change the Int to int). The problem is then that you get xi__1 = f(w) but here and in general f(w) has multiple w in, so you cannot easily invert it to get w as a function of xi__1.

The solution to this is to solve the ode in Eq 3.7. dsolve will do this directly, or you could take the square root and integrate. Since you get a general solution it will work for arbitrary e2 and e0. If you want to then find cases that are real for various choices of e2 and e0 you can make assumptions that make the things under the square roots positive.

@salim-barzani Almost there.

@salim-barzani Well if it were changed I might look at it. I have several times pointed out that it makes it harder to help you, and I have ignored several of your recent questions for this reason. In the present case using w instead of r will be especially difficult since the paper uses w later for a different purpose.

I notice that as usual you changed the notation in your worksheet to make it harder to follow the paper. Perhaps you wish to correct that.

@sand15 Sorry; I must have google searched it instead of clicking the link

@sand15 Your second link does not work (not a web address).

@Alfred_F It is a pity that the nice numbers aren't really proven because the maximization works in floating point numbers, so r = 0.749999999968849584 we guess is 3/4, and identify guesses at the exact values of the angles. Possibly by doing the differentiations involved in the gradients involved in the maximization and solving, you could do it all symbolically.

geom3d is a nice package and easily works here for the duals since the radius of the circumsphere and in-sphere are built-in. It has a duality command that I didn't make use of. One limitation, unlike its 2D equivalent geometry, is that the sizes have to be fixed at the time of creation, so you can't have a cube with sides a, where a is a name.

@dharr Yes it works with 3 Euler angles; see updated answer. I should have realized that right away. As usual you have to play around with the initial point.

@Alfred_F If I do the further tilt you describe, I can get 9/16.

cubeoctOptimization2.mw

I suspect I need 3 Euler rotations, so I'll try that and update if it works.

Can't be sure it is a global maximum. [Edit: updated to use Euler angles, which gives a larger maximum than my first attempt.]

restart

with(geom3d); _local(O, gamma)

Let C and O be the cube and octahedron. The cube has sides of length 1. Take the circumsphere of the octahedron to be 1 for now.

point(o, 0, 0, 0); cube(C, o, side = 1); octahedron(O, o, 1)

Rotate the octahedron by Euler angles alpha, beta, gamma.

line(zax, [0, 0, t], t); line(xax, [t, 0, 0], t); rotation(OR, rotation(Ozx, rotation(Oz, O, gamma, zax), beta, xax), alpha, zax)

Scale by r and consider the vertices

verts := map(proc (q) options operator, arrow; `~`[`*`](r, q) end proc, vertices(OR))

[[r*(cos(alpha)*cos(gamma)-sin(alpha)*cos(beta)*sin(gamma)), r*(cos(alpha)*cos(beta)*sin(gamma)+sin(alpha)*cos(gamma)), r*sin(beta)*sin(gamma)], [r*(-cos(alpha)*cos(gamma)+sin(alpha)*cos(beta)*sin(gamma)), r*(-cos(alpha)*cos(beta)*sin(gamma)-sin(alpha)*cos(gamma)), -r*sin(beta)*sin(gamma)], [r*(-cos(alpha)*sin(gamma)-sin(alpha)*cos(beta)*cos(gamma)), r*(cos(alpha)*cos(beta)*cos(gamma)-sin(alpha)*sin(gamma)), r*sin(beta)*cos(gamma)], [r*(cos(alpha)*sin(gamma)+sin(alpha)*cos(beta)*cos(gamma)), r*(-cos(alpha)*cos(beta)*cos(gamma)+sin(alpha)*sin(gamma)), -r*sin(beta)*cos(gamma)], [r*sin(alpha)*sin(beta), -r*cos(alpha)*sin(beta), r*cos(beta)], [-r*sin(alpha)*sin(beta), r*cos(alpha)*sin(beta), -r*cos(beta)]]

The constraints are that each coordinate lies between -1/2 and +1/2, so no vertex "sticks out" of the cube

c1 := `~`[`>=`](`~`[op](verts), -1/2); c2 := `~`[`<=`](`~`[op](verts), 1/2); constr := remove(is, {c1[], c2[]}, true)

{-1/2 <= r*(-cos(alpha)*cos(gamma)+sin(alpha)*cos(beta)*sin(gamma)), -1/2 <= r*(cos(alpha)*cos(gamma)-sin(alpha)*cos(beta)*sin(gamma)), -1/2 <= r*(-cos(alpha)*sin(gamma)-sin(alpha)*cos(beta)*cos(gamma)), -1/2 <= r*(cos(alpha)*sin(gamma)+sin(alpha)*cos(beta)*cos(gamma)), -1/2 <= r*(-cos(alpha)*cos(beta)*cos(gamma)+sin(alpha)*sin(gamma)), -1/2 <= r*(cos(alpha)*cos(beta)*cos(gamma)-sin(alpha)*sin(gamma)), -1/2 <= r*(-cos(alpha)*cos(beta)*sin(gamma)-sin(alpha)*cos(gamma)), -1/2 <= r*(cos(alpha)*cos(beta)*sin(gamma)+sin(alpha)*cos(gamma)), -1/2 <= r*cos(beta), -1/2 <= r*cos(alpha)*sin(beta), -1/2 <= r*sin(alpha)*sin(beta), -1/2 <= r*sin(beta)*cos(gamma), -1/2 <= r*sin(beta)*sin(gamma), -1/2 <= -r*cos(beta), -1/2 <= -r*cos(alpha)*sin(beta), -1/2 <= -r*sin(alpha)*sin(beta), -1/2 <= -r*sin(beta)*cos(gamma), -1/2 <= -r*sin(beta)*sin(gamma), r*(-cos(alpha)*cos(gamma)+sin(alpha)*cos(beta)*sin(gamma)) <= 1/2, r*(cos(alpha)*cos(gamma)-sin(alpha)*cos(beta)*sin(gamma)) <= 1/2, r*(-cos(alpha)*sin(gamma)-sin(alpha)*cos(beta)*cos(gamma)) <= 1/2, r*(cos(alpha)*sin(gamma)+sin(alpha)*cos(beta)*cos(gamma)) <= 1/2, r*(-cos(alpha)*cos(beta)*cos(gamma)+sin(alpha)*sin(gamma)) <= 1/2, r*(cos(alpha)*cos(beta)*cos(gamma)-sin(alpha)*sin(gamma)) <= 1/2, r*(-cos(alpha)*cos(beta)*sin(gamma)-sin(alpha)*cos(gamma)) <= 1/2, r*(cos(alpha)*cos(beta)*sin(gamma)+sin(alpha)*cos(gamma)) <= 1/2, r*cos(beta) <= 1/2, r*cos(alpha)*sin(beta) <= 1/2, r*sin(alpha)*sin(beta) <= 1/2, r*sin(beta)*cos(gamma) <= 1/2, r*sin(beta)*sin(gamma) <= 1/2, -r*cos(beta) <= 1/2, -r*cos(alpha)*sin(beta) <= 1/2, -r*sin(alpha)*sin(beta) <= 1/2, -r*sin(beta)*cos(gamma) <= 1/2, -r*sin(beta)*sin(gamma) <= 1/2}

So we want to maximize r subject to these constraints

ans := Optimization:-Maximize(r, constr, alpha = -Pi .. Pi, gamma = -Pi .. Pi, beta = 0 .. Pi, initialpoint = {alpha = (1/4)*Pi, beta = (1/4)*Pi, gamma = (1/4)*Pi, r = 1})

[.749999999968849584, [alpha = HFloat(0.7853981633974485), beta = HFloat(1.230959417307807), gamma = HFloat(0.7853981633974483), r = HFloat(0.7499999999688496)]]

Evidently r is 3/4, alpha=gamma = Pi/4

identify(eval(alpha, ans[2])); identify(eval(beta, ans[2])); identify(eval(gamma, ans[2]))

(1/4)*Pi

HFloat(1.230959417307807)

(1/4)*Pi

Some further exploration at higher Digits suggests beta = arccos(1/3)

arccos(1/3); evalf(%)

arccos(1/3)

1.230959417

So go back and scale and rotate a new octahedron accordingly

octahedron(O2, o, 3/4); rotation(OR2, rotation(Ozx2, rotation(Oz2, O2, (1/4)*Pi, zax), arccos(1/3), xax), (1/4)*Pi, zax)

draw([C(cutout = .85), OR2])

And the maximum volume is

volume(OR2)

9/16

``

Download cubeoctOptimization2.mw

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