MaplePrimes Questions

u := x -> Int(exp(-(xi-x)^2)*exp(xi), xi = -infinity .. infinity, method = _d01amc);
evalf(u(0.));

gives an error

u := x -> Int(exp(-(xi-x)^2)*exp(xi), xi = -infinity .. infinity);
evalf(u(0.));

2.275875794


u := x-> Int(exp(-(xi-x)^2+xi), xi = -infinity .. infinity, method = _d01amc);
evalf(u(0.));

2.275875794


A bug is suspected...

I have exported Maple code as a Maplet file.  When I click on the file Maplet Launcher opens but nothing "runs".  It looks like it's trying because the icon flashes, but no window opens.  The Maple worksheet from which the Maplet was generated runs fine.

Any suggestions as to how to get Maplet Launcher to run my Maplets?

 

Thanks,

Rollie

Good afternoon sir.

 

I request your kind suggestion to the above cited query.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

Hi everyone.

i want to undestand how to use the passing by reference in Maple i do this:

generate_x := proc (x)

    x := (rand(1 .. 10))()

end proc;

generate_y := proc (y)

    y := (rand(1 .. 5))();

    print(y)

end proc;

print_xy := proc ()

     local x, y;

     generate_x(x);

     print(x);

     generate_y(y) end proc;

print_xy();

#print(x)  works but generate_y(y) doesn't print the value of y.

Can you help me to understand WHY i dont get the print of y.

Thanks and happy christmas to you!

Hello,

Is it possible to have the labels of the x-axis and of the tickmarks above the axis?

Thank you!

How to find 2013th term in the sequence 

1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...?

in which the n-th positive integer appears n times. 

I don't know how to start.

Polya deals out cards from a deck one by one. How many cards must Polya deal out until he is sure that a flush (five cards of the same suit) has appeared amongst the dealt cards? What if Polya wants a straight (five cards in sequence, with an ace counting low or high)?

 The answers are 17 and 45, but how? in Maple?

for the flush the chances are 1/numbperm(13,5)/numbperm(4,1)

for the straight 1/10/numbperm(4,1)^5. 

http://www.math.hawaii.edu/~ramsey/Probability/PokerHands.html

 

 

 

Hello,

In a mechanical problem, i have to deal with a system with trigonometric expression. The variables are gamma[1](t), psi[1](t), phi[1](t), alpha(t), beta(t), x(t). The orthers are parameters.

I would like to have a explicit relations between  gamma[1](t), psi[1](t), phi[1](t) and alpha(t), beta(t), x(t).

In orthers words, i would like to have 

alpha(t)= f(gamma[1](t), psi[1](t), phi[1](t)).

beta(t)= f(gamma[1](t), psi[1](t), phi[1](t)).

 x(t) = f( gamma[1](t), psi[1](t), phi[1](t)).

Of course, the expresions of alpha(t), beta(t), and x(t) should be complex. Nevertheless, it will avoid me to have to solve Newton Raphson algorithm to solve these constraints equations.

Normally, it should be feasible.

When i have only one equation and not a system, isolate function is helpful.

But in this case, i don't manage to have my relations.

Have you some ideas to expression these relations ?

alpha(t)= f(gamma[1](t), psi[1](t), phi[1](t)).

beta(t)= f(gamma[1](t), psi[1](t), phi[1](t)).

 x(t) = f( gamma[1](t), psi[1](t), phi[1](t)).

Here the code of the equations :

