MaplePrimes Questions

My question has two steps:

STEP 1:  The multiplication  of is defined as follows

 

if m<>l, then

.

if m=l and m<=s,

Question 1: I wrote a code for calculating the multiplication  of. Is it right?

The code for Step 1  

restart;

multiply:=proc(n,m,l,s) local K,g,a: 
a:=unapply(doublefactorial(2*j-1)/factorial(j),j):
g:=unapply((a(m-j)*a(j)*a(s-j)/a(m+s-j))*(2*m+2*s-4*j+1)/(2*m+2*s-2*j+1),j):

if n<>l then 0 else
sqrt((2*m+1)*(2*s+1))*2^(K/2-1).add((g(j)/sqrt(m+s-2*j+1/2))*phii(n,m+s-2*j),j=0..m) 
end if
end proc:
 
n:=2:
l:=2:
m:=1:
s:=1:
multiply(n,m,l,s);

when I compared the results which I got and the results which is given in the book as follows, I think it is right.

Step 2:

We know that the outer product matrix is calculated as follows 

  

We found the elements of the outer product matrix in Step 1. 

Question 2 : I want to write the elements which are derived in step 1 to the outer product matrix in step 2. In here, the outer product matrix is NxN matrix. N=(M+1).2^(K-1) where K, M are any integers.

Hello,

How I can take variation from left-hand side of  5, and reach to right-hand side of  5. After by using integral by part obtained  7?

Thank you

Maple pdsolve supports periodic boundary conditions. So I was hoping it will be able to solve the heat PDE inside disk with periodic boundary conditions. But I am not able to make it work. 

Is there a trick to make Maple solve this, is there something I need to add or adjust something else? or it is just the functionality is not currently implemented?

This is what I tried

restart;

pde := diff(u(r,theta,t),t)=diff(u(r,theta,t),r$2) + 1/r*diff(u(r,theta,t),r)+1/r^2*diff(u(r,theta,t),theta$2);
bc1 := u(a,theta,t)=0;
bc2 := eval(diff(u(r,theta,t),theta),theta=-Pi)=eval(diff(u(r,theta,t),theta),theta=Pi);
bc3 := u(r,-Pi,t)=u(r,Pi,t);
ic  := u(r,theta,0)=f(r,theta);
sol := pdsolve([pde, bc1,bc2,bc3, ic], u(r, theta, t), HINT = boundedseries(r = 0)) assuming a>0,r>0

I solved this analytically by hand using standard separation of variables method. The issue of telling Maple the solution is bounded at center of disk, I assume is being handled automatically by the HINT=boundedseries(r = 0).

If I remove the hint, it also does not solve it. 

Maple 2019, Physics package 338

I use Maple 2015, is it possible to animate a standing wave as shown below?

 

 A working animation can be found on https://oceanservice.noaa.gov/facts/seiche.html

inequal({F__i*(1-e__0/k__b)/A__c+M__min__B/Z__t >= sigma__ti, .8*F__i*(1-e__0/k__t)/A__c-M__max__B/Z__b >= sigma__ts, .8*F__i*(1-e__0/k__b)/A__c+M__max__B/Z__t <= sigma__cs, F__i*(1-e__0/k__t)/A__c-M__min__B/Z__b <= sigma__ci, abs(e__0) <= `(e__0)__mp`}, 1/F__i = 0 .. 10, e__0 = -5 .. 5, color = "Niagara 2")
Error, (in plots:-inequal) invalid input: Plot:-Inequality expects its 2nd argument, r1, to be of type name = range(And(realcons, Not(infinity))), but received `1__`/F__i = 0 .. 10
 


 

restart

Loading Statistics

Sam := Sample(('Uniform')(10, 20), 10)

Sam := Vector[row](10, {(1) = 18.147236863931788, (2) = 19.057919370756192, (3) = 11.26986816293506, (4) = 19.133758561390195, (5) = 16.323592462254094, (6) = 10.975404049994095, (7) = 12.784982188670483, (8) = 15.468815192049838, (9) = 19.575068354342974, (10) = 19.648885351992767}, datatype = float[8])

(1)

``

a := min(Sam)

10.9754040499940952

(2)

b := max(Sam)

19.6488853519927673

(3)

M := int((Q-x)*f(x), x = 0 .. Q)

int((Q-x)*f(x), x = 0 .. Q)

(4)

N := int((x-Q)*f(x), x = Q .. b)

int((x-Q)*f(x), x = Q .. 19.6488853519927673)

(5)

Ecost := M*co+N*cs

(int((Q-x)*f(x), x = 0 .. Q))*co+(int((x-Q)*f(x), x = Q .. 19.6488853519927673))*cs

(6)

DCost := diff(Ecost, Q)

(int(f(x), x = 0 .. Q))*co+(int(-f(x), x = Q .. 19.6488853519927673))*cs

(7)

``

Df := max(Sam)-min(Sam)

