mmcdara

7891 Reputation

22 Badges

9 years, 53 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Christian Wolinski 

First reference
Gauth  ( same problem and same result of yours [which is obviously correct])

Second reference
Doubtnut which gives answer 16
But this is not the same problem and @yangtheary made a mistake while reformulating the problem: the term power set makes all the difference!
(note the typo {x|x| < 3 ...} instead of  {x : |x| < 3 ...} on the screenshot below [the explanations the previous link provides prove t is indeed a typo]  }
 



 
In case @yangtheary would know how Maple can provide a solution, here is a way
 

restart

A := { isolve({x > -3, x < 3}) }

{{x = -2}, {x = -1}, {x = 0}, {x = 1}, {x = 2}}

(1)

B := A minus {{x = -1}}

{{x = -2}, {x = 0}, {x = 1}, {x = 2}}

(2)

 

R := map(t -> {(x, y)=(rhs(t[]), abs(rhs(t[])))}, B)

{{(x, y) = (-2, 2)}, {(x, y) = (0, 0)}, {(x, y) = (1, 1)}, {(x, y) = (2, 2)}}

(4)

P := combinat:-powerset(R):

numelems(P)

16

(5)

 


Download With_Maple.mw

 

@JAMET 

write point(F, [2.329411765, -2.567510609]) if you want to check that AreHarmonic(Q, F, P, M) returns true.
Neither AreHarmonic nor AreCollinear support floats.

Redefining point F by 

X := 198/85:              # X := convert(2.329411765, rational);
Y := -(126/85)*sqrt(3):   # see the attached file
point(F, [X, Y]):

remove all floats in points Q, F, P, M and make them collinear.

Nevertheless (still look to the attached file), (Q, F, P, M) are not harmonic:

AreHarmonic(Q, F, P, M); 
                             false

# CrossRatio(Q, F, P, M) should be equal to -1

CrossRatio(Q, F, P, M):
evalf(%);
                          1.999999999

So (Q, F, P, M) are definitely not harmonic.

But...
 (Q, P, F, M) are  harmonic:

AreHarmonic(Q, P, F, M);
                             true
evalf[20](CrossRatio(Q, P, F, M));
                     -1.0000000000000000001

here2.mw

Solution here2.txt  (open the link and, if you want, copy-paste its content within a void Maple worksheet)

restart:
kernelopts(version);
OneFrame := proc(k)
local Courbe, T, a, b, c, t, P, Q, NormM, F, Ell, sol, N1, N2, dr, tx;
local MySol:
uses geometry:
_EnvHorizontalName := x: _EnvVerticalName := y:
a := 11; b := 7; c := sqrt(a^2 - b^2); t := 1/3*Pi;
Ell := x^2/a^2 + y^2/b^2 = 1;
point(T, (a^2 - b^2)*cos(t)^3/a, -(a^2 - b^2)*sin(t)^3/b);
Courbe := plots:-implicitplot(Ell, x = -a - 10 .. a + 10, y = -b - 10 .. b + 10, scaling = constrained, color = blue, grid=[50, 50]);
NormM := plots:-implicitplot(y - b*sin(t) = a*sin(t)*(x - a*cos(t))/(b*cos(t)), x = -a - 5 .. a + 10, y = -b - 10 .. b + 10, color = orange);
line(Per, y - b*sin(t) = a*sin(t)*(x - a*cos(t))/(b*cos(t)), [x, y]);
point(P, [solve(subs(y = 0, lhs(Equation(Per)))), 0]);
point(Q, [0, solve(subs(x = 0, lhs(Equation(Per))))]);
point(M, [a*cos(t), b*sin(t)]);
point(N1, [a*cos(k), b*sin(k)]);
point(F, [2.329411765, -2.567510609]);
line(L, [N1, F]);
sol := solve({Equation(L), Ell}, {x, y},explicit);
min(map(t -> eval(y, t), [%]));
MySol := select(s -> has(s, y=%), [sol])[];
point(N2, eval([x, y], MySol));
segment(sg, N1, N2);
tx := plots:-textplot([[coordinates(M)[], "M"],[coordinates(N1)[], "N1"],[coordinates(N2)[], "N2"],[coordinates(P)[], "P"],[coordinates(Q)[], "Q"],[coordinates(F)[], "F point de Frégier"],[coordinates(T)[], "T"]], font = [times, bold, 16], align = [above, left]);
dr := draw([sg(color = magenta, linestyle = dash),Per(color = black), P(color = red, symbol = solidcircle, symbolsize = 12),Q(color = red, symbol = solidcircle, symbolsize = 12),M(color = black, symbol = solidcircle, symbolsize = 12),F(color = red, symbol = solidcircle, symbolsize = 12),N1(color = black, symbol = solidcircle, symbolsize = 8)]);
plots:-display(Courbe, tx, dr, scaling = constrained, axes=normal, view=[-15..15, default]);
end proc:
plots:-animate('OneFrame', [k], k = Pi/3 .. Pi, frames = 50);

 