restart:
with(LinearAlgebra):
with(Student[MultivariateCalculus]):
with(plots):
constants:= ({constants} minus {gamma})[]:
`evalf/gamma`:= proc() end proc:
`evalf/constant/gamma`:= proc() end proc:
unprotect(gamma);
restart:
with(LinearAlgebra):
with(Student[MultivariateCalculus]):
with(plots):
constants:= ({constants} minus {gamma})[]:
`evalf/gamma`:= proc() end proc:
`evalf/constant/gamma`:= proc() end proc:
unprotect(gamma);
eq_liai[1]:= rF[1]*cos(a[1])-cos(a[1])*cos(gamma[1](t))*e[1]-l[1]*(cos(phi[1](t))*cos(a[1])*cos(gamma[1](t))*cos(psi[1](t))-cos(phi[1](t))*cos(a[1])*sin(gamma[1](t))*sin(psi[1](t))-sin(a[1])*sin(phi[1](t)))-cos(alpha(t))*rBTP[1]*cos(a[1])-sin(alpha(t))*sin(beta(t))*rBTP[1]*sin(a[1])-sin(alpha(t))*cos(beta(t))*h = 0;
eq_liai[2]:= rF[1]*sin(a[1])-sin(a[1])*cos(gamma[1](t))*e[1]-l[1]*(cos(phi[1](t))*sin(a[1])*cos(gamma[1](t))*cos(psi[1](t))-cos(phi[1](t))*sin(a[1])*sin(gamma[1](t))*sin(psi[1](t))+cos(a[1])*sin(phi[1](t)))-cos(beta(t))*rBTP[1]*sin(a[1])+sin(beta(t))*h = 0;
eq_liai[3] := h[1]+sin(gamma[1](t))*e[1]+l[1]*(sin(gamma[1](t))*cos(psi[1](t))+cos(gamma[1](t))*sin(psi[1](t)))*cos(phi[1](t))+sin(alpha(t))*rBTP[1]*cos(a[1])-cos(alpha(t))*sin(beta(t))*rBTP[1]*sin(a[1])-cos(alpha(t))*cos(beta(t))*h-z(t) = 0;

or directly a maple file

constraints.mw

Thanks a lot for your help

Hi.

How to present two indexed values a[n] and b[n] in form

a0 = ...,

a1 = ...,    b1 = ...;

a2 = ...,   b2 = ...;

in MathContainer component?

 

Thank you.

Hi,

Does Maplesim allow hardware integration such as a joystick so that I can feed in joystick commands (via USB or serial) from the computer and then control my Maplesim model in the virtual space? Suggestions?

 

Thank you.

Hi,

I'm currently working on a manipulator model in Maplesim and will import CAD attachments to each of the links. The Solidworks model, once imported to Maplesim, is not located in the same position as the Maplesim part but is offset by X,Y,Z. The scaling is also off. Is there some way to align the CAD to the component instead of trial and error?

Thank you.

 

Dear all,

 

I have encounter a Maple response but I don't know how to interpret it.

 

When I tried the following Maple codes:

 

A := solve( x^4 + x^3 + x^2 + x + 1  = n, x ):

asympt( A, n, 2 )

 

Maple responded with a mysterious "pt".  What is going on?  Any help will be appreciated!

Thanks in advance.

 

Cheers, Yen-chi Roger Lin

Assistant Professor in Mathematics

National Taiwan Normal University

Good morning Maple users.

 

I request your kind suggestion to the above cited question.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

I am playing around with a crude implementation of the bisection algorithm. I am using printf  to display some of the output, however there are a couple extra characters, namely, ()^2, at the end. When the very last line is removed, it goes away. What is causing this?

restart; f := proc (x) options operator, arrow; evalf(x^3-3*x^2+1) end proc; a := 0.; b := 1.0; count := 0; while abs(b-a) > 10^(-8) do count := 1+count; m := (a+b)*(1/2); print([a, m, b]); if f(a)*f(m) < 0 then b := m else a := m end if end do; fval := f(m); printf("\n The function value at %10.10g is %10.10g.\n", m, fval)*printf("\n Number of interations: %d.\n", count)

()^2

(1)

restart; f := proc (x) options operator, arrow; evalf(x^3-3*x^2+1) end proc; a := 0.; b := 1.0; count := 0; while abs(b-a) > 10^(-8) do count := 1+count; m := (a+b)*(1/2); print([a, m, b]); if f(a)*f(m) < 0 then b := m else a := m end if end do; fval := f(m); printf("\n The function value at %10.10g is %10.10g.\n", m, fval)


 The function value at 0.6527036502 is   -1.5e-08.

 

``


Download bisect.mw

Consider the following Matrix constructor:

M := Matrix(3,(i,j) -> a||i||j + I*b||i||j,shape = hermitian);

It generates the following output:

That appears to me to be definitely wrong, a hermitian matrix allowing nonzero real-valued diagonal elements (otherwise quantum mechanics would be a rather vacuous theory). For shape = antihermitian, the diagonal still contains only zeros, even though it should contain nonzero purely complex-imaginary elements. Have I fundamentally misunderstood something?

PS: I was aware of this shortcoming back in Maple 9.5 (the previous version I have been working with), there manually circumventing it, but I certainly expected that it had been fixed since then.

First 1485 1486 1487 1488 1489 1490 1491 Last Page 1487 of 2429