## Problems with limit cycles and maple 16 ...

I am having trouble printing out a limit cylce on maple 16.  I have the attached file and if anybody could look at it and perhaps help me out it would be greatly appreciated.  The first limit cycle is supposed to look somewhat like the second one.  I'v tried many different things but nothing seems to be working.  an explenation would also be nice too.  if the file does not open correctly also let me know. thank you very much.

## pick up by the sum of the list elements...

Say I have this list,

tmp:=[[0, 1, 2], [1, 0, 2], [1, 1, 2], [1, 2, 0]];

and the sums of each element (list),

map(x->convert(x,`+`),tmp);

How do I quickly pickup the elements, where they sum to 3? Like this:

wanttohave:=[[0, 1, 2], [1, 0, 2],  [1, 2, 0]];

Thanks,

## Given the lengths of the three sides of a triangle...

Given the lengths of the three sides of a triangle, write a procedure, triType, to produce an output which shows whether the triangle is acute, right or obtuse with the three sides given??

## Minimization Process...

Hi all

I have the following segment of maple program which belongs to time delay systems dynamic. here C=X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P, is a matrix(vector) which comes from reordering the system terms and my goal is to minimizing J:=X.E.Transpose(X)+U.E.Transpose(U), subject to constraint C=0, but i don't know how to do so.

I will be so grateful if anyone can guide me

best wishes

Ph.D Candidate

Applied Mathematics Department

 > restart: with(Optimization): with(LinearAlgebra): macro(LA= LinearAlgebra): L:=1:  r:=2:  tau:= 1: interface(rtablesize= 2*r+1): Z:= Matrix(      2*r+1, 2*r+1,      [tau,       seq(evalf((L/(2*(iz-1)*Pi))*sin(2*(iz-1)*Pi*tau/L)), iz= 2..r+1),       seq(evalf((L/(2*(iz-1-r)*Pi))*(1-cos(2*(iz-1-r)*Pi*tau/L))), iz= r+2..2*r+1)       ],      scan= columns,      datatype= float );                          Dtau00:= < 1 >: Dtau01:= Vector[row](r): Dtau02:= Vector[row](r): Dtau10:= Vector(r): Dtau20:= Vector(r): Dtau1:= LA:-DiagonalMatrix([seq(evalf(cos(2*i*Pi*tau/L)), i= 1..r)]): Dtau2:= LA:-DiagonalMatrix([seq(evalf(sin(2*i*Pi*tau/L)), i= 1..r)]): Dtau3:= -Dtau2: Dtau4:= copy(Dtau1): Dtau:= < < Dtau00 | Dtau01 | Dtau02 >,          < Dtau10 | Dtau1  | Dtau2  >,          < Dtau20 | Dtau3  | Dtau4  > >;   P00:= < L/2 >: P01:= Vector[row](r): P02:= Vector[row](r, j-> evalf(-L/j/Pi), datatype= float): P10:= Vector(r): P20:= Vector(r, i-> evalf(L/2/i/Pi)): P1:= Matrix(r,r): P2:= LA:-DiagonalMatrix(P20): P3:= LA:-DiagonalMatrix(-P20): P4:= Matrix(r,r): P:= < < P00 | P01 | P02 >,       < P10 | P1  | P2  >,       < P20 | P3  | P4  > >; interface(rtablesize=2*r+1):    # optionally J:=Vector([L, L/2 \$ 2*r]):      # Matrix([[...]]) would also work here E:=DiagonalMatrix(J); X:=  Vector[row](2*r+1,symbol=a); U:=Vector[row](2*r+1,symbol=b); X0:= Vector[row](2*r+1,); G:=Vector[row](2*r+1,); C:=simplify(X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P);         (1)
 > J:=X.E.Transpose(X)+U.E.Transpose(U); (2)
 > Minimize(J,{C=0});
 Error, (in Optimization:-NLPSolve) invalid arguments
 > #XP:=-.015+X+add(X[l+1]*f1(l)+X[r+l+1]*f2(l), l= 1..r): #plot([XP,T1], t= 0..1);#,legend= "Solution Of x(t) with r=50"):
 >
 >
 >
 >

## Factory Simulation Question...

Hi , i need to write some maple functions for the equations below and i am not sure if this should be arrays or not. please see the question below;

Consider a factory which manufactures only one product. Raw material is bought from external supplier and stored until required.

Finished items are held in a warehouse. The operation of factory and its warehouse

can be modelled as a set of equations as folllows.

Let us define at time t :

R(t) = Raw material stored (units)

F(t) = finished goods stock (units)

B(t) = order backlog (units)

T(t) = target stock level for finished goods (units)

All variables defined above give quantities at the start of week t.

X( t, t+1 )= weekly orders received from customers

M( t, t+1 )= raw material supplied per week.

P( t, t+1 )= production per week.

D(t, t+1 )= amount dispatched to customers per week.

All variables defined above give quantities over week t to t+1

(i.e over the week t). The operation of the factory and its warehouse can be expressed

as a set of equations given as follows:

Backlog and Stock Position

(1) B(t+1) = B(t)+X (t,t+1)–D(t,t+1)

(2) T(t+1) =(m +1)/m(X(t,t+1)+X(t–1,t)+…+X (t–m+1,t–m+2))

(assuming that the company wishes to maintain m (suppose m=5)) weeks stock of

finish items and hence the target level is m times the average of the last m–1 weeks)

(3) R (t+1)=R(t)+M(t,t+1)–P(t,t+1)

(4) F (t+1)=F (t) +P(t,t+1)–D(t,t+1)

Rates

