jakubi

1309 Reputation

12 Badges

14 years, 110 days

MaplePrimes Activity


These are answers submitted by jakubi

The algolib library, not just that recent version, includes a package LaTeX, and probably overwrites some routines called by the default latex command. So, you need with(LaTeX) to recover the functionality of the latex command,

I think that the implementation of the package DifferentialGeometry only allows for explicit coordinate name notation, but not for the standard index notation.

Note that the lifetime of these fluorescent bulbs shorts sharply if you turn them off and on frequently. You will get closer to specified lifetime the fewer times you turn them off. That is, they are actually convenient only for places where you keep it on all the day and/or night.

If no evaluation means also no automatic simplification as in

4/2;
                                  2

this is a not a simple issue. You could e.g. use the inert function form of operators at the price of non intuitive input  and non standard output, like in:

`%/`(4,2);
value(%);
                               %/(4, 2)

                                  2

Actually, much Maple 13 Standard graphics stuff, like 3D plots and their export to Postscript is worst than in Maple 12 Standard (about ps export see e.g. this recent thread). So, quite frequently, I find that Maple 13 Classic plots are better than Standard ones. For me, this fact made disappear the unique justification for using Standard.

 

 

 

You could use add and float evaluation:

add(0.^i, i = 0 .. 4);
                                  1.

For instance:

eq1:= diff(n(t),t) + s*n(t) = 0;
                           /d      \
                    eq1 := |-- n(t)| + s n(t) = 0
                           \dt     /

eq2:=dsolve({subs(s=0.1,eq1),n(0)=10});

                                             t
                     eq2 := n(t) = 10 exp(- ----)
                                             10

eval(eq2,t=5);

                         n(5) = 10 exp(-1/2)

You can look at the help page ?operators,elementwise .

The package VectorCalculus does not handle tensors, just vectors. On the other hand, an option for explicit tensor calculations is the new package DifferentialGeometry. Note however that it is designed for more general calculations than tensors in Euclidean space and cartesian coordinates. So, it may be a bit too much for these particular calculations, but for the record you could do something like this.

Your 3x3 matrix:

sigma := Matrix(3, 3, {(1, 1) = A*x^2, (1, 2) = 2*A*x*y, 
(1, 3) = 0, (2, 1) = 0, (2, 2) = A*y^2, (2, 3) = 0, (3, 1) = 0, 
(3, 2) = 0, (3, 3) = 1}): 

Define a 3D manifold M for the Euclidean space:

with(DifferentialGeometry):
with(Tools):with(Tensor):
DGsetup([x,y,z], M):

Convert the matrix sigma to a tensor object, corresponding to sigma_{ij}:

sigma1:=convert(sigma, DGtensor, [["con_bas", "con_bas"], []]);
               2                                2
  sigma1 := A x  D_x D_x + 2 A x y D_x D_y + A y  D_y D_y + 
D_z D_z

For differentiating it, the connection must be defined. And it is zero in this flat (not curved) Euclidean space:

C := Connection(0 &mult (dx &t D_x &t dx) );
                           C := 0 dx D_x dx

Then sigma_{ij,k} is calculated by applying the covariant derivative with this connection:

ds:=CovariantDerivative(sigma1, C);
  ds := 2 A x D_x D_x dx + 2 A y D_x D_y dx + 2 A x D_x D_y dy

         + 2 A y D_y D_y dy

And then, the indices j and k are contracted to form sigma_{i,j,j}:

ds2:=ContractIndices(ds, [[2, 3]]);
                     ds2 := 4 A x D_x + 2 A y D_y

Finally, this divergence displayed as an Array:

convert(ds2,DGArray);
                          [4 A x, 2 A y, 0]

One way is defining a new units system, ENG say, and adding a new unit tonF:

with(Units):AddUnit(tonF,context=ENG,conversion=1000*kgf);
AddSystem('ENG', Units:-GetSystem(SI), 'tonF');
UseSystem('ENG');
convert(2.*Unit(tonF),units,kgf);
                             2000. [kgf]

convert(2.*Unit(tonF),units,N);
                           19613.30000 [N]

You can do something like this for extracting the coefficient from a product term that has x[1]:

expr:=(q/r-sqrt(2))*x[1] + x[2] - (w*r+4)*x[3] + D(G)(x[1]) - 
D(G)(x[3]):

coeff~(indets(expr,And(`*`,linear(x[1]))),x[1]);
                                     1/2
                             {q/r - 2   }

Can you select 10 lines say at a time, and paste them onto another worksheet or an editor?

It may depend on a previous command, like:

epsilon[0]:=8.85e-12*Unit(A*s/V/m);
                                            [ 2  4]
                                        -11 [A  s ]
                  epsilon[0] := 0.885 10    [-----]
                                            [ 3   ]
                                            [m  kg]

m:=1:
epsilon[0]:=8.85e-12*Unit(A*s/V/m);

                                          -11
                    epsilon[0] := 0.885 10    [F]

Boolean expressions do not include ScientificErrorAnalysis:-Quantity objects (actually, ?boolean is not very explicit). For them, as explained above, you have to extract the magnitude by evalf:

if evalf(ScientificErrorAnalysis:-Quantity( 2.3, 0.1))<1 then 1 
else 0 end if;
                                  0

This works:

phaseportrait([diff(x(t), t) = (4-x(t)-4*y(t))*x(t), diff(y(t), t)
 = (4-4*x(t)-y(t))*y(t)], [x(t), y(t)], t = -2 .. 2, 
[[x(0) = 0, y(0) = 1]], stepsize = 0.5e-1, 
scene = [y(t), x(t)], linecolour = sin((1/2)*t*Pi), 
method = classical[foreuler], x = -20 .. 20, y = -20 .. 20);

Note that the dependent variables in the odes have to go as function calls x(t) and y(t).

1 2 3 4 5 6 7 Last Page 2 of 24