(mw file on demand, in particular if you want to display correctly french accents)

Animation 

@acer 

I never intended to present something concise, not even to spek of delivering a definite answer.
My goal was to make @WA573 understand, through a step by step approach, how to manipulate an expression containing RootOf, why there was not a single solution, and why thecontent of ots last replay to you was inconsistent.

You can delete my comment if it doesn't suit you or if you find it so “unnecessarily complicated” that it only confuses the OP.

@C_R 

, this "However, students look for fun and cool stuff," phrase.

And I ine hundred percent agree with you saying "I am reluctant to waste my spare time on CAD tools since I only do these simulation experiments for fun whenever I need distraction from boring duties."
For years I've thought it was a huge waste of time and that only the quality/reliability on the results mattered... until I presented my works to decision makers who, at the image of your students, only look for fun and cool stuff.

So, instead of showing them some displacements and forces versus time curves which were, supposedely, two "abstract", I spent hours to do that (where I oversimplified a lot of things, in particular about the true movement of the gold balls).

@WA573 

but you have to give  acer some clarifications:

restart

expr := 3*Z^2 + 2*I*ln(RootOf(3*Z^2 + 5*Z + 12)) - 4*Z*x = 0

3*Z^2+(2*I)*ln(RootOf(3*_Z^2+5*_Z+12))-4*Z*x = 0

(1)


An interpretation

e := RootOf(3*Z^2 + 5*Z + 12);

RootOf(3*_Z^2+5*_Z+12)

(2)

alias( r = RootOf(3*Z^2 + 5*Z + 12) );

r

(3)

# How to use r?

evala(expr)

3*Z^2+(2*I)*ln(r)-4*Z*x = 0

(4)

# r represents two numeric values:

zeros := [ allvalues(r) ]

[-5/6+((1/6)*I)*119^(1/2), -5/6-((1/6)*I)*119^(1/2)]

(5)

# Once each of these values is substituted to 3*Z^2 + 5*Z + 12
# this gives raise to two expressions of the form xxxx = 0:

A := [ allvalues(evala(expr)) ]:

print~(A):

3*Z^2+(2*I)*ln(-5/6+((1/6)*I)*119^(1/2))-4*Z*x = 0

 

3*Z^2+(2*I)*ln(-5/6-((1/6)*I)*119^(1/2))-4*Z*x = 0

(6)

# Solving each of these 2 expressions wrt Z gives 4 results

Zsol := solve~(A, Z):

print~(Z =~ Zsol):

Z = (2/3)*x+(1/3)*(4*x^2-(6*I)*ln(-5/6+((1/6)*I)*119^(1/2)))^(1/2)

 

Z = (2/3)*x-(1/3)*(4*x^2-(6*I)*ln(-5/6+((1/6)*I)*119^(1/2)))^(1/2)

 

Z = (2/3)*x+(1/3)*(4*x^2-(6*I)*ln(-5/6-((1/6)*I)*119^(1/2)))^(1/2)

 

Z = (2/3)*x-(1/3)*(4*x^2-(6*I)*ln(-5/6-((1/6)*I)*119^(1/2)))^(1/2)

(7)


Not quite the expression of Z you give at the end of your reply.

But does this expression verifies "expr"?

Here is your guess

guess := (4*x+2*sqrt(4*x^2-6*I*log(2)))*exp(t)/6

(1/6)*(4*x+2*(4*x^2-(6*I)*ln(2))^(1/2))*exp(t)

(8)


As "guess" contains exp(t), which comes out of nowhere, "guess" cannot verify "expr"

guess := (4*x+2*sqrt(4*x^2-6*I*log(2)))/6;  # Maybe???

(2/3)*x+(1/3)*(4*x^2-(6*I)*ln(2))^(1/2)

(9)


Now we get a "guess" closer to relations (7), but where does this ln(2) come from?

simplify(I*ln(-5/6-(1/6*I)*sqrt(119)))

I*(-ln(6)+ln(-5-I*119^(1/2)))

(10)

evalf(I*ln(-5/6-(1/6*I)*sqrt(119)));
evalf(ln(2))

2.000571758+.6931471802*I

 

.6931471806

(11)

 


Need_clarification.mw

As I titled I don't want to interfere between you and acer,  so let me know once you haved read this comment in order I might delete it.

