sand15

1254 Reputation

15 Badges

11 years, 1 days

MaplePrimes Activity


These are replies submitted by sand15

@acer 

First of all: thank you for these "dispassionnate" answers.

I have a few questions ad remarks:

About your first reply:

  1. F := value(CDF(X, s, inert)) returns a more credible expression than CDF(X, s): do you intend to modify the CDF procedure in order that it will do this automatically?
    All the more that, if I'm not mistaken, there is no advice in the help pages to proceed the way you did.
  2. F := value(CDF(X, s, inert)) F := sum(piecewise(_t < 0, 0, binomial(3, _t)*(1/2)^_t*(1/2)^(3-_t)), _t = 0 .. s) is close to the Maple 2015 output of  CDF(X, s) piecewise(s < 0, 0, 3 <= s, 1, sum(binomial(3, i)*(1/2)^i*(1/2)^(3-i), i = 0 .. floor(s))).
    Nevertheless  some discrepancies remain :
    1. value(CDF(X, s, inert)) explicitely tells nothing about what happens beyond s>3 (contrary to Maple 2015).
    2. The upper summation bound is no longer floor(s) but s, even if it seems to be exactly the same thing, why this change?



About your second reply:

  1. F := CDF(X, s) assuming s <= 3 doesn't suit me for it implicitely tells that the CDF is not defined for values of s strictly greater than 3.
     
  2. Given the fact that PDF(X, t) is a linear combination of "Dirac functions", the computation of the cdf through the command   cdf := int(P(X, t), t=-infinity..s) provides a linear combination of Heaviside functions (exactly what Maple 2015 does too).
    So, why does this Psi function come from ?


 

Finally

  1. Do you think of recovering the old Maple 2015 CDF procedure ?
     
  2. For my sake, would you qualify as bug the fact  CDF(X, s) is not returning a proper expression?

 


CDF of Binomial(6, 1/2) is OK  but not CDF of Binomial(6, 1/4) 
The step at location [0, 1[  (or ]0, 1] because french and english customs do not agree on this point) is not present!

X := RandomVariable(Binomial(6, 1/4)):   # or Binomial(6, 0.25) if you prefer
F := CDF(X, s):
plot(F, s=-1..7, discont=true, gridlines=true, axis[1]=[gridlines=7]);


The CDF has an uncomprehensible form invoking the Psi function. 
Could anyone from the development team restore what was done in Maple 2015?

@acer 
I'm so sorry acer for not having replied sooner.
After this inexcusable delay I greatly thank you for all these precious informations.

@vv

Thanks vv. 

By the way: limit returns infinity ... It would have been better to recieve a FAIL or undefined answer

@acer 

Very good!

Do I "want additional aspects like color, or fonts/color/weight on 2D Math"? Surely!

By the way, I had thought using Typesetting because I had already saw a few commands using "mn", mrow", somewhere here.
But I wasn't able to retrieve them from the Typesetting help page: are these functions documented in some place?

This text corrected 20 miutes later ...
I've found useful informations from the example given in the InertForm[Typeset] help page!!!

Thanks for the help

@tomleslie 

Thanks Tom, this is indeed a good idea.

 

@Carl Love 

I just read your reply, thanks for the clarification.

@Carl Love 

Thanks a lot



PS: No hard feelings, glad to read you again

Hi again
(sand15 is my professional login and mmcdara my private one)

I've done this very simple test:

restart:
with(Groebner):
F := [ seq(randpoly([x,y], homogeneous), k=1..3) ];
G := Basis(F, plex(x,y)):
LeadingCoefficient~(G, plex(x,y));

The GBs are not reduced (except in exceptional cases)

I've tried to use other algorithms, for instance
G := Basis(F, plex(x,y), method=maplef4): 
(it seems that one can write maplef4 or "maplef4" ,  see the head of  showstat(Basis) where `method` is defined as type string ot symbol).
For all the methods I tested we obtain the same unreduced GB.

But, very surprisingly, you can write  
G := Basis(F, plex(x,y), method="WhatTheF.ck"):
and get no error message ??? 

@Carl Love 

 

Sorry for the last reply: the screen capture doesn't appear even if it was correctly correctly displayed in the preview window.
Il will try again when I am home

@radaar 

And I repeat too that your solution is {x(t)=sin(t), y(t)=cos(t)}
See also Preben's answer

@radaar 

I hope you have understood why your solution x(t) is just a sine wave (if not look to my answer to Kitonum).
The solution of SYS2 is just the one of SYS={diff(x(t), t)=y(t), diff(y(t), t)=-x(t), x(0)=0, y(0)=1}:

But, if you are still unconvinced, just do this