(5) D (t,t+1) = B(t) if B(t)<F(t)

F (t) otherwise

(6) M (t,t+1) = P(t–1,t)

(7) P (t,t+1) = T(t) – F(t) + D(t,t+1)

= R(t) if result exceeds R(t)

= 0 if the result is negative

Given the initial values for the variables, it is possible to simulate this system to study

how the system will respond to the order rate. Suppose that all is calm, and the factory

has operated as follows for the last five weeks.

Target warehouse stock = 250

Finished goods stock = 250

Raw material stock = 150

Production rate = 50/week

Material supply rate = 50/week

Order rate = 50/week

Order backlog = 50

Suppose the behaviour continues for the first week of the simulation but that during

next week orders double due to the sales promotion. During the third week orders

drops to zero as all demand returns of the previous week was satisfied. For the fourth

week and the succeeding weeks, demand returns to an order rate of 50/week. What

happens elsewhere in the system? A deterministic simulation will provide the answer

to the above mentioned question.

For this compute the following.

i) The values of the equations (1)–(4) at the start of week t.

ii) The values of the equations (5)–(7) i.e. the new values of the rates during

the following week.

iii) Move simulation time to the start of the next week.

Next simulation should be presented in tabular form and plot production and demand

rate to examine the performance of the system.

All help will be much appreciated.

Best Regards,

## How do I do that in maple...

How can I solve x^2 on -Pi..Pi and to evaluate this at x= Pi to prove that Sum(1/n^2, n= 1..infinity) = Pi^2/6.

## how to animate a bouncing ball on a 3d surface....

I do not have any code to produce yet.  I want to have Maple animate a bouncing ball on some 3d surface.

## How can I do an animation?...

Hi,

I want to animate this code

plots[odeplot](Trajectoire, [[x1(t), y1(t), t], [x2(t), y2(t), t], [x3(t), y3(t), t], [x4(t), y4(t), t], [x5(t), y5(t), t], [x6(t), y6(t), t], [x7(t), y7(t),t], [x8(t), y8(t), t], [x9(t), y9(t), t], [xA(t), yA(t), t]], TempsInitial..TempsFinal, numpoints = 10000,axes=boxed, scaling = constrained);

However, Maple 16 is giving me an error message :

Error, (in plots/animate) the first argument must be a procedure

I don't know how I can do to animate this code.

Thanks!

## how to make an equation as the followed expressio... and if the A are an inversable matrix

## worksheet output doesnt diaplay...

Hi

worksheet output doesnt display the eigenvalues of a 19X19 matrix. Just gives in the form Root of(...). when datatype is indicated as anything other than complex(sflot) it gives error "unable to store". solution is required in compact mathematical expression form (may involve square roots etc). Please help.

Thanks

## Error, (in plots:-display) !!...

restart:with(plots):

h3:=((1+lambda*m*x/a0+phi*((4/Pi*sum((-1)^(n+1)/(2*n-1)*cos(2*Pi*(2*n-1)*x),n=1..infinity)))));

q:=Q-1:

f:=sin(alpha)/E;

DP3:=Int(f-((q*(k+1)*(k+2))/((1-tau)^(k+1)*((h3^(k+2)))*(k+1+tau)))^(1/k),x=0..1);

E:=0.2:phi:=0.2:alpha:=0.1:k:=1:lambda:=0.1:a0:=0.5:m:=0.1:tau:=0.1:

plot((DP3),Q=0..1,axes=box,linestyle=1,color=[red]);

I am unable to plot DP3 vs Q, not only it take very long time but didn't give any output.

Cheers!

## Mercury precession...

I am looking for a spreadsheet to compute the precession of Mercury fom the Schwarzchilg metric and the geodesic equations. Are you aware of such an example?

## Maple 18 and touch screens (Windows 8)...

When I try "touch and drag" in Maple documents, the documentation for example, I end up selecting text instead of scrolling. Unfortunately the alternatives for scrolling are a) the scrollbar, b) page-up/down or c) moving the cursor. Each of those alternatives is about 2.5311 orders of magnitude more inconvenient than touch&drag.

Does anybody know if its possible to get Maple (18) to scroll instead of select text when I touch the screen?

## Solve command gives 0...

Hello,

I am using Maple 17 to solve some equations. I am solving these equations with the solve command. There are some bounds on the parameters so I am including these inequalities. I have 4 variables, so I solve for 3 to get them in terms of the last one.

It returns piecewise solutions as per the inequalties as I hoped.

However for two ranges of the inequalities I get [] which I assume means no solution.

For another range I get an expression for each of my paramters.

For the final range I get 0 . What does this 0 mean and what do the [] mean?

I wondered if 0 meant that all paremeters equalling zero was a solution, but this is false.

Thanks

## Problem with elliptic integrals and assuming...

Hi there

There seems to be a bug when evaluating elliptic integrals using assuming. Here's an example:

INT:=Int(1/sqrt(a*x^3+1),x=0..X);

is our integral for some a. Now evaluate the integral using assuming on X in different ways:

INT2:=simplify(value(INT)) assuming X>0, a>0, a<1;

INT3:=simplify(value(INT)) assuming X<0, a>0, a<1;

These give analytic solutions which are different. Now plot them both and compare to the numeric solution

plot([subs(a=0.1,INT2),subs(a=0.1,INT3),subs(a=0.1,INT)],X=-1..1,colour=[red,green,blue]);

I'm finding that the red curve which should work for X>0 is wrong, while the green one which is for X<0 is ok for X either sign. [blue is the correct answer - numerically!]

Any ideas?

﻿