leafgreen

40 Reputation

5 Badges

8 years, 197 days

MaplePrimes Activity


These are questions asked by leafgreen

I'm defining forces. The only thing I changed is x to y for one particular piece of an equation. I copied and pasted it so I don't see why it's not working.

opparam_fail.mw

I'm trying to normalize a function, which is pretty standard in QM. But I don't understand why I'm getting such a crazy answer. I know it is possible to normalize this function (because I was asked to do so), it's just not working.

harmoscforbidden_fail.mw

I created a loop to calculate, using random numbers, the probability of a die roll. I got 0, which I originally attributed to the fact that the probability might have just been that low, but in comparing it to a binomial distribution, it shouldn't be 0.

I tried editing the loop to do a coin toss instead, where the probability is 0.5, and that worked fine. So I don't think my loop structure is necessarily wrong. But perhaps I wrongly input getting a 0.167 probability somehow.

Any advice would be appreciated!

dierollfail.mw

I'm trying to calculate the trajectory of a 3-particle system. I defined my parameters. Wrote a do loop. Got the number of iterations I expected. But when I look at the tables of position for each particle after I run the loop, the trajectory only changes for the first iteration, then it stays the same. In other words, it shows that the particle moved slightly after the first increment of time, but thereafter it doesn't move.


 

for i to N do x[11] := x[1]+tau*vx[1]+(1/2)*tau^2*F[x1]; y[11] := y[1]+tau*vy[1]+(1/2)*tau^2*F[y1]; x[21] := x[2]+tau*vx[2]+(1/2)*tau^2*F[x2]; y[21] := y[2]+tau*vy[2]+(1/2)*tau^2*F[y2]; x[31] := x[3]+tau*vx[3]+(1/2)*tau^2*F[x3]; y[31] := y[3]+tau*vy[3]+(1/2)*tau^2*F[y3]; R[1] := [op(R[1]), [x[11], y[11]]]; R[2] := [op(R[2]), [x[21], y[21]]]; R[3] := [op(R[3]), [x[31], y[31]]]; V[1] := [op(V[1]), [vx[11], vy[11]]]; V[2] := [op(V[2]), [vx[21], vy[21]]]; V[3] := [op(V[3]), [vx[31], vy[31]]] end do:

101

(5)

 

I'm trying to calculate forces between particles. I defined all my variables and the equation for force, but when I plug it all in, it gives me 0 when I know for a fact it's not 0. I should be getting something like f12=-0.4, f13=-0.24, and f23=-0.5.

 

failforce.mw

 

Basically I defined variables like x1,y1, m1 , etc. and made my force equation fij with all variables having appropriate i and j subscripts.

1 2 3 4 5 Page 2 of 5