jakubi

1384 Reputation

12 Badges

19 years, 238 days

MaplePrimes Activity


These are answers submitted by jakubi

Under Debian Etch, in Maple 12.02 (or 12.01) Standard GUI, I do not observe that copying this 'plot3d' statement from an input line of the worksheet and pasting it into the next one takes any long time. Sun Java installed in this system is 5.0, but it should be irrelevant as Maple installs and uses its own Java 6.

Let us see whether the following is fine for your goal:

ex:=-kn*(-kc^3*kp^3*dc+kc^3*dc^2*dp*dn-dc^3*kc^2*dp^2-
kc^3*kp^3*dp-kc^4*dp*dc^2-dc^4*kc*dp^2-dc^4*kc^2*dp-dc^3*kc*dp^3-
dc^4*dn*dp^2+dc^4*dn^2*dp-dc^3*dn*dp^3+2*dc^3*dn^2*dp^2-
kc^3*dc^2*dp^2-dn^3*dc^3*dp+dn^2*dc^2*dp^3-dn^3*dc^2*dp^2+
dn^2*dc^3*dp*kc+dn^2*dc^2*dp^2*kc-kc^3*dp^3*dc-kc^4*dp^2*dc-
kc^4*kp^3+kc^3*kp^3*dn+kc^3*dp^2*dc*dn) / 
(dc^2*dp*(-kc+dn)*(kc+dn)*(dn-dp-kc)*(dc+dp)*(dc-dn+kc)):

f,s:=selectremove(type,numer(ex),{name,integer}):
simplify([op(simplify(s,size))]*~(f/denom(ex))):
convert(%,`+`);

-dc^2*kn/(-kc+dn)/(dc+dp)/(dc-dn+kc)+(-kc*dp-dn*dp+dn^2)*dc*kn/(dc+dp)/(dc-dn+kc)/(-kc^2+dn^2)+(dn^2*dp-kc^3)*kn/(dc+dp)/(dc-dn+kc)/(-kc^2+dn^2)-(-dp^3-kc*dp^2+dn*dp^2-kp^3)*kc^3*kn/dc/dp/(dn-dp-kc)/(dc+dp)/(dc-dn+kc)/(-kc^2+dn^2)-kp^3*kc^3*kn/dc^2/dp/(dc+dp)/(dc-dn+kc)/(-kc^2+dn^2)

If you want to plot points in 3d space, I think that you should use plots:-pointplot3d.

The PLOT3D - ISOSURFACE data structure arises from plots:-implicitplot3d, when plotting equations like f(x,y,z)=0, and generates, basically, a two-dimensional surface.

There has been complains on this issue, see e.g.

I declare defeat: rolling back to Maple 9.5

and links therein.

I would no look at the GUIs for a programming environment. Better use an external editor, as discused  in the previous thread. In this regard, I have found medit quite convenient to use and simple to configure as a Maple IDE.

 

 

What is relevant for me are facts.

It seems that some input is missing.

I do not think that much help could be possible without posting the complete input or worksheet.

Something like this:

Eq := [seq(A[i]=M[i -1]*a/(6*E*Ipile) + 2*M[i]*a / (3*E*Ipile) 
+ M[i + 1]*a / (6*E*Ipile) - (Delta[i - 1] - Delta[i]) / a 
- Delta[i] - Delta[i + 1] / a  , i=3..5)];
assign(%);

So, if this is the system:

sys:=[ diff(S(t),t) - lambda + d*S(t) + beta*S(t)*
int( Y(a,t), a=0..infinity) + v*p*S(t) - omega*int(V(a,t),
a=0..infinity)-f*int(R(a,t),a=0..infinity) = 0,
diff(E(a,t),t) + diff(E(a,t),a) + d*E(a,t) + alpha*E(a,t)=0,
diff(Y(a,t),t) + diff(Y(a,t),a) + d*Y(a,t) + gam*Y(a,t) + mu*Y(a,t)=0,
diff(R(a,t),t) + diff(R(a,t),a) + f*R(a,t) + d*R(a,t)=0,
diff(V(a,t),t) + diff(V(a,t),a) + omega*V(a,t) + d*V(a,t)=0];

let us see the solutions of the pdes:

s1:=pdsolve(sys[2..-1]);

  s1 := {E(a, t) = _F1(-a + t) exp(-(d + alpha) a),

        R(a, t) = _F2(-a + t) exp(-(f + d) a),

        V(a, t) = _F3(-a + t) exp(-(omega + d) a),

        Y(a, t) = _F4(-a + t) exp(-(d + gam + mu) a)}

The initial and boundary conditions are:

