Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@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

@vv Your calculation shows great insight.  There is magic in the definition of H.  I was looking for something like that but was unable to derive it.  I have to admit that even after seeing it I still don't quite understand why it works, but that's OK since it gives me something to think about.

@Axel Vogt I don't see where you get the 0..10 range in z1.  That surely can't be correct.  Did you calculate that by hand or did you use a Maple library or something?

This is not a solution but only a sketch of a strategy which after a lot of effort will reduce the problem to a triviality.

The germ of the idea is observing that the integrand is constant on any hyperplane x1 + x2 + … + x10 = r where r is a constant.  Therefore, changing the coordinates so that one of them points in the direction of that hyperplane's normal, the ten-fold integral reduces to an integral of a single variable in that direction.  The price we pay is having to deal with  geometric complications that arise from that change of coordinates.

I will demonstrate the method by solving the case of the triple integral.  The ten-fold integral is left as an exercise for the interested reader ;-)

Thus, let us look at the problem

where g is any function of one variable.  Change from the (x,y,z) variables to a new (u,v,w) variables defined through

x = u,
y = v - u,
z = w - v.

We see that x + y + z = w, therefore the integrand g(x+y+z) equals g(w), and the problem reducdes to that of the integration of a function of a single variable.

For the purpose of explanation, it helps to look at the more general problem

where f(x,y,z) is not necessarily of the form g(x+y+z).  To perform the change of variables, we examine the intersection of the cube [0,1]x[0,1]x[0,1] with the plane x+y+z=w and we see that there are three distinct types of intersections, depending on the value w.  When w is between 0 and 1, the intersection is an equilaterial triangle.  When w is between 1 and 2, the intersection is a hexagon.  When w is between 2 and 3, the intersection is again an equilateral triangle.  Thus, we slice the cube with the plane x+y+z=w as w varies from 0 to 3, integrate over each cross-section, and add up the results, which yields the vallue of the desired integral.

After a bit of geometric scrutinizing, we see that i0 = i1 + i2 + i3 + i4, where

In partucular, if f(x,y,z) = g(x+y+z), each of these reduces to an integral of single variable g(w).  As an example:

which is approximately equal to 0.1589542911.

The attached worksheet has some extra details.

funky-integral.mw

@mskalsi dsubs is indeed the right tool for this.  I had forgotten about its existence.  Thanks for your note.

@mskalsi Ah, now I see what it is that you are asking.  I don't have a neat solution for you, but perhaps the attached worksheet will do.

zero-derivatives.mw

 

First 80 81 82 83 84 85 86 Last Page 82 of 99