JoyDivisionMan

95 Reputation

3 Badges

5 years, 181 days

MaplePrimes Activity


These are questions asked by JoyDivisionMan

Greetings, Friends.

I have a function f(t) which is a density function. It has a [0,2] interval and integrates to unity. I convolve f(t) with itself to get g(t). It has a [0,4] interval and integrates to unity. All is well with that and I understand.

BUT, the boundary of g(t) shouild be on the interval [0,4/sqrt(3)]. This is based upon both my simulation and other analyses.

At present, the area of the g(t) function on the [4/sqrt(3), 4] interval accounts for 1.408701% of the area under the curve. Not a "trivial" nor "throwaway" amount.

Does anyone know of a way to "re-scale" or modify my convolved result g(t) so that all of the resultant area under the curve is on the [0,4/sqrt(3)] interval?

My work is attached.

restart

with(Statistics)

f := proc (t) options operator, arrow; piecewise(t <= 0, 0, t <= 2, 6/5-(3/2)*t^2+(3/4)*t^3-(3/80)*t^5, 2 <= t, 0) end proc

proc (t) options operator, arrow; piecewise(t <= 0, 0, t <= 2, 6/5-(3/2)*t^2+(3/4)*t^3-(3/80)*t^5, 2 <= t, 0) end proc

(1)

plot(f(t), t = 0 .. 2)

 

int(f(t), t = 0 .. 2)

1

(2)

simplify(int(f(tau)*f(t-tau), tau = -infinity .. infinity))

(1/1971200)*piecewise(t <= 0, 0, t <= 2, t^11-220*t^9+1320*t^8+7920*t^7-103488*t^6+147840*t^5+887040*t^4-2365440*t^3+2838528*t, t <= 4, -(t^4+28*t^3+228*t^2+536*t+80)*(t-4)^7, 4 < t, 0)

(3)

g := unapply(simplify(int(f(tau)*f(t-tau), tau = -infinity .. infinity)), t)

proc (t) options operator, arrow; (1/1971200)*piecewise(t <= 0, 0, t <= 2, t^11-220*t^9+1320*t^8+7920*t^7-103488*t^6+147840*t^5+887040*t^4-2365440*t^3+2838528*t, t <= 4, -(t^4+28*t^3+228*t^2+536*t+80)*(t-4)^7, 4 < t, 0) end proc

(4)

plot(g(t), t = 0 .. 4)

 

int(g(t), t = 0 .. 4)

1

(5)

evalf(int(g(t), t = 0 .. 4/sqrt(3)))

.98591299

(6)

evalf(int(g(t), t = 4/sqrt(3) .. 4))

0.1408701e-1

(7)
 

NULL

Download SphereConvolution.mw

Hello Friends.

I have created two piecewise functions: dx(t) and dy(t).  I then converted them to RandomVariables:  DX and DY.  When I try to perform a mathematical operation on the random variables, I get a Dirac function, which is unintended.  When I read about this issue, I learned that flawed (discontinuous) piecewise functions may be the problem.  However, my piecewise functions look ok to me.

Does anyone know why this is happening?  I do expect a lenghty result when I process the random variables, but not a Dirac function.  My code is below:

TriangleEuclidean.mw

Hello Friends.

I have used Maple to create a Polynomial Regression model.  The model is called "PRModel."  It works fine.  The independent variable is "X" and the dependent variable is "Y."  Both X and Y are of the vector variety.  The model is as follows:

PRModel:=PolynomialFit(10, X, Y, summarize = true);

I would like an estimate of Y for each value of X.  I would like the estimates of Y to be in a variable called "estY."   I have not been successful with this.  I have tried many different variations of the following, but have not been successful.  

estY := eval(PRModel, X);

Any suggestions as to how I can capture the estimates of Y? 

Thank you.

Hello Friends,

I have a function f(t) which I would like to convolve with itself.  I have no problem doing that typically, but my function contains two elliptic integrals (EllipticE and EllipticK), which clearly complicates matters.

My work in included.  As you can see, the plot on the (0,2) interval is continuous, and the area under the curve sums to unity via numerical integration.

with(Statistics)

f := proc (t) options operator, arrow; piecewise(t <= 0, 0, 0 < t and t < 2, (4/3)*t*((4+t^2)*EllipticE(sqrt(1-4/t^2))-8*EllipticK(sqrt(1-4/t^2)))/Pi^2, 2 <= t, 0) end proc

proc (t) options operator, arrow; piecewise(t <= 0, 0, 0 < t and t < 2, (4/3)*t*((4+t^2)*EllipticE(sqrt(1-4/t^2))-8*EllipticK(sqrt(1-4/t^2)))/Pi^2, 2 <= t, 0) end proc

(1)

plot(f(t), t = 0 .. 2)

 

evalf(int(f(t), t = 0 .. 2))

1.000000000+0.*I

(2)

Download CircleDerivation2.mw

Are there any sort of transformations that I can employ which will permit me to convole this function with itself?  I realize a closed-form solution is probably not likely, but something approaching closed-form would be nice.  Via simulation, I have learned that the self-convolved function will have a continuous boundary on the (0, 2*sqrt(2)) interval.

I have created three random variables:  r, theta and phi.  That went as I expected.  I then did some math with these random variable.  I calculated the following:  sin(phi), sin(theta), cos(phi) and cos(theta).

When I viewed the PDFs of these above four, I get what I expected with the exception of sin(theta).  I got an error message telling me that I provided three arguments when Maple expected only two arguments.  I am confused as to why this happened.

I wonder if I broke any rules when I named these variables, but I don't know...any suggestions? My work is attached.

with(Statistics)

theta := RandomVariable(Uniform(0, 2*Pi))

_R

(1)

phi := arccos(-1+2*RandomVariable(Uniform(0, 1)))

arccos(-1+2*_R0)

(2)

r := RandomVariable(Uniform(0, 1))^(1/3)

_R1^(1/3)

(3)

SinPhi := sin(phi)

2*(-_R0^2+_R0)^(1/2)

(4)

PDF(SinPhi, t)

piecewise(t <= 0, 0, t < (1/2)*4^(1/2), t/(-t^2+1)^(1/2), (1/2)*4^(1/2) <= t, 0)

(5)

SinTheta := sin(theta)

sin(_R)

(6)

PDF(SinTheta, t)

Error, (in Statistics:-PDF) invalid input: type expects 2 arguments, but received 3

 

CosPhi := cos(phi)

-1+2*_R0

(7)

PDF(CosPhi, t)

(1/2)*piecewise((1/2)*t < -1/2, 0, (1/2)*t < 1/2, 1, 0)

(8)

CosTheta := cos(theta)

cos(_R)

(9)

PDF(CosTheta, t)

piecewise(t <= -1, 0, t < 1, 1/(Pi*(-t^2+1)^(1/2)), 1 <= t, 0)

(10)
 

NULL

Download Basics.mw

1 2 3 4 Page 1 of 4