IC:= [E(a,0)=0, Y(a,0)=0.05, R(a,0)=0, V(a,0)=0, S(0)=0.95];
BC:=[E(0,t)=beta*S(t)*Y(0,t), Y(0,t)=alpha*E(0,t), 
R(0,t)=gam*Y(0,t), V(0,t)=v*p*S(t)];

Without imposing yet the first equation for S(t), i.e. keeping it free, let us insert the solutions of the pdes into these conditions:

ICe:=eval(IC,eval(s1,t=0));

  ICe := [_F1(-a) exp(-(d + alpha) a) = 0,

        _F4(-a) exp(-(d + gam + mu) a) = 0.05,

        _F2(-a) exp(-(f + d) a) = 0, _F3(-a) exp(-(omega + d) a) = 0,

        S(0) = 0.95]

BCe:=eval(BC,eval(s1,a=0));

  BCe := [_F1(t) = beta S(t) _F4(t), _F4(t) = alpha _F1(t),

        _F2(t) = gam _F4(t), _F3(t) = v p S(t)]

and solve for the functions _F and S:

sBC:=[solve(BCe,indets(BCe,anyfunc(identical(t))))];

  sBC := [{S(t) = S(t), _F1(t) = 0, _F2(t) = 0, _F3(t) = v p S(t),

                                 1
        _F4(t) = 0}, {S(t) = ----------, _F1(t) = _F1(t),
                             beta alpha

                                               v p
        _F2(t) = gam alpha _F1(t), _F3(t) = ----------,
                                            beta alpha

        _F4(t) = alpha _F1(t)}]

Now, inserting each of these solutions into the initial conditions I get:

ICe1:=eval(ICe,eval(sBC[1],t=-a));
  ICe1 := [0 = 0, 0 = 0.05, 0 = 0, v p S(-a) exp(-(omega + d) a) = 0,

        S(0) = 0.95]

ICe2:=eval(ICe,eval(sBC[2],t=-a));

  ICe2 := [_F1(-a) exp(-(d + alpha) a) = 0,

        alpha _F1(-a) exp(-(d + gam + mu) a) = 0.05,

        gam alpha _F1(-a) exp(-(f + d) a) = 0,

        v p exp(-(omega + d) a)
        ----------------------- = 0, S(0) = 0.95]
              beta alpha

The first solution leads to the contradiction 0 = 0.05, and the second one requires v*p=0, also contradictory if v=0.8 and p=0.1, etc.

You can do something like:

with(plots):
ngon := n -> [seq([cos(2*Pi*i/n), sin(2*Pi*i/n)], i = 1..n)]:
A := Array(1..6,1..1):
for n from 3 to 8 do
A[n-2,1]:=polygonplot(ngon(n), color=blue) ;
end do:
display(A,scaling=constrained,axes=none);

As said, there are several posibilities. Which ones are better may depend on some details. 

So, without further information, I give just a single example, that assumes a specific setup: Maple 13 under Windows. The output of the procedure, ie the values of Q1 and Q2, are conveniently read in text form (e.g. a number). So, their values are written to an auxiliary text file located at the home directory, and a text editor in the path, Notepad say,  is launched to open this file:

currentdir(kernelopts(homedir)):
f:=proc() global Q1,Q2;Q1:=1;Q2:=3; end proc:
f():
save Q1,Q2,"outfile.mpl";
system[launch](cat("notepad ", currentdir(),"/outfile.mpl")):

There are several options (another tab in Standard GUI, open a text editor/viewer, a maplet, etc). It may depend on what are these results.

You can use something like this:

l1 := [[ n, sin(n)] $n=1..10]:
l2 := [[ n, cos(n)] $n=1..10]:
plot([l1,l2], x=1..10, style=line);

It is an issue of order, the derivative needs to be evaluated symbolically before the parameter t is evaluated numerically. Note that it is not the case here :

with(RootFinding):
NextZero(t->diff(sin(t), t), 0);

                                    FAIL
tracelast;
 
 InitialSearch called with arguments: f, data, 0.1e-8, false
 #(RootFinding:-NextZero:-InitialSearch,16): error 
"unable to compute value at initial point"
Error, (in f) invalid input: diff received 0, which is not 
valid for its 2nd argument
...

I.e. the same error message as here:

f:=t->diff(sin(t),t);
      d        
t -> --- sin(t)
      dt       

f(0);
Error, (in f) invalid input: diff received 0, which is not 
valid for its 2nd argument

You can do it instead using 'unapply':

NextZero(unapply(diff(sin(t),t),t), 0);
                                 1.570796327

You may try labelling .

First 8 9 10 11 12 13 14 Last Page 10 of 24