Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hi

I'm using Maple 17 on Windows 8 (64-bit).

I have noticed that when I use the 'spacecurve' command and try to display it with the 'display' command, nothing shows up. I made sure that I used 'with(plots)' and 'with(plottools)', still nothing. However 'plot3d' works fine. I think it has something to do with the version of Java I'm using but I don't know what. Any help is welcome, thx

Specifications of my laptop:

Graphics: NVIDIA Geforce GT 740m

Processor: Intel(R) Core(TM) i7-3630QM (2.40GHz)

Ram: 6,00 GB

OS: Windows 8.1

Dear all,

I am trying to use Maple for Finite Element calculations. I have a 2d setup with linear basis functions and a 2d gaussian kernel that can rotate with respect to the axes. Attached please find the work sheet I am using.

Basis_function:

B := (x1,y1,x,y) -> max(0, 1-abs(x-x1))*max(0, 1-abs(y-y1))

transmissibility function:

t_hat:= (x1,y1,x,y) -> A*exp(-a*(x-x1)^2-2*b*(x-x1)*(y-y1)-c*(y-y1)^2)

where A  and a,b,c are positive constants. a,b,c are calculated based on an angle phi and the two variances of the gaussian function.

I want to calculate the following function for different points (x1,y1) , (x2,y2):

trans := (x1, y1, x2, y2) -> int(int(B(x1, y1, xz, yz)*(int(int(t_hat(xz, yz, xp, yp)*(B(x2, y2, xz, yz)-B(x2, y2, xp, yp)), xp = x2-10*sigma1 .. x2+10*sigma1), yp = y2-10*sigma2 .. y2+10*sigma2)), xz = x1-hx .. x1+hx), yz = y1-hy .. y1+hy);

