Ronan

942 Reputation

14 Badges

11 years, 354 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are replies submitted by Ronan

 @Rouben Rostamian  I found the reference in the for the proof of  1:2:3 inertia ratios

http://arkadiusz-jadczyk.eu/blog/2017/02/1-2-3-butterfly-effect/

 

Yes, it is quite hard to find things in it.

@Rouben Rostamian   Great solution and demonstration. From what I remember just assign the values of inertia. The simplest is 1:2:3 and that is the best inertia ratio set, for the effect. The body is just a graphic to demonstrate the effect. You would have to troll through the blog I referenced for details. There are other subtle effects based on the ratio of angular momentum and kinetic energy. If < 1 tumbles in one direction. If =1 tumbles only once. If > 1 tumbles in the other direction.

Is there a way to set the time increment in your solution because as the rotational speed is increased the body it appears to turn in the opposite direction? I was trying to see if the numerical solution would reflect the property of change in tumbling direction.

 I followed this blog http://arkadiusz-jadczyk.eu/blog/2017/01/04/  on the topic last year from January to about April. Its is based on MMA and the physicist developes an explicit set of solutions.  I got it to work in Maple, with a good bit of help from Ark too, but it was a lot of work.Can dig out some of the simulations if needed. 

Edit:- I have a Maple numerical solution aswell I found on line while looking for data last year. I can post that document later. 

@tomleslie This is a very detailed answer.  Good to know about [ ]. Solve can be a real pain at times with that.

 I don't have a programming background and am self-taught (with a lot of help from here) on Maple. That is why I use the 2D input. I see one's eye would get tuned to your style. It definitely makes the code readable. 

@Carl Love Ok. Good advice, that could cause some real problems. I guessed what I was trying wouldn't be recommended. What would you do to store a series of values etc, generated in a loop? I am also a using the equations Pedal||i later.

@tomleslie  Thank you that works very well.
At several places, you have these brackets [ ]. What do they do?  How do you achieve the formatting of your code?

.

@Ramakrishnan   Sorry. I meant to remove that line. There is a procedure at the start called Trunc. It is normally stored in my package called RonanRoutines. I copied and pasted it into the doc so it should work for you. Am at work so will check tonight.

@Christian Wolinski  Sorry. I meant to remove that line. There is a procedure at the start called Trunc. It is normally stored in my package called RonanRoutines. I copied and pasted it into the doc so it should work for you.

@Christian Wolinski Thank you. Very workable. I would love to give you best answer, thumbs up. They are not available.

@Joe Riel That is nice proc and a big step towards the end goal. At this point, I am going to start a new question on reducing the equations as this one was primarily about plotting.

@Joe Riel Thank you. I have the same problem. I can't figure out how to get Maple to reduce (x^2 + y^2 -1)^2 to  x^2 + y^2 -1. I am trying to find a way to do this automatically. Do you have any ideas on how to?  It could be for example  (x^2 + y^2 -1)^6.  I just picked the circle equation as a representative example.

Another good example is; because it has no constant term.

(-27*x^2*y^2-27*y^4+4*x^3)^2

 

Christian Wolinski Very nice and powerful. I was just going to post a similar question. I have a couple of questions and a problem.

The code doesn't seem to need Y or am I missing something?

k doesn't match my variable x but it works with k?

I found a situation where it returns a squared version of the desired answer. Is there a way around this? 
 

restart

rtr := sqrt(54*x+6*sqrt(81*x^2-48*A+48*x))*(9*x+sqrt(81*x^2-48*A+48*x)-18*A)/(243*x+27*sqrt(81*x^2-48*A+48*x)+72)

(54*x+6*(81*x^2-48*A+48*x)^(1/2))^(1/2)*(9*x+(81*x^2-48*A+48*x)^(1/2)-18*A)/(243*x+27*(81*x^2-48*A+48*x)^(1/2)+72)

(1)

eq := y = rtr

y = (54*x+6*(81*x^2-48*A+48*x)^(1/2))^(1/2)*(9*x+(81*x^2-48*A+48*x)^(1/2)-18*A)/(243*x+27*(81*x^2-48*A+48*x)^(1/2)+72)

(2)

NULL

collect((`@`(evala, Norm))((lhs-rhs)(eq)), Y, proc (E) convert(E, parfrac, k, {I, sqrt(5)}); map(radnormal, %) end proc)

