Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@Preben Alsholm I do realize that your suggestion of applying Minimize and Maximize is not offered as a serious solution.  I just want to note that it won't work if the function has a vertical asymptote in the range, as in

p := plot(10 + 1/(x-1)^2, x=0..2);

I agree with you that an option to plot, something like 'includeaxis1' ::truefalse with default false, would be a good idea.

@erik10 The max and min values of a plot can be obtained by calling plottools:-getdata.  Then you may calculate the desired range based on that, as done in this proc:

restart;
get_view := proc(p)
    local ymin, ymax;
    plottools:-getdata(p):
    op([2,2], %):
    ymin, ymax := op(1,%), op(2,%);
    ymin := min(ymin,0);
    ymax := max(ymax,0);
    return ymin..ymax;
end proc:    

And here is how you will use it:

plt := plot(2+sin(x), x=2*Pi..4*Pi):
plot(2+sin(x), x=2*Pi..4*Pi, view=get_view(plt));

That said, I much prefer the pointplot method that I noted earlier. 

@Ronan That's good.  Do let us know if you had success with those.

@Rouben Rostamian  Ah, I see now.  I didn't know about the interactive feature of the PDF file format.  I don't think that my suggestion of exporting graphics as EPS will help you at all.  

@acer Setting adaptive=true gets around the problem. Thanks for your suggestion. 

I whittled down the original y to something as simple as y = 1 - cos(t) which exhibits the same issue:

y := 1 - cos(t);
plot(y^(3/2), t=0..2*Pi);

Your suggestion of adaptive=true gets around that problem but I find Maple 2023's default behavior is less than ideal.  I will file an SCR and hope that someone can look into this.

Why keep it a secret?  Tell us the function that you wish to plot!

@mary120 This is what your F looks like near phi=0:

You want to integrate 1/sqrt(-2*F). But F is positive just to the right of origin, so your integrand is complex there.

But I think that your problem lies elsewhere.  Note the vertical coordinates in that graph.  They are of the order 10^(-10).   How much do you trust the coefficients that enter the definition of your F?  Perhaps F(0)=0 and F<0 otherwise?  Does F actually have a root near phi=0.0013 as we see in the graph?  Extremely small changes in the coefficients can change the behavior of F and that can change the value of your integral drastically.

You need to examine the source of your F function and decide which part is meaningful and which is junk.  Try to plot F(phi) to see if it makes sense.

 

@yasi I can't tell what you are saying here.  Try to be more specific.

@JAMET The code you have posted is useless.  How is anyone going to test it?

To get helpful answers, you should learn how to upload your worksheet to this site.  Ask if you don't know how.

 

Do you know how to do that by hand?  If so, then the Maple implementation is quite trivial.

So to clarify, are you asking for the mathematical formulation or a Maple implementation?

@WA573 I understand that.  What I am saying is that I have no idea how it corresponds to what is being computed in the worksheet. 

@WA573 Okay, I have no idea how your Fig corresponds to the expression in the worksheet.  Perhaps someone else can have a look and comment.

@WA573 Since you get the same answer through various approaches, maybe that's the right answer.  Why don't you like that answer?

Throughtout your worksheet you have things line conjugate(lambda1) and conjugate(lambda2), indicating that lambda1 and lambda2 are treated as complex numbers.  But then you have:

L := (limit(y4, t = infinity) assuming (lambda1 < lambda2));

How can lambda1 be less than lambda2 if these are complex numbers?

@C_R  As I noted earlier, I don't understand the OP's problem statement, perhaps because the statement is incomplete. The animation that I posted is something quite different. It consists of a rotating horizontal platter and a solid ball that rolls over it without slipping. The motion of the ball is completely determined by the equations of dynamics and the initial conditions. The dynamics imply that the center of the ball traces a circle, not a spiral.

I will be impressed if MapleSim can handle this. Post your solution if it succeeds.

Here are the parameters that went into producing my animation:

Radius of platter: R = 4
Radius of the ball: a = 1
Platter's angular velocity: Omega = 1
Ball's mass: m = 1
Ball's moment of inertia: J := 2/5*m*a^2

Initial condition (at t=0):
    Ball's center at (x,y,z) = (0.8, 0, 1)
    Ball's orientation: rotate about the x axis by 30 degrees
    Ball's angular velocity vector: omega = < 1/3, 1/5, 1/4 >  
    Velocity of the ball's center can be computed from the no-slip condition:
        x' =  a*omega[2] - y*Omega
        y' = -a*omega[1] + x*Omega
        z' = 0

 

4 5 6 7 8 9 10 Last Page 6 of 96