Robert Israel

6577 Reputation

21 Badges

18 years, 212 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

Your main problem is that you have {diff(X(t), t)}^2 and {X(t)}^2 in your equation.  Maple uses braces {..} for a set and brackets [..] for a list.  Use parentheses (..), not braces or brackets, for grouping.  With that changed, the dsolve command (with x changed to X) works (and finds an apparent singularity at approximately t=.87577450).

 

Yes, you have some extra characters in there: look for b[12]] and a[22(]) and a[31(]) and a[42(])

which is what?

Are you saying that hypergeom([a,b],[c],z) = (1-z)^(-a)*hypergeom([a,c-b],[c],z/(1-z))?

Because it certainly isn't true in general. For example,

hypergeom([1,2],[3],z) = -2*(ln(1-z)+z)/z^2

hypergeom([1,1],[3],z/(1-z)) = 2*(2*ln((2*z-1)/(z-1))*z^2-3*ln((2*z-1)/(z-1))*z+ln((2*z-1)/(z-1))-z^2+z)/z^2

 

 

Since you can communicate with winbugs with scripts (text files), it should be simple enough to

1) write the script using Maple

2) use the system or ssystem command to run winbugs

3) retrieve the results from text files written by winbugs.

Disclaimer: I've never used winbugs, so this is not from personal experience.

If you want y and z as functions of x, then do something like this.

xdata:= [ 1, 3, 4, 7, 9 ];
ydata:= [ 3, 1, 4, 1, 5 ];
zdata:= [ 2, 7, 1, 8, 2 ];
with(CurveFitting);
Y:= Spline(xdata, ydata, x);
Z:= Spline(xdata, zdata, x);

Now the curve is [x, Y, Z].

with(plots):
display([spacecurve([x,Y,Z],x=1..9,axes=box,colour=red,
     labels=[x,y,z]),
 pointplot3d([seq([xdata[i],ydata[i],zdata[i]],i=1..5)],
      symbol=box,colour=black)]);

 

 

The problem is that your equation does not contain b/m as a syntactic unit.  Your way of getting around it is as good as any, I think. You could also do something like

> eval(isolate(eval(eq,b=m*q),q),q=b/m);

If you're using a constrained optimization algorithm, one of the constraints should be that the variable >= 0.  If not, maybe you should be...

plots[display](%, labels=[x,y,z]);

 

Looking up the sequence of numerators in theOnline Encyclopedia of Integer Sequences <http://www.research.att.com/~njas/sequences/?q=-1%2C+1%2C+-5%2C+7%2C+-47%2C+37%2C+-319%2C+533%2C+-1879%2C+1627&sort=0&fmt=0&language=english&go=Search>

the first hit is

Numerator of the n-th alternating harmonic number, sum ((-1)^(k+1)/k, k=1..n).

From which it's not hard to figure out:

> seq(add((-1)^(k+n+1)/k,k=1..n)/(4*n+2), n=1..10);

 

 

As in your last sum, I suppose you mean n=1 .. N-1. 

> S:= sum((5/2+2310*n^5+5775*n^4+5019*n^3+(3507/2)*n^2+(409/2)*n)/
(27720*n^7+97020*n^6+132300*n^5+88200*n^4+29400*n^3+4410*n^2
+210*n), n = 1 .. N-1);

S := -1/(84*N)+Sum((-99/100*_alpha^2-33/50*_alpha^3+61/1400-17/70*_alpha)*Psi(N-_alpha),_alpha = RootOf(66*_Z^4+132*_Z^3+84*_Z^2+18*_Z+1))+1/84-Sum((-99/100*_alpha^2-33/50*_alpha^3+61/1400-17/70*_alpha)*Psi(1-_alpha),_alpha = RootOf(66*_Z^4+132*_Z^3+84*_Z^2+18*_Z+1))

The answer is given in terms of the roots of the irreducible quartic factor (66*n^4+132*n^3+84*n^2+18*n+1) of the denominator.  Well, in this case those
roots are comparatively simple:

> solve(66*n^4+132*n^3+84*n^2+18*n+1);
-1/2-1/66*(495+66*15^(1/2))^(1/2), 
-1/2+1/66*(495+66*15^(1/2))^(1/2), 
-1/2-1/66*(495-66*15^(1/2))^(1/2), 
-1/2+1/66*(495-66*15^(1/2))^(1/2)
> map(simplify, allvalues(S));

-1/(84*N)-1/46200*(495+66*15^(1/2))^(1/2)*(-124+7*15^(1/2))*Psi(N+1/2-1/66*(495+66*15^(1/2))^(1/2))+1/46200*(495-66*15^(1/2))^(1/2)*(124+7*15^(1/2))*Psi(N+1/2-1/66*(495-66*15^(1/2))^(1/2))-1/46200*(495-66*15^(1/2))^(1/2)*(124+7*15^(1/2))*Psi(N+1/2+1/66*(495-66*15^(1/2))^(1/2))+1/46200*(495+66*15^(1/2))^(1/2)*(-124+7*15^(1/2))*Psi(N+1/2+1/66*(495+66*15^(1/2))^(1/2))+1/84+1/46200*(495+66*15^(1/2))^(1/2)*(-124+7*15^(1/2))*Psi(3/2-1/66*(495+66*15^(1/2))^(1/2))-1/46200*(495-66*15^(1/2))^(1/2)*(124+7*15^(1/2))*Psi(3/2-1/66*(495-66*15^(1/2))^(1/2))+1/46200*(495-66*15^(1/2))^(1/2)*(124+7*15^(1/2))*Psi(3/2+1/66*(495-66*15^(1/2))^(1/2))-1/46200*(495+66*15^(1/2))^(1/2)*(-124+7*15^(1/2))*Psi(3/2+1/66*(495+66*15^(1/2))^(1/2))

Is that better?

 

A sum from n=1 to n-1 doesn't make sense.  I suppose you mean

> sum((5/2+25*n^2+25*n)/(300*n^4+600*n^3+360*n^2+60*n), 
      n = 1 .. N-1);

-1/(24*N)+1/24*5^(1/2)*Psi(N+1/2-1/10*5^(1/2))-1/24*5^(1/2)*Psi(N+1/2+1/10*5^(1/2))+1/24-1/24*5^(1/2)*Psi(3/2-1/10*5^(1/2))+1/24*5^(1/2)*Psi(3/2+1/10*5^(1/2))

> simplify(%);

1/24*(-1+5^(1/2)*Psi(N+1/2-1/10*5^(1/2))*N-5^(1/2)*Psi(N+1/2+1/10*5^(1/2))*N-4*N+5^(1/2)*Pi*tan(1/10*Pi*5^(1/2))*N)/N

I doubt that it can be simplified much more than that.

I assume you have a two-dimensional system, and you're talking about a change in the character of an equilibrium point.  If the characteristic polynomial of the Jacobian matrix of the system at the critical point is P(lambda) = lambda^2 + p*lambda + q,
then such a change occurs when either:
p passes through 0 with q > 0 (stable spiral <==> unstable spiral),
q passes through 0 (node, spiral or centre <==> saddle), or
p^2 - 4*q passes through 0 (spiral <==> node)

You should be able to use solve to find where this happens.

 

What you're talking about is Maple Notation input.  Text mode is something different.

Tools, Options, Display.  Set  "Input display" to "Maple Notation".  Then click "Apply Globally".

 

 

 

From my answer to your other thread,

arctan(cos(2*x)) = arctan(tan(x+Pi/2)^2) - Pi/4

Of course both are periodic...

First 79 80 81 82 83 84 85 Last Page 81 of 138