-A*x*y^2+x^2*y^2+y^4+(4/27)*A^3-(4/9)*A^2*x+(4/9)*A*x^2-(4/27)*x^3

(3)

"(=)"

-A*x*y^2+x^2*y^2+y^4+(4/27)*A^3-(4/9)*A^2*x+(4/9)*A*x^2-(4/27)*x^3

(4)

NULL

eq1 := y = simplify(rtr)

y = (54*x+6*(81*x^2-48*A+48*x)^(1/2))^(1/2)*(9*x+(81*x^2-48*A+48*x)^(1/2)-18*A)/(243*x+27*(81*x^2-48*A+48*x)^(1/2)+72)

(5)

Works without Y

collect((`@`(evala, Norm))((lhs-rhs)(eq1)), proc (E) convert(E, parfrac, k, {I, sqrt(5)}); map(radnormal, %) end proc)

-A*x*y^2+x^2*y^2+y^4+(4/27)*A^3-(4/9)*A^2*x+(4/9)*A*x^2-(4/27)*x^3

(6)

NULL

A := 0

0

(7)

eq2 := y = rtr

y = (54*x+6*(81*x^2+48*x)^(1/2))^(1/2)*(9*x+(81*x^2+48*x)^(1/2))/(243*x+27*(81*x^2+48*x)^(1/2)+72)

(8)

collect((`@`(evala, Norm))((lhs-rhs)(eq2)), Y, proc (E) convert(E, parfrac, k, {I, sqrt(5)}); map(radnormal, %) end proc)

x^2*y^2+y^4-(4/27)*x^3

(9)

This next one leaves the equation  squared    

eq3 := y = simplify(rtr)

y = (54*x+6*3^(1/2)*(27*x^2+16*x)^(1/2))^(1/2)*(3^(1/2)*(27*x^2+16*x)^(1/2)+9*x)/(27*3^(1/2)*(27*x^2+16*x)^(1/2)+243*x+72)

(10)

collect((`@`(evala, Norm))((lhs-rhs)(eq3)), Y, proc (E) convert(E, parfrac, k, {I, sqrt(5)}); map(radnormal, %) end proc)

(1/729)*(-27*x^2*y^2-27*y^4+4*x^3)^2

(11)

expand doesn't fix the problem.

eq4 := expand(eq3)

y = (54*x+6*3^(1/2)*(27*x^2+16*x)^(1/2))^(1/2)*3^(1/2)*(27*x^2+16*x)^(1/2)/(27*3^(1/2)*(27*x^2+16*x)^(1/2)+243*x+72)+9*(54*x+6*3^(1/2)*(27*x^2+16*x)^(1/2))^(1/2)*x/(27*3^(1/2)*(27*x^2+16*x)^(1/2)+243*x+72)

(12)

collect((`@`(evala, Norm))((lhs-rhs)(eq4)), Y, proc (E) convert(E, parfrac, k, {I, sqrt(5)}); map(radnormal, %) end proc)

(1/729)*(-27*x^2*y^2-27*y^4+4*x^3)^2

(13)

NULL


 

Download sometimes_not_full_reduction.mw

@acer That is great. So useful. Is there a way to extend the functionality to handle for example trig functions? I multiplied one side by sin(x) and the other by tan(x).

fact := proc (expr::equation) options operator, arrow; frontend(gcd, [numer(lhs(expr)), numer(rhs(expr))])/frontend(gcd, [denom(lhs(expr)), denom(rhs(expr))]) end proc;
 eq1 := F*R = (1/2)*M*R^2*(a/R); eq1/fact(eq1); 
eq2 := (F+G)*R*sin(x)/sqrt(W-1) = (1/2)*M*R^2*tan(x)*(a/(R*sqrt(W-1)));
 fact(eq2); eq2/fact(eq2)

(F+G)*sin(x) = (1/2)*M*tan(x)*a

 

@Carl Love I found that line of code here on Maple Primes as a stand alone way to truncate an equation.

map(select, proc (q) options operator, arrow; evalb(degree(q, b) <= odr) end proc, a)

I put it inside the  procedure. 

I see that yours works alone too.

select(proc (q) options operator, arrow; evalb(degree(q, [x, y]) <= 2) end proc, E2)

 

Thank you,

Both answers are execellent.

First 11 12 13 14 15 16 17 Last Page 13 of 22