Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@Shervin I obtained the ranges by trial-and-error.  Specifically, I plotted the surface in a smallish box, then gradually expanded the box in order to capture the complete surface.  I am sure that this could have been done more systematically but I didn't bother.  Here are the plots corresponding to Mu=0.5 and Mu=0.99 plotted over the x1=0..60, x2=0..10, x3=0..2 range:

As Mu approaches 1, the surface approaches to what looks like the three adjacent faces of a cube.

The following animation shows the surface with Mu = 0 .. 1 in small increments:

Here is the Maple worksheet that produced that: anim.mw

Please note:  I wouldn't use these plots if they are for any serious presentation.  The implicitplot3d() function by its nature produces very rough looking surfaces.  Looking at the results, however, we see that the surface for each Mu value consists of three or four very simple patches.  You can get much better-looking results by figuring out the equations of those patches and using Maple's plot3d() function for plotting perfect representations.

 

@Carl Love and acer, thanks for your detailed explanations.

What is still bothering me is that I cannot explain the different outcomes of Experiment #1 and Experiment #2 in my post above.  It seems that the two vectors are viewed as identical objects in one experiment and not in the other.

@Markiyan Hirnyk The first condition in the OP's piecewise function is

(`or`(x1 > 55, x2 > 10), x3 >= 2)

In your code this has changed to

(`or`(x1 > 55, x2 > 10), x2 >= 2)

The graph will look different once you fix that.

Then we wil find that the proper plotting range is

x1=0..60, x2=0..10, x3=0..2

 

 

Carl, in an attempt to understand the logic of your solution, I did the following two experiments.

Experiment #1:

{ <a,b>, <a,b> };

{Vector(2, {(1) = a, (2) = b})}

 

This works as expected -- a set of two identical items is the same as the set of one of them.

Experiment #2:

<a,b>, <a,b>;

Vector(2, {(1) = a, (2) = b}), Vector(2, {(1) = a, (2) = b})

{ % };

{Vector(2, {(1) = a, (2) = b})}

 

I am puzzled by why this set does not collapse to a single item as in Experiment 1.  Do you know the reason why?

 

Aside: If we replace vectors with lists in these experiments, then the outcomes of the two experiemnts turn out to be the same.  You relied on that in your soluiion.

 

@rlopez Providing a student with a complete solution to a homework assignment is not unlike "helping" a runner who is training for a race by giving him a ride.

I suspect that during your teaching years you would not have been overjoyed if a student presented you with someone else's work as their own.  There is no good reason to do otherwise now.

@Kitonum How is a graph of (w, p(w)) any different from a graph of (w(z), p(w(z))?  Aren't they the same?  What is wrong with doing it in the simple way that I have shown, especially since w and p are functions of z, and the OP seems to be interested in in the range z=0..26?

 

@tomleslie I failed to connect this version of the question to the previous one and the corrections that you had suggested, which in retrospect make very good sense.

@reinhardsiegfried The polynomial method you are proposing merely reinvents the series solution.  If the series solution fails for some reason, then your polynomial solution will fail too because it's the same thing.  Linear or nonlinear does not matter.

@reinhardsiegfried OK, if you want a truncated polynomial approxination, then you may want to try this.

sys := diff(x(t),t) = y(t), diff(y(t),t)=x(t);
ic := x(0)=2, y(0)=1;
dsolve({sys, ic}, {x(t), y(t)}, series);
 

{x(t) = series(2+t+t^2+(1/6)*t^3+(1/12)*t^4+(1/120)*t^5+O(t^6),t,6), y(t) = series(1+2*t+(1/2)*t^2+(1/3)*t^3+(1/24)*t^4+(1/60)*t^5+O(t^6),t,6)}

mathieulibert Perhaps it can help if you explain how you calculate a, b, c in terms of k1, k2, k3 and the three angles.  I don't know how, and I didn't find an explanation in your worksheet.

@Alejandro Jakubi So there is nothing new under the sun...  Now that we see that this issue has been encountered so many times, I wonder if it would help to consider changing Maple's behavior so that it always treats a definite integral's variable of integration as a local variable.  I attempted to write a generic proc, such as myInt(expr, var=range) to do that but gave up very quickly since I don't know enough about writing fancy procs in Maple.

@Markiyan Hirnyk  Oh, I see.  You are saying that the product curve is not drawn.  That's easy to do.  Here it is.  The green graph is the product of the blue graphs.  The yellow area is the value h(t) of the convolution.  The graph of h(t) is shown in red.

Here is the code that produced it. It is based on what Carl posted.

restart:
Digits:= 4:
u:= Heaviside:
f:= t-> u(t) - u(t-2):
g:= t-> t*u(t) - (t-4)*u(t-4):
plotg:= plot(g, -6..10, color= blue):
h:= unapply(Int(f(t-q)*g(q), q= -6..t), t):
ploth:= convert(op([1,1], plot(h, -6..9)), listlist):
frames:= seq(
     plots:-display([
          plot(f(t-s)*g(s), s=-6..100, color=green, filled=[color=yellow]),
          plot(f(t-s), s= -6..10, color= blue),
          plot(select(xy-> xy[1] <= t, ploth), color= red, thickness= 3)
     ]), t= -3..9, 0.4
):
plots:-display(
     [plots:-display([frames], insequence), plotg],
     view= [DEFAULT, `..`((min,max)(ploth[..,2]))]
);

Comment:  I have kept the function f as in the original request.  However, the demo would be more interesting if the area under the graph of f were 1 and f were symmetric.  To achieve that effect, in the code above change the defintion of f to

f:= t-> (u(t+1) - u(t-1))/2;

 

@Markiyan Hirnyk I am referring to the animated picture under the heading "Here it is".

@Carl Love Your modified code is orders of mangnitude faster!  Learned a bunch of new tricks by examining it.  Thanks!

@Markiyan Hirnyk Well, there is an interpretation to the animation with the red and blue curves which I posted earlier.  At each instant 't' of the animation sequence,  consider the pointwise product of the two blue graphs.  Then the convolution, h(t), is the area under the graph of that product function.

First 93 94 95 96 97 98 99 Page 95 of 99