Maple 13 Questions and Posts

These are Posts and Questions associated with the product, Maple 13

I have below outlined the different probabilities for different poker hands given
5 cards from a 52 cards deck. The frequencies are from wikipedia
http://en.wikipedia.org/wiki/Poker_probability




These frequencies are quite interesting....I wonder if they found them by "brute fource"

Dear,

I have problem that after using assume(...) and then use label such as (1.1)... then the assumptions are lost. Is it a bug?

Below is my attached worksheet (I used Maple 13 , I don't know if later version is better?)

label_and_assume.mw

Actually , the lost of assumptions will cause some problems such as make integration become unevaluated.... and will take you a hard time to debug...

After I excute : x^2+2*x+1;   and right click on the output then I saw the CompleteSquare option in the Context Menu but after I write  assume(x>0); and then right click on the output of x^2+2*x+1; then I didn't see this option (and there are only a few options appeared in the Context Menu compared to the case before using assume()). 

Sometimes It cause some inconvenience for me since I used Context Menu on outputs from previous lines in my worksheet...

problem := ur+dr, {con1, con4, con5}, seq(w[i] = 0 .. 1, i = 1 .. N):
problem_matrix_form := Optimization:-Convert:-AlgebraicForm:-LPToMatrix(problem):

Optimization:-LPSolve(problem, maximize = true);
Optimization:-LPSolve(problem_matrix_form[2 .. 4], maximize = true);



The above trick-conversion method works for all LP and QP problems
However it does not work on NLP problems. I have attached the workshet

Why do I get this error message:


X := proc (a, b) local w, V, i, E, s; global Nr, sampvar, u;

w := sampvar*(1-a-b);     V[2] := u[1]^2;

if w = 0 then w := 0.1e-4 end if;

for i from 3 to Nr-1 do V[i] := w+a*u[i-1]^2+b*V[i-1] end do;

for i from 2 to Nr-1 do E[i] := -(1/2)*ln(V[i]^2)-u[i]^2/V[i] end do;

s[1] := 0;   for i from 2 to Nr-1 do s[i] := s[i-1]+E[i] end do;

s[Nr-1]

end proc:

I wrote a procedure that solves a volterra integral equation numerically. This procedure  takes N , number of radial basis functions, as parameter  .the problem is:Error,  bad index into Matrix

How can I fix this problem?

here is my procedure:



hi, could You help me to write script(program) with maple( maple 13) exercise....?

1) The velocity of a freely falling object near Earth's surface is described by the equation
dv/dt=-g     (1.1)
where v is the velocity, g=9.8m/s^2 . Write a program that employs the Euler method to compute to solution to (1.1); that is, calculate v as a function of t. For simpilicity, assume that the initial velocity is zero-that is, the object starts from rest-and...

So, I am reading the blog post about Mean Absolute Deviation portfolio optimization that

http://yetanothermathprogrammingconsultant.blogspot.com/2010/04/portfolio-from-qp-to-lp.html

 

claims that the traditional portfolio optimization problem can be expressed as seen below:

I am not sure however that it is 100% correct for example you have (r[i,t...



A := 0.5e-1:

I am trying to evaluate integral (-1/rho)*del (p)/del (x) dy within the limits y=0 to y=delta (x). For that I first evaluated (-1/rho)*del (p)/del (x) and stored it in res2. Then I tried to integrate it w.r.t dy within limits 0 to delta (x). I wrote the following Maple lines for the purpose:

Te := proc (x, y) options operator, arrow; T[inf]+(T[w]-T[inf])*(1-y/delta[t](x))^2/(1+2*A*H/delta[t](x)) end proc

PDE := diff(P(x, y), y)-rho*g*beta*(Te(x, y)-T[inf]) = 0

Ok, I want to solve the below code as fast and efficient as possible.
Since it is an LP problem LPSolve(Matrix Form) should be the best.

The problem is that the default objective function in LPSolve(Matrix Form)
is c'x which creates a bit of a problem since my objective function is not a
function of x. My objective function is simply ur + dr. How can I solve that?!

restart:
randomize():
with(Optimization):
with(Statistics):
with(LinearAlgebra):

restart

u := proc (x, y) options operator, arrow; u[x](x)*(y/delta(x)-2*y^2/delta(x)^2+y^3/delta(x)^3+B*H*(1-3*y^2/delta(x)^2+2*y^3/delta(x)^3)/delta(x))/(3*B*H/delta(x)+2) end proc

int(u(x, y)^2, y = 0 .. delta(x))

 

I tried the following partial integration in MAPLE. But Maple says:

Error, (in u[x]) too many levels of recursion.
Analytically it is possible to evaluate the integral in the above lomits. Where lies the problem?

I wrote the following MAPLE lines to determine the three constants a, b and c from three boundary conditions. Whatever a, b and c I get as result are correct. Now I want to substitute back the values of obtained a, b and c in the expression for Te to obtain the resulting temperature distribution. I used both algsubs(a, b, c, Te) and subs(a, b, c, Te) one by one to substitute a, b and c in the expression for Te and get the result. But both way it is showing...

I wrote the following Maple lines:

I wrote the following lines in MAPLE:

First 33 34 35 36 37 38 39 Last Page 35 of 55