MaplePrimes Questions

Hello

After getting help from users on this list, I wrote an example on how to iterate a discrete map using a given initial condition as follows:

restart:with(ListTools):
NestList := proc (f, x, n::nonnegint, nprec::posint := 10) local R, k; R := rtable(0 .. n, [x]); Digits := nprec; for k to n do R[k] := expand(f(R[k-1])) end do; [seq(R)] end proc:
logistic := proc (x) options operator, arrow; 4*x*(1-x) end proc:
fp := [solve((logistic@@5)(x) = x, x)]:
cfp := allvalues(fp[5]);
nstep:=12:
p := nstep+50; 
aaa := Flatten(map(`~`[Re], evalf(NestList(logistic, evalf(cfp), p)))); 
dat := [seq([i-nstep-1, aaa[i]], i = 1 .. p)]; 
plot(dat, style = pointline, symbol = solidcircle, symbolsize = 4, thickness = 0, view = [default, 0 .. 1]);

The result should be a period 5 and some chaotic data due to machine precision. However the trajectory ejected to infinity. I have tried with a different initial condition, say 0.1, and it worked just fine. Even if the precision is increased, the trajectory (orbit) will eventually eject to infinity.  I couldn't spot what is wrong.

I am running Maple 2017 on linux and on a mac. 

Many thanks

Ed

 

Hello

 

I need help creating a proceadure that does the following:

 

It takes two lists of the same length N   (0<N<inf), one is the numerical pivote list P and the other is a symbolic target list S.

 

Lets say for the simple case of N=3 that we input:

 

P=[22.5,14.3,78.2]

S=[x[1],x[2],x[3]]

 

First the proceadure will sort the Pivote list P, which will result in a local variable Ps=[14.3,22.5,78.2]

 

Next it will generate the rearanged indices of S when it was transformed into Ps, meaning the sort indices rearangment from [1,2,3] in S into [2,1,3] in Ps. This will result in another local variable PSI=[2,1,3]

 

Finally, the proceadure will use PSI to rearange (sort by proxy) the target list P, which in this case will result in the folowing output of [x[2],x[1],x[3]], where x[i] can be either symbolic variable or numeric.

 

So what I need is to use numeric list P to sort a non numeric list S of the same size.

 

I'd appreciate any tips or usefule commands that I can use in this proceadure. 

 

Thanks

 

 

Dear all,
how to code matrix X properly? I want the index of element of matrix is obtained from set S. Since s = {1,5,6}, in matrix X, i should get x11,x15,x16 and so on.
Do you know how to solve this?

Thank you anyway

Hi people,

I could not find anything similar. I hope I do not repeat and that someone may help me on this one.

How can I most elegantly and quickly create a vector (array, matrix, ...) of individual time dependent variables in Maple 17? Something like

 

myArray := ( (elem_1_1(t), elem_2_1(t), ...), (elem_1_2(t), elem_2_2(t), ...), ... )

 

All suggetions appreciated.

the function rationalize simplify rational expression that contains complicated expression but in this example it doesn't work

rationalize(1/sqrt(x))

1/sqrt(x)

it gives to me the same expression why ?

 


 

restart

N := int((x-Q)^m*f(x), x = Q .. infinity)

int((x-Q)^m*f(x), x = Q .. infinity)

(1)

Cost := a*N

a*(int((x-Q)^m*f(x), x = Q .. infinity))

(2)

Dcost := diff(Cost, Q)

a*(int(-(x-Q)^m*m*f(x)/(x-Q), x = Q .. infinity))

(3)

Val := eval(Dcost, [m = 2, f(x) = 1/5000, co = 25, cs = 15])

-a*infinity

(4)

``


 

Download dummy.mw

How come I got this:

as an output of plot(sqrt(Pi/(2*x))*BesselJ(3+1/2, x), x = 0 .. 0.5e-1),

and got this:

for plot(sqrt(Pi/(2*x))*BesselJ(3+.5, x), x = 0 .. 0.5e-1).

Is 1/2 so much different from 0.5 to make Bessel function misbehave at small arguments?? Or is it just a bug?

Hello Please,

 

I have been have difficulty generation a random number from a regression model.

Could you please help me out?

For example; Suppose I want to generate random number from Possion model, I trying using the codes below but not working 

  

 Please, help me edit it.

 

 

Jamiu Olumoh

What value of 'a' gives the best fit for the line y=3x+a to pts[[3,4],[5,6],[21,16]] ?

I'm getting errors using LinearFit from the Statistics package but maybe I'm not using it right.

pts1 := Vector([3, 5, 21]);
pts2 := Vector([4, 6, 16]);

with(Statistics);
L := LinearFit(3*x+a, pts1, pts2, a);

Hi everyone, I want to simplify a complex symbolic expression and then separate it to the real and imaginary part in maple. The expression is as below:

Ec := (Ems+I*Eml)*(1+((Ems+I*Eml)/Ef-1)*Zeta*phi/((Ems+I*Eml)/Ef+Zeta))/(1-((Ems+I*Eml)/Ef-1)*phi/((Ems+I*Eml)/Ef+Zeta));

All the constants are positive. Can anyone help?

I want to compute a limit via maple and that it will show me the way how to compute the limit.

 

The limit is:

\lim_{epsilon ->0, t\in [0,1]} 1/(exp((-1+(1-4*epsilon)^(0.5))/(2*epsilon))-exp((-1-(1-4*epsilon)^(0.5))/(2*epsilon)))*[exp((-1+(1-4*epsilon)^(0.5))/(2*epsilon)*t)-exp((-1-(1-4*epsilon)^(0.5))/(2*epsilon)*t)]/(exp(1-t)-exp(1-t/(epsilon)))

 

According to my book it should converge to 1.

I tried manually but got stuck.

 

seq(x) in the help page:  When x is a sparse Matrix, Vector or rtable, only the nonzero entries are scanned.
Is the statement correct/complete?

V := Vector(6, [11,22,0,44], storage=sparse):
entries(V);
seq(V);

                        [11], [22], [44]
                      11, 22, 44, 0, 0, 0

 

how to find back the system which solution is maxwell equations?

as maxwell equations is an invariant, 

if solution is maxwell which is invariant, how to find back the system which solve it, the solution is maxwell?

will there a multiple systems which solution is maxwell equations?

if can not find, how to enumerate all combinations of systems to search maxwell equations?

How can I plot this fourier transform as a amplitude spectrum?

F(w)=(10/w)*exp(-7iw)*sin(4*w)

I ploted |f(w)| vs w. But it is not the answer. |F(w)|=(10/w)*sin(4*w)

Hi, 

I'm stuck on this problem to which a careful reading of the help pages would probably give an answer:

Why is the return of Array(-1..1, [1$3]) of a different type than the one of Array(-1..1, [0$3]) ?

restart:

B := Array(-1..1,[1$3]);
lprint(B);

B := Array(-1..1, {(1) = 1})

 

Array(-1 .. 1, {-1 = 1, 0 = 1, 1 = 1})

 

B := Array(-1..1,[0$3]);
lprint(B)

B := Array(-1..1, {(1) = 0})

 

Array(-1 .. 1, {})

 

seq(B[n], n=-1..1)

0, 0, 0

(1)

 


 

Download Zero_Array.mw

First 447 448 449 450 451 452 453 Last Page 449 of 2155