this integral in the form that is in the work sheet, works well for phi=0 and the results are what I want (numbers that go to zero as we move points 1 and 2 away from each other). for other values for phi it either gives an error (too many levels of recursion) or it returns expressions that seem unreasonable when I evaluate them (they don't go to zero).

for example, it doesn't work for phi = 0.5 at all. for phi = Pi/4 it will calculate some expression,

but as you move away from a point (e.g. trans(0,0,100,100)) the value does not become smaller than a certain value, but they should go to zero.

It seems that what I am trying to do is very sensitive to a,b,c, but actually it shouldn't be so different. I like to avoid exact integration, and just get a number, but I have no idea how to do this numerically. and I don't know how to write the problem in a way that would work for every angle phi.

any ideas?

thanks in advace,2d_maple_primes.mw

with(plots); with(LinearAlgebra); with(ArrayTools)

``

Transmissibility function specifications

alpha := 1;

1

 

4

 

1

 

(1/4)*Pi

(1)

 

a := (1/2)*(cos(phi)/sigma1)^2+(1/2)*(sin(phi)/sigma2)^2;

17/64

 

15/64

 

17/64

 

A = (1/8)/Pi

(2)

 

 

Transmissibility*Kernel

t_hat := proc (x1, y1, x, y) options operator, arrow; A*exp(-a*(x-x1)^2-2*b*(x-x1)*(y-y1)-c*(y-y1)^2) end proc

proc (x1, y1, x, y) options operator, arrow; A*exp(-a*(x-x1)^2-2*b*(x-x1)*(y-y1)-c*(y-y1)^2) end proc

(3)

B := proc (a, b, x, y) options operator, arrow; max(0, 1-abs(x-a))*max(0, 1-abs(y-b)) end proc

proc (a, b, x, y) options operator, arrow; max(0, 1-abs(x-a))*max(0, 1-abs(y-b)) end proc

(4)

trans := proc (x1, y1, x2, y2) options operator, arrow; int(int(B(x1, y1, xz, yz)*(int(int(t_hat(xz, yz, xp, yp)*(B(x2, y2, xz, yz)-B(x2, y2, xp, yp)), xp = x2-10*sigma1 .. x2+10*sigma1), yp = y2-10*sigma2 .. y2+10*sigma2)), xz = x1-hx .. x1+hx), yz = y1-hy .. y1+hy) end proc

proc (x1, y1, x2, y2) options operator, arrow; int(int(B(x1, y1, xz, yz)*(int(int(t_hat(xz, yz, xp, yp)*(B(x2, y2, xz, yz)-B(x2, y2, xp, yp)), xp = x2-10*sigma1 .. x2+10*sigma1), yp = y2-10*sigma2 .. y2+10*sigma2)), xz = x1-hx .. x1+hx), yz = y1-hy .. y1+hy) end proc

(5)

 

#####testing here######

#for phi == 0 the results are what i want, numbers that go to zero as the points go far from each other. for phi != 0 trans returns an expression and the evaluation of that expression doesn't go to zero as we move the points far apart.

NULL

trans(0, 0, 0, 1)

trans(0, 0, 1, 0)

trans(0, 0, 5, 5)

``

This should be zero for any angle

trans(0, 0, 50, 50)

 

 

 

``


Download 2d_maple_primes.mw

Hi,

I open a new subject about Fredholm Integral equation. My code work correctly.

But, I need some modification to get a nice display of the matrix found using
MatA,Vectb := GenerateMatrix(convert(sys3,list),Sol_phi);

such as Sol_phi is my solution that I want to find.

I introduced two function alpha1 and alpha2 in the code  see Equation (9) can I write all the coeficient of my matrix using the two function alpha[1] and alpha[2], it's better to see and read the matrix form.

 

Fred.mw

I have a complicated function that I call on a elements of a list. This function inside calls various other functions and in particular fsolve, which is not thread safe. In order to speed things up I tried using Grid:-Map, but have found a slight drop in performance.

So say a run with map takes 31 seconds, a run with Grid:-Map will take 32 seconds. By looking at the cpu activity, I can tell that only a single core is used at any one time (this is also evident from timing). By looking at the processes, I do see "mserver -gridnode 1/4", etc. present however, so new mserves are certainly spawned - they are just just not used concurrently.

Grid:-NumNodes() gives 4 for my CPU.

Any ideas how to force my code to run on all four nodes??

I am on ubuntu 12.04 x86_64.

thanks.

 ** EDIT **

In case someone finds this useful. Here is a quick-hack that fixes this problem for me.

Look at the current implementation of Grid:-Map with

showstat(Grid:-Map):

Define a new function called say hackMap that is identical to Grid:-Map, except, change the second line from this

     var := `union`(`union`(map(proc (x) op(0,x) end proc,indets(f,function)),indets(f,name)),{'`grid/mapcmd`'});

to this:

     var := {anames('user'), '`grid/mapcmd`'};

now use hackMap as you would Grid:-Map.

It basically forces maple to copy all the 'user' variables over to the new processes. On a machine with 4 nodes i get a ~4 seedup with my particular code.

NOTE: I am not certain that there aren't some side effects as I dont' know all the code behind the scenes, but I seem to get correct results with my particular code.

Hi,

thank for any  help.

I need you help to make a movies ( animation)  according to the index k=1..10.  k is used in Vect_T[k], vector of time to make an animation of the true solution, and it's also used in Matrix(M[..,..,k]), h

True solution:ow can I make a seq of plots for different value of k. 

 

plot3d(True_solution(x,y,Vect_T[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]);

Analytic solution

plots:-matrixplot(Matrix(M[..,..,k]),axes=boxed,tickmarks= [[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],default],labels=[x,y,u],axes = boxed);

I tried, this:

S:=seq(plots:-matrixplot(Matrix(M[..,..,i]),labels=[x,y,u],axes = boxed),i=1..10):
plots:-display(S);
 But I get only one figure.

 also,

I tried

BoxTrue:=Null;
for k from 1 to 10 do
BoxTrue:=BoxTrue, plot3d(True_solution(x,y,Vector_time[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]): od:
display(BoxTrue, insequence=true);
also, no display

 

want to write in maple code

to generate all commutative diagram 

with adjacency matrix

 

however, i only know a -> b, b-> c , a->d , d-> c

google no information about all commutative diagram, 

 

another problem is

would like to enrich theory , however, do not know how to connect property such as equations with diagram

Hi all,

I will use the following dummy example.

with function,f

f:=(xid,yid)->sum(x[i],i=1..xid)*sum(y[i],i=1..yid);

 

and a complicated term, myterm


myterm:=(f(3,4)+f(2,2))*f(1,1):
myterm:=expand(myterm);

 

'if' i have some previous knowledge, or know a bit of the term, i can find the structure by doing this


repar:=[f(1,1),f(2,2),f(3,4)];  # Or with more f(xid,yid) terms

tmp:=seq(repar[i]=ff[i],i=1..3);
simplify(myterm,{tmp});          # This is fine, gives me what i want

 

But, can we go further, and more 'obvious'

 

Given the fucntion f, same as before, and the same 'myterm'

can I have this
restart:
iwant:=(f(3,4)+f(2,2))*f(1,1);  # as a result, straightforward

so I dont have to go back to 'repar' and find that the terms exactly are.

 

Thanks,

 

Dear all;

 

I need a help in this question.

u(x,y,t) my solution of PDE. x,y space, and t=time.

In the case without t. .i.e. u(x,y). Here is a visualization of the lattice u(x_i,y_j). i=1..3, anf j=1..3.  Please try this example, it's working. 

my question, if i would like to add a third variable t, i.e.  and get u(x_i,y_j,t_k)  on each points. I would like to show the lattice in (x,y) plan for each t_k. I Think I will get many parallel lattice. 

Please can some one, modify this code to get the parallel lattice. Thanks.


with(LinearAlgebra):
with(plots):
with(PDEtools):
interface(rtablesize=20):

Here,


L := 'L':
N := 'N':
g := 'g':
Z := i -> -L+2*L/(N+1)*i;
x[0] = Z(0),x[N+1] = Z(N+1),y[0] = Z(0),y[N+1] = Z(N+1);

 

N := 4;
L := 1;
r := L/(N+1)/4;
ngon := (n,x,y,r,phi) -> [seq([x+r*cos(2*Pi*i/n+phi), y+r*sin(2*Pi*i/n+phi)], i = 1 .. n)]:
p[1] := display([seq(polygonplot(ngon(4,Z(0),Z(j),r,Pi/2),color=magenta),j=0..N+1),

seq(polygonplot(ngon(4,Z(N+1),Z(j),r,Pi/2),color=magenta),j=0..N+1),

seq(polygonplot(ngon(4,Z(i),Z(0),r,0),color=magenta),i=1..N),

seq(polygonplot(ngon(4,Z(i),Z(N+1),r,0),color=magenta),i=1..N),

seq(seq(polygonplot(ngon(20,Z(i),Z(j),r,0),color=white),i=1..N),j=1..N),

textplot([seq(seq([Z(i+0.1),Z(j),typeset(u[i,j])],i=0..N+1),j=0..N+1)],align={above,right})],view=[Z(-1)..Z(N+2),Z(-1)..Z(N+2)],tickmarks=[[seq(Z(i)=typeset(x[i]=evalf[2](Z(i))),i=0..N+1)],[seq(Z(i)=typeset(y[i]=evalf[2](Z(i))),i=0..N+1)]],

axes=boxed,scaling=constrained,labels=[``,``]):
p[1];

 

 

 

 

 

 

What is the weak solution integral equation for 

du(x)/dx2 -(1+x2 ) u(x)-1=0

okay so we have to, In the Notation of this question http://www.mapleprimes.com/questions/201278-Fix-A-Syntax-Error-In-My-Simple-Function-please-Help , let f0 be contained in V be any given function and de ne
a sequence (fn) with n contained in (N subscript 0) of functions fn contained in V by

(f subscript 0) := f0  and   fn+1=Afn  for all n contained in (N subscript 0).


prove that this sequence converges pointwise, i.e. that for all   i,j contained in [N]X[N],
(f subscript infinity)(i, j) := (lim n-> infinity  fn(i, j)) exists and that "triangle"(f subscript infintiy) =0
and that
f1 = 0 :

any help would be much appreciated guys <3  

I have a plot of a sinusoidal function(cos_phi) which changes with incrementing values of variable k. When this function goes above 1 or below -1 I would like to have the range of k for which it occurs outputed somehow. Would anybody know how to do this?

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.  

 Math_4710_Hilbert_16.mw

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,

 

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

and if the A are an inversable matrix

First 237 238 239 240 241 242 243 Last Page 239 of 334