8.67348130

(8)

NULL

Val := eval(DCost, [f(x) = 1/Df, co = 20, cs = 25])

5.188228168*Q-56.63494470

(9)

QStar := fsolve(Val, Q)

10.91604742

(10)

NULL

``

NULL

``


 

Download dummy_1.mw

I want to write a procedure P such that the input of P is a positive integer number n and the output of P is a random permutation of the numbers {1,2,..,n}. 

I know that there is a command in Maple 2017 such that the command produces the mentioned request (random permutation in the combinatoric package), but I should work with Maple 15 and there is no the random permutation command in Maple 15. 

One of the solutions that I am used is based on the random number and check that if the produced numbers are pairwise distinct or not. The problem of this method  is that for n>128, it takes too time to generate a random permutation of the length n.

Thanks for any suggestions. 

I'm trying to better understand the Black and Scholes model; which is a scalar function on (positive reals)^5.
a maplesoft worksheet defines it as

BS_Price=exp(-r*T)*(-(1/2)*erf((1/4)*sqrt(2)*(sigma^2*T-2*r*T+2*ln(K)-2*ln(S[0]))/(sigma*sqrt(T)))+1/2)

I am trying to understand the parameter vectors (r ,T,K,S[0],sigma) that give the same values of BS_Price - and particularly whether these form curves, closed curves, surfaces or similar.

Right now, I am not sure how to procede.

EDIT
I've just put together  a procedure that evaluates BS at points in R^5 - and i think i can move forward by using the curry or rcurry functions to get a 5d tensor of the values of BS, that i can start to look for patterns within.

BS_Price := proc (InterestRate, StockPrice, StrikePrice, Duration, Volatility) evalf(subs([r = InterestRate, S[0] = StockPrice, K = StrikePrice, T = Duration, sigma = Volatility], exp(-r*T)*(-(1/2)*erf((1/4)*sqrt(2)*(sigma^2*T-2*r*T+2*ln(K)-2*ln(S[0]))/(sigma*sqrt(T)))+1/2))) end proc

could anyone give me advice on doing this?
 

The animation in this worksheet seems realistic but I wonder if the physics which is implemented is correct since there is no explicit mention of rotational energy.

ThrowBola.mw

Dear Community,

I have set up a simple 2D RC network with 1 lookup table current source, and a few probes. The model runs fine. Now I wanted to run it from Maple, and followed carefully a MapleSim tutorial which exlained how to establish the link between Maple and MapleSim. I added a worksheet called RCNetworkMaple.mw and run the A := MapleSim:-LinkModel(): command. Then I wanted to run the simulation with the A := Simulate() ; command, but nothing happened, Maple returned A := Simulate(). What did I wrong? In the tutorial it runs perfectly. (Files attached.)

 

Tx for the kind help in advance,

best regards

Andras

RCNetwork.msim  RC_Rate_Schedule.xlsx

Hellow, help required to remove the errors

 How to  obtain the pressure drop i am unable to get the output. I am uploading the file  and the equations

help_dp.mw

 

 

 

 


 

For this problem

I'd like to see if Maple can give, or simplify the solution it now gives to look like this solution 

The one it currently gives is

restart;

pde:=diff(w(x,t),t)+c*diff(w(x,t),x)=0; 
ic:=w(x,0)=f(x);
bc:=w(0,t)=h(t);
sol:=pdsolve([pde,ic,bc],w(x,t))  assuming t>0,x>0,c>0

 

And I did not know how to simplify it or obtain the simpler one. I tried strip and TWS hints.  I also do not understand why Maple gives an integral with 0 as upper limit there (the second integral).

Using Physics package cloud version 338 and Maple 2019. On windows 10.

Thank you

Hi, I’m new to maple and I’m not very good with these things, but could someone tell me if there’s a way to calculate a^b with large numbers?

I’ve tried to do it but it just says evaluating in the bottom left corner but doesn’t actually do anything. This is an example with two of the large numbers i have to use(if this helps):

815427339135043^5579408896058

Thank you in advance for any help.

Good day!

I wish to represent the flow across a network from a set of sources to a number of destinations or sinks.

In the simple example attached, there are 4 sources and 10 possible sinks. The flow from source to sink is given by the matrix, A, and each element is a binary entry; 1 for active and 0, otherwise. I would like to assign labels to each source (A,B,C,D) and sink (1,2,3,..., 9,10) and this feature will be most convenient for large matrices.The idea is to have these labels shown on the directed graph so that it is easy to see the flow configurations at a glance.

Does anyone know how this can be done?

Thanks in advance.

MaplePrimes_network_labels.mw

Hi,

I have to build a simple model in MapleSim that allows to simulate a mass that goes down along an inclined plane with a certain friction.

Is there a component that simulates the inclined plane? I tried to use a prismatic joint but it has some predifined translational directions so I can't impose the movement along the plane.

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