60 Reputation

4 Badges

6 years, 133 days

MaplePrimes Activity

These are questions asked by mapleq2013

In this code I'm trying to separately normalize two independent probability densities and then combine them to get the joint probability density that's normalized and then use it to calculate the probability that the two variables are equal. fD(x) is a Gaussian divided by x^2 and fA(x) is a Gaussian. The first problem occurs when I'm checking the normalization of the joint probability density by doing the double integral over all space for fD(x)*fA(y)dxdy, I get weird vanishing number when the parameter "hartree" takes a certain value, namely 27.211. If I change hartree to 27 or 1 or 2 it all worked, but 27.211 is not good. Also later when I do a single integral over all space for fD(x)*fA(x)dx to get the probability that these two are equal, I find the result is dependent on hartree. This hartree thing is a unit conversion in my physical problem and in principle should not interfere with either the normalization or the probability result at all. I suspect this is a coding bug but I can't find what it is. I'd appreciate any input.

Thank you very much!


Edit: I found out that the problem with the double integral normalization may have something to do with the discretization for numerical evaluation of the integral, since if I change the lower bound to 1/hartree and upper to 10/hartree then it's fine, however if I use lower bound at 1/hartree and upper at 5/hartree it doesn't work, although the distribution has no value between 5/hartree and 10/hartree. However after this is fixed I still have the problem with the single integral over all space for fD(x)*fA(x)dx changing with hartree. Well as a probability I would expect the integral to be bound between 0 and 1, but since it almost linearly depends on hartree, at hartree around 27 I would get the integral value to be about 25, which doesn't make sense. In fact, I now suspect it is not Maple, but my calculation of the probability of the two random variables taking the same value is wrong, I'd appreciate it very much if someone can confirm this.

Hi fellow Maple users,

I'm trying to solve an eigenvalue problem of Ax=wx, where A is a 6 by 6 Hermitian matrix with two parameters x and y. I want to solve it for w and then plot3d it with x and y as unknowns. The way I have been doing is first find the characteristic equation Determinant(A-wI)=0 and then solve it for w, and then plot3d the solutions within a range for x and y. My problem is sometimes solve(Determinant(A-wI)=0,w) would give me the 6 solutions expressed in x and y, but sometimes when the numbers in A are changed it will only give me a Rootof solution with which I cannot plot. I'm wondering if there is a better way to do this. I'm actually not very interested in the symbolic solution of w expressed in x and y, just the plot, so if there is a numerical alternative it's good too.

Thank you in advance!

I'm running a long loop with a lot of variables. I have noticed that Maple does not seem to clear its memory after each loop iteration, which results in very large memory used after all the iterations. I can't use restart because I need a few variables to be remembered throughout the loop for analysis afterwards. So the question is how to clear the memory for selective variables and procedures at the end of each iteration.

I'm using Maple 12 to solve a system of differential equations numerically. I first define my system as "sys1" and then use the command:

sol1 := dsolve(sys1, numeric, output = listprocedure, range = 0 .. 2000)

I'm using output=listprocedure because that's what the Maple's Help says if I want to use individual solutions. So my differential equation system has 8 solutions, and I label them a1(t) through a8(t). Now after solving the system I want to be able to evaluate, e.g., a1(t) at t=100.

I then follow the Maple's Help by defining:


But then if I do:


I don't get the expected numerical value. Instead I get a1(100) as the result.

What I managed to do however was to plot f1(t) with the following command:


So it seems that I did it partially right. However according to the Maple's Help I should be able to extract numerical values with f1(100). 

I'd appreciate any suggestions!

I'm solving a system of ordinary differential equations numerically, I used the dsolve(system,numeric) to do it. I have also plotted the solutions. Now I want to know where does this solution cross zero and use this value for later computations, is there a way to do it? 

This question is, as I think, equivalent to how to find the roots for a curve expressed in numerical arrays.

Thank you!

1 2 Page 1 of 2