In this previous post, an example is shown that demonstrates the potential problems that can arise following symbolic conversions such as from sqrt(x^2) to x^(1/2).
This provides a Maple solution to compute the bivariate normal distribution by recursions for numerical inputs. It works even for extreme cases and handles situations, where usual integration with Maple has serious problems (even after reducing to dimension 1), it seems to be reliable and fast and works in 'arbitrary' precision.
To use it call N2_as_sum(1.0, 2.0, 0.8, 200) to compute the BVN for x = 1.0, y = 2.0 and correlation rho = 0.8 with at most 200 recursion steps (it will stop earlier, if no more improvements can be seen).
Why does the following give me an imaginary number?
(-.008)^(1/3);
My calculus book says that y = (x^2 - 2)/(x - sqrt(2)) is discontinuous at 2, but Maple finds a limit of
Does the following error message mean that the only way to remove RealDomain is to exit Maple & then start a new session?
unwith(RealDomain):
A recent posting of Mario Lemelin showed that Maple's default numerical methods produced wrong results for a certain differential equation. Further investigation revealed that the problem stemmed from the fact that the fourth and fifth order Runge-Kutta methods used within the rkf45 method both produce the same (exactly correct) result at any step size, causing the adaptive error analysis to go badly wrong. This leads to the question: when do Runge-Kutta methods produce exact results for arbitrary step sizes and initial conditions?
For a partial answer, see this worksheet: View 4541_runge.mw on MapleNet or Download 4541_runge.mw
Here's a limit where Maple stalls:
Ø limit((sqrt(h^2+4*h+5)-sqrt(5))/h,x=0,right);
Ø
The best it can do is
I want to use the differentiate function for this problem.
y=(x^3+3x+11)(x-1)^5,
and the other one I need help with is
Differentiate y=sqrt3x-1/x
Having difficulty in know how to enter problems in Maple.
This is one sort of Maple inconsistency that interests me. Why should the first example behave like evalf(Int(...)) and call `evalf/int` while the second example does not?
A random sample of length n drawn from Bernoulli distribution with probability of success prob, that has a correlation c with itself shifted back lag steps, can be generated using following procedure,
SampleWithCorr:=proc(prob::And(numeric,satisfies(c->c>=0 and c<=1)), lag::posint,c::And(numeric,satisfies(c->c<=1 and c>=-1)),n::posint) local X,B,S,C,s,i; uses Statistics; X:=RandomVariable(Bernoulli(prob)); S:=Sample(X,n); if n<=lag or s=0 then S else s:=signum(c); B:=RandomVariable(Bernoulli(abs(c))); C:=Sample(B,n-lag); if s=1 then for i from lag+1 to n do if C[i-lag]=1 then S[i]:=S[i-lag] fi od; else for i from lag+1 to n do if C[i-lag]=1 then S[i]:=1-S[i-lag] fi od fi fi; S end:
2 hours 46 min ago
3 hours 18 min ago
5 hours 32 min ago
5 hours 41 min ago
5 hours 50 min ago
8 hours 52 min ago
10 hours 16 min ago
11 hours 30 min ago
11 hours 35 min ago
12 hours 16 min ago