@Ronan 

Do you mean something like that?

example_2.mw

@Ronan 

Didn't you already asked almost the same question here one and a half month ago?

What @Christopher2222 is suggesting seems close to the idea I developped when I answered your initial answer.

example.mw

@C_R 

I should be the one to thank you for having taken the time to reply to these technical questions.
I'm really blown away by what MapleSim can do now, and those sphere cylinder contact elements are just those I needed  a few ears ago.
I hope I'll see you soon with more creations of this kind.

By the way, in case you don't already know Tadashi Tokieda's works, here is a Youtube video where it presents some physical paradoxes... new challenges for MapleSim (and you)?

@C_R 

I indeed wondered if it could be a visual artefact.

I didn't carefully read all the text of your post (my apologies) and I have a question to which you may have already given some answers. 
You mention frictional effects and I feel that the movement of the ball within the tube is governed by rolling (where no dissipation occurs) and slipping (which dissipates energy).
Is MapleSim capable of determining by itself whether the ball slips and rolls, slips without rolling, rolls without slipping or it is you who chose a priori what is about to occur?

A suggestion: Could we draw an equator and meridians on the ball to see its movement?

I'm asking this question because six or seven years ago, I worked on an industrial mechanism where a rigid ball was squeezed between two rigid surfaces with relative displacement. I did a complete study of this the behaviour of this ball using Hertz's contact theory and, as the final equations were quite complex, I thought of using MapleSim (which I was using at the time) to model and simulate the problem.
But either I wasn't competent enough or MapleSim didn't have the capabilities it should have today, so I eventually gave up.

By the way, you did (MapleSim too :-) ) quite an impressive work!

In your simulation the apex of the ball is over the tube (the ball is decending inside the tube). So there is some gyroscopic effect within the tube which eventually makes the ball doing out the tube, but during the free flight out of the tube a part if the initial kinetic energy has been consumed, and still another part when the ball was inside the tube.
How do you explain that the ball hits the ground at a distance from the tune larger than the distance between the tube and the departure point?

It looks like the total energy is not conserved (increased in fact). Did you check this?

@AHSAN 

Look to this POST

I'm done with this thread, hope this post will give you satisfaction

@Carl Love 

"There's never a need to call randomize more than once. ... My feeling about randomize is that it should only be called at the top level, never in a procedure."

I don't agree: one situation is when you have to compare in the same worksheet two (or more) samples S1 and S2, for instance produced by different algorithms.
Common Random Numbers is another situation which occurs in distributed/parallel computing.

In the first situation you have to reset the seed this way

restart
.
.
.
seed := randomize()
S1 := Statistics:-Sample(....)
.
.
.
randomize(seed)
S2 := Statistics:-Sample(....)
.
.
.

A variant is to assess the sampling effect by doing something like this

restart
.
.
.
N := ...
Result := Vector(N)
for n from 1 to N do
    seed := randomize()
    S := Statistics:-Sample(....)
    Result[n] := some_function_depending_on_S
end do:
Analyse_Result
.
.
.




In the second situation, for instance using Grid, you can have to send the seed on several nodes. If it is so the same procedure running on different nodes runs the same randomize(seed) instruction.



You may read on it:



2  0.05 produces an error because they are two symbols and  0.05 not separated by one of . , ; : (even while assuming  . is the non commutative multiplication sign then 2  0.05 would be interpreted as 2 0.05 and then produce an error because of 2 0 and the previous remark).

2 .05 is treated as 10 as, unless to the previous situation, . can be considered as a "separator" (in fact the non commutative multiplication sign) between 2 and 05, thus what you write is interpreted as which is obviously 2 .05and even as 2 .5


See how do the dot rules apply: 2015.mw

@AHSAN 

It is obvious the error comes from the lines

seq(seq(textplot(
        [i-1+(j-3/2)/4, data[i, j], evalf[3](data[i, j])]
        , font=[Tahoma, bold, 14]
        , align=`if`(data[i, j] > 0, above, below)), i=1..3), j=1..3)

Error, Matrix index out of range means you are trying to access some data[i,j] that do not exist; proof

seq(seq(data[i, j], i=1..3), j=1..3);
Error, Matrix index out of range

Finding the error requires no skill, just the willingness to fix the problem by yourself instead of activating the emergency mode and calling for help.
What are the dimension of matrix data?

LinearAlgebra:-Dimensions(data)
                              3, 2

So j must range from 1 to 2, not from 1 to 3

By the way, before asking a new question once you have discover what your plot looks like, try to fix the rendering issue by yourself.

First 12 13 14 15 16 17 18 Last Page 14 of 154