Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@erik10  Let's say we replace the first equation by:

0.44 - a < PA^2 + 2*PA*PB < 0.44 + a

where "a" is the known absolute error in the 0.44 value.  We replace the remaining equations in a similar way.  Furthermore, since PA, PB, and PO are probabilities, they should be between 0 and 1.  Thus, your problem amounts to solving a set of 14 nonlinear inequalities in the three unknows PA, PB, PO.

I think this is a nonlinear optimization problem.  Unfortunately I don't know much about the subject to offer you some help here.  Perhaps others who know more can comment.

 

@Preben Alsholm 

a/x^b produces a pretty good fit:

q:=Statistics:-Fit(a/x^b,data,x);

 

@hhoang1 OK, then. Consider:

Plug in x=3.  What is the value of y?

Do it on paper, not Maple!

Does this throw some light on the problem?

@hhoang1 That depends on where you put the missing parenthesis.

 

  1. The mathematical expression that you have shown has four opening parentheses and three closing parentheses.  Needs to be fixed.
  2. You forgot to say over which range of x values you need to plot.

@Klockjj Now the problem is in ode3 which, in a skeleton form, looks like

diff(P(z),z) = -1/P(z);

Solving this with P(0)=1 we get:

P(z) = sqrt(1 - 2*z);

Therefore the solution cannot extend beyond z=1/2 in this case.  Essentially the same thing is happening with your more complex equations.  It's time to go back and examine the derivation of the model.

 

 

@Bendesarts I have often wished that the whole worksheet would act as the Code Edit Region does, but so far as I know that's not possible in the current implementation.

Actually there may be fundamental obstacles in autoindenting a whole worksheet.  A Maple worksheet is conceived as an interactive interpreter of Maple code.  You can type a code fragment here, another code fragment there, and one gets interpreted and executed independently of the other.  To autoindent an entire worksheet, the indentation of each part would be affected by all other junk that may exist in the worksheet and probably that's not what you would want.

The Code Edit Region isolates a chunk of the worksheet from the arbitrariness of the rest of the worksheet and which gets autoindented as best as possible.

I don't use the Code Edit Region myself.  That's because autoindenting within a Code Edit Region is only partially implemented -- the code gets indented to the right properly, but leftward indentations needs to be done manually.  I also wish that there were an option to re-indent a code region whose indentation was messed up through multiple editings.

If a time comes when full autoindening is implemented in the Code Edit Region, I may consider using it.

 

@sarra The attached worksheet shows how to calculate and simplify the product x &x y.

It also shows how to calculate f(x &x y) and partially simplify it but the simplification in this case is incomplete.  Perhaps someone here more knowledgeable about Maple can show you how to complete it.

Note: I typed the entire worksheet from scratch.  I may have made errors in transcribing your formulas.  Be sure to check for correctness.

mw.mw

@Bendesarts You wrote:  "the classic presentation of a maple worksheet".

I can't tell whether the use of the word "classic" here is intentional or accidental.  There is something called "Maple Classic Worksheet".  If that's what you are asking about, I don't know the answer since I don't use the classic worksheet.

 

@sarra Let me ask one more time: Where is e(3)*e(1) defined in your worksheet?

@vv He postulates e(0)*e(1)=e(n-1).  But then, in a for-loop he sets e(i)*e(0)=e(i+1) for all i, and therefore e(1)*e(0)=e(2).  This makes the multiplication non-commutative.

I have asked him a few times what he means by "product" but haven't gotten a straight answer.

 

@sarra

1. Suppose n=5.  Where is e(3)*e(1) defined in your worksheet?

2. Consider two vectors u = <1,2,3,4> and v = <1,-1,1,-1>.  How would you calculate u*v?

 

@sarra I don't understand what you mean by " "*" denotes product of two vectors ".  Suppose n=5.  What do the products e(3)*e(1) or e(1)*e(3) mean?

 

  1. You have:

        # The vectors e(i) satify the folowing conditions
        e(0)*e(1)=e(n-1) assuming  1<n;

    Does the "*" denote some sort of multiplication?  How does one multiply two vectors?

  2.  You have:

        for i from 4 to n do
    What do you expect this to do?  You haven't said what n is.

 

@Doug Meade I think what you have shown may be made more transparent if you first extract the solutions x(t) and y(t) out of sol, as in

sol := dsolve({de1, de2, ic}, numeric, output=listprocedure);
X := eval(x(t), sol);
Y := eval(y(t), sol);

Then [X(1), Y(1)] would be the coordinates of a point on the solution curve at time t=1.  The attached worksheet has all the details.

mw.mw

First 72 73 74 75 76 77 78 Last Page 74 of 91