## 135 Reputation

13 years, 186 days

## plot parametric eqs...

Maple

dear all,

how can I plot

u:=(3*x-1)*(1-x):
v:=2*x*(1-2*x):

in (u,v)-plane

where x from 0..1

## plot positive roots...

Maple

Hi all,

need to plot the positve roots and  against so(4-->5)

restart:
assume(so,real):
m1:=5:m2:=2:m3:=1.5:a1:=0.16:a2:=0.45:a3:=0.833:d1:=0.25:d2:=0.1:d3:=0.075:
ys:=a3*d3/(m3-d3):
d:=0.5:
w3:=d*(m1-d1):w2:=d*d1*so-d*m1*so-2*a1*d*d1+a1*d*m1-a2*m1^2+a2*d1*m1+m1*m2*ys:w1:=2*a1*d*d1*so-a1*d*m1*so-a1^2*d*d1+a1*a2*d1*m1+a1*m1*m2*ys:wo:=a1^2*d*d1*so:
Q:=s->w3*s^3+w2*s^2+w1*s+wo:Q(s):
sol:=evalf(solve(Q(s),s)): S:=array([],1..3): S[1]:=sol[1];S[2]:=sol[2];S[3]:=sol[3]:

## Two questions about dsolve result...

Maple

Here is ODE

restart:
with(plots):
Digits:=35:

ini1:=D(x)(0)=0,x(0)=1:
dsys:=diff(x(t),t,t)+(x(t)-2)*diff(x(t),t)+5*x(t)=0;
dsol1 :=dsolve({dsys,ini1},numeric,abserr=1e-9, relerr=1e-8,maxfun=0);
plots:-odeplot(dsol1,[[t,x(t)]],0..20,axes=boxed,color=black,linestyle=1,tickmarks=[6, 6],axes=boxed,titlefont=[SYMBOL,12]);

1-Why when i run for long time>1.5 give me error

2- how to plot phase plot of x'(t) against x(t)

## Generation of a random array...

Maple

To gererate a random initail cofigration -1 or 1

spin = (-1).^(round(rand(N)));

for i=1:1000,

neighbours = circshift(spin, [ 0 1]) + ...

circshift(spin, [ 0 -1]) + ...

circshift(spin, [ 1 0]) + ...

circshift(spin, [-1 0]);

how to do this in maple?

## Random integer from 0 to 100...

Maple

if you want a random interger between 0 and 100

what will be the command?

 5 6 7 8 9 10 11 Page 7 of 13
﻿