Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Can anyone tell me what is the command to calculate maximum absolute error in mapple.

restart;
A002487 := proc (m) local a, b, n; option remember; a := 1; b := 0; n := m; while 0 < n do if type(n, odd) then b := a+b else a := a+b end if; n := floor((1/2)*n) end do; b end proc; listeinverse := proc (L::list) local i; [seq(op(nops(L)-i, L), i = 0 .. nops(L)-1)] end proc; Brocot := proc (n) local c, i, L, M, r; L := NULL; r := 2^n; L := [seq(A002487(i), i = 0 .. r)]; M := listeinverse(L); c[0] := 0, 1/cat(0); for i to r do c[i] := L[i]/M[i] end do; c[r+1] := 1/cat(0); return [seq(c[i], i = 1 .. r+1)], r+1 end proc; for i from 0 to 4 do B || i := Brocot(i) end do;
                              [   1]   
                        B0 := [0, -], 2
                              [   0]   
                             [      1]   
                       B1 := [0, 1, -], 3
                             [      0]   
                          [   1        1]   
                    B2 := [0, -, 1, 2, -], 5
                          [   2        0]   
                    [   1  1  2     3        1]   
              B3 := [0, -, -, -, 1, -, 2, 3, -], 9
                    [   3  2  3     2        0]   
       [   1  1  2  1  3  2  3     4  3  5     5        1]    
 B4 := [0, -, -, -, -, -, -, -, 1, -, -, -, 2, -, 3, 4, -], 17
       [   4  3  5  2  5  3  4     3  2  3     2        0]    
              rang := proc(M::list, a)  ...  end;;
                    /       1\ 
                rang|B2[1], -|;
                    \       2/ 
                / d        \        
                |--- don(x)| t work;
                \ dx       /        

F := proc (N) local a, b, L; L := NULL; L := sort([op({seq(seq(a/b, a = 0 .. b), b = 1 .. N)})]); return L, nops(L) end proc; F(1); F(2); F(3); F(4);
                           [0, 1], 2
                          [   1   ]   
                          [0, -, 1], 3
                          [   2   ]   
                       [   1  1  2   ]   
                       [0, -, -, -, 1], 5
                       [   3  2  3   ]   
                    [   1  1  1  2  3   ]   
                    [0, -, -, -, -, -, 1], 7
                    [   4  3  2  3  4   ]   
rang(F(3)[1], 2/3);
                        /[   1  1  2   ]  2\
                    rang|[0, -, -, -, 1], -|
                        \[   3  2  3   ]  3/

Hi everyone, I have some symbolic expressions as below:

restart;

local(Zeta);

Zeta := phi+(Ems+I*Eml)/(Ef-Ems-I*Eml)+(3*(1-phi))*((1-g)*alpha^2-(1/2)*g)/(alpha^2-1): 

g := (1/2)*Pi*alpha:

Lambda := (1-phi)*((3*(alpha^2+.25))*g-2*alpha^2)/(alpha^2-1): 

Ec := (Ems+I*Eml)/(1-(1/4)*phi*(1/Zeta+3/(Zeta+Lambda))):

a := simplify(Re(Ec)), assuming positive;

the output of the code maple gives me as 'a' is very long and boring! Therefore I want to make it shorter. Since (alpha<<1), I want to set a constraint as (alpha^(2 and more than 2)=0). How can I put that constraint on the output? thanks

sort(abs(z+a+b*i),z,descending) mean type z is sign + but print -z+5i-5

ran := rand(-5 .. 5); -1; a := ran(); -1; b := ran(); -1; sort(abs(b*i+a+z), z, descending)

abs(-z+5*i-5)

(1)

``


Can you help me?

Thank you very much.

Download abs.mw

help pls how to convert a data surface into a region:

surfdata([[1, 1, .69], [1, 2, .48], [2, 1, .37], [2, 2, .44]], axes = frame, labels = [x, y, z], filled = true)

I've tried to fill the volume below using the option "filled " without any results. I will appreciate any suggestion

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.

 

1 2 3 4 5 6 7 Last Page 2 of 1510