SYS := {diff(x(t), t)=y(t), diff(y(t), t)=-x(t), x(0)=0, y(0)=1}:
Tmax:=600:
GlobalPlot := NULL:
for n from 1 to floor(Tmax/8) do
   sol := dsolve(SYS, numeric, range=8*(n-1)..8*n):
   GlobalPlot := GlobalPlot, odeplot(sol, [t, x(t)], 8*(n-1)..8*n):
   X:=subs(sol(8*n), x(t)):
   Y:=subs(sol(8*n), y(t)):
   SYS :=  {diff(x(t), t)=y(t), diff(y(t), t)=-x(t), x(8*n)=X, y(8*n)=Y}:
end do:
plots:-display(GlobalPlot):


Still not convinced?
Then do this

restart:
gate := 1 - ( Heaviside(t - (8*n - epsilon)) - Heaviside(t - (8*n + epsilon)) ):
SYS := {diff(x(t), t) = y(t)*gate, diff(y(t), t) = -x(t)*gate, x(0)=0, y(0)=1}:
FormalSolution := solve(limit~(SYS, epsilon=0), {x(t}, y{t]);

FormalSolution is the solution of
{diff(x(t), t)=piecewise(t<>8*n, y(t), 0), diff(y(t), t)=piecewise(t<>8*n, -x(t), 0), x(0)=0, y(0)=1}
whatever the value of n.
Note FormalSolution is {x(t)=sin(t), y(t)=cos(t)}, meaning the discontinuity at t=8*n has absolutly no influence.

If you have several such rhs discontinuities, FormalSolution still represents the solution: the argument is that one discontinuity at t=8*n having no influence then a numerable number of them do not have neither

@Kitonum 

 

Consider the following problem:

gate := 1 - ( Heaviside(t - (8*n - epsilon)) - Heaviside(t - (8*n + epsilon)) ):
SYS := {diff(x(t), t) = y(t)*gate, diff(y(t), t) = -x(t)*gate, x(0)=0, y(0)=1}:

Would you say this system has no solution?
Easy to check that Maple returns one, at least one n and epsilon has recieved numerical values; for instance
dsolve(subs({n=1, epsilon=0.1}, SYS), {x(t), y(t)})

Now it is also obvious that the rhs of SYS tend to the rhs of SYS2 when epsilon --> 0.
And thus, at least for epsilon <> 0, the limit of the solution of SYS tend to the one of SYS2.


The solution x(t)  is "globally" a sine function, excepted in the range [8*n=epsilon, 8*n+epsilon] where it is flat with a constant value equal to x(8*n-epsilon).
More precisely x(t) is made of:

  1. a sine function sin(t)  from t=0 to t=8*n-epsilon (assuming n > 0),
  2. a plateau x(t)= x(8*n-epsilon) from t=8*n=epsilon to t= 8*n+epsilon,
  3. and finally a translated sine function sin(t+2*epsilon) beyond t=8*n+epsilon,

As epsilon  --> 0  this plateau shrinks at t=8*n and, when epsilon=0, the solution (the one of SYS2) is a continuous sine curve (a cosine cuve for y(t))

The numerical solution can easily be obtained with 
sol := dsolve(SYS, numeric, parameters=[n, epsilon])

 

 

Another point of view:

  1. Solve SYS from 0 to T=8*n-epsilon
    let's note sol1 the corresponding solution and XT and YT the values of the solution at timùe T for x(t) and y(t) respectivey
  2. Solve {diff(x(t), t) = y(t)*gate, diff(y(t), t) = -x(t)*gate, x(T)=XT, y(T)=YT} up to t=8*n+epsilon
    Obviously this second solution is x(t)=XT, y(t)=YT
    Let's note TT =8*n+epsilon
  3. Solve {diff(x(t), t) = y(t)*gate, diff(y(t), t) = -x(t)*gate, x(TT)=XT, y(TT)=YT}
  4. Connect these 3 solutions

@Mariusz Iwaniuk 

Is this one correct ?
(I think one should plot func and not ifunc)

Volterra2.mw

 

It's me again...

I used CurveFitting:-Spline with degrees 1 and 3, and CurveFitting:-PolynomialInterpolation with different values for the option 'form'.
In all the cases i get no error but the method seems to diverge.
More precisely, in my first answer I had plotted only  [sinh(x), ifunc(1)(x)]  and  [sinh(x), ifunc(2)(x)]  and it looked well ( ifunc(2)(x) was closer too sinh(x) than  ifunc(1)(x) was).
I pushed a little bit forward by plotting  [sinh(x), ifunc(4)(x)]  ... and  ifunc(1)(x)  looks like some kind of parabola A*x^2 with A < 0 !!!

Maybe I did inadvertently some mistake when I modified your code ????

First 24 25 26 27 28 29 30 Last Page 26 of 35