Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Hello everyone.  Let n be a positive number; I seek how to write the matrix Z\in M_{2^n,n} that is defined as follows:

for every i,j, Z_{ij}\in \{-1,1\}.

When I consider the 2^n rows of Z, I want to find ALL the possible sequences of length n with the entries +-1. A toy example, when n=2, is Z=\begin{pmatrix}1&1\\1&-1\\-1&1\\-1&-1\end{pmatrix}.

Thanks in advance;

I wonder if there is any way to sort expressions like

 to

 

also:

how to sort  to


I am trying to setup a Dual Quaternion Multiplication Table. I found the table on Wikki. I  need some help here.

Have set

x1  =1   x2 = i   x3  =j   x4   =k   x5 =e   x6 = ei   x7 = ej   x8 =ek

 

restart

                                                                                                              #    x1   x2    x3   x4    x5   x6    x7   x8

with(DifferentialGeometry):

NULL

 

StructureEquations := [[x1, x1] = x1, [x1, x2] = x2, [x1, x3] = x3, [x1, x4] = x4, [x1, x5] = x1*x5, [x1, x6] = x6, [x1, x7] = x7, [x1, x8] = x8, [x2, x1] = x2, [x2, x2] = -1, [x2, x3] = x4, [x2, x4] = -x3, [x2, x5] = x6, [x2, x6] = -x5, [x2, x7] = x8, [x2, x8] = -x7, [x3, x1] = x3, [x3, x2] = -x4, [x3, x3] = -1, [x3, x4] = x2, [x3, x5] = x7, [x3, x6] = -x8, [x3, x7] = -x5, [x3, x8] = x6, [x4, x1] = x4, [x4, x2] = x3, [x4, x3] = -x2, [x4, x4] = -1, [x4, x5] = x8, [x4, x6] = x7, [x4, x7] = -x6, [x4, x8] = -x5, [x5, x1] = x5, [x5, x2] = x6, [x5, x3] = x7, [x5, x4] = x8, [x5, x5] = 0, [x6, x1] = x6, [x6, x2] = -x5, [x6, x3] = x8, [x6, x4] = -x7, [x7, x1] = x7, [x7, x2] = -x8, [x7, x3] = -x5, [x7, x4] = x6, [x8, x1] = x8, [x8, x2] = x7, [x8, x3] = -x6, [x8, x4] = -x5]

[[x1, x1] = x1, [x1, x2] = x2, [x1, x3] = x3, [x1, x4] = x4, [x1, x5] = x1*x5, [x1, x6] = x6, [x1, x7] = x7, [x1, x8] = x8, [x2, x1] = x2, [x2, x2] = -1, [x2, x3] = x4, [x2, x4] = -x3, [x2, x5] = x6, [x2, x6] = -x5, [x2, x7] = x8, [x2, x8] = -x7, [x3, x1] = x3, [x3, x2] = -x4, [x3, x3] = -1, [x3, x4] = x2, [x3, x5] = x7, [x3, x6] = -x8, [x3, x7] = -x5, [x3, x8] = x6, [x4, x1] = x4, [x4, x2] = x3, [x4, x3] = -x2, [x4, x4] = -1, [x4, x5] = x8, [x4, x6] = x7, [x4, x7] = -x6, [x4, x8] = -x5, [x5, x1] = x5, [x5, x2] = x6, [x5, x3] = x7, [x5, x4] = x8, [x5, x5] = 0, [x6, x1] = x6, [x6, x2] = -x5, [x6, x3] = x8, [x6, x4] = -x7, [x7, x1] = x7, [x7, x2] = -x8, [x7, x3] = -x5, [x7, x4] = x6, [x8, x1] = x8, [x8, x2] = x7, [x8, x3] = -x6, [x8, x4] = -x5]

(1)

``

(2)

DQ := LieAlgebraData(StructureEquations, [x1, x2, x3, x4, x5, x6, x7, x8])

_DG([["LieAlgebra", "L1", [8, table( [ ] )]], [[[1, 2, 2], 1], [[1, 3, 3], 1], [[1, 4, 4], 1], [[1, 5, 1], x5], [[1, 5, 5], x1], [[1, 6, 6], 1], [[1, 7, 7], 1], [[1, 8, 8], 1], [[1, 2, 2], -1], [[2, 3, 4], 1], [[2, 4, 3], -1], [[2, 5, 6], 1], [[2, 6, 5], -1], [[2, 7, 8], 1], [[2, 8, 7], -1], [[1, 3, 3], -1], [[2, 3, 4], 1], [[3, 4, 2], 1], [[3, 5, 7], 1], [[3, 6, 8], -1], [[3, 7, 5], -1], [[3, 8, 6], 1], [[1, 4, 4], -1], [[2, 4, 3], -1], [[3, 4, 2], 1], [[4, 5, 8], 1], [[4, 6, 7], 1], [[4, 7, 6], -1], [[4, 8, 5], -1], [[1, 5, 5], -1], [[2, 5, 6], -1], [[3, 5, 7], -1], [[4, 5, 8], -1], [[1, 6, 6], -1], [[2, 6, 5], 1], [[3, 6, 8], -1], [[4, 6, 7], 1], [[1, 7, 7], -1], [[2, 7, 8], 1], [[3, 7, 5], 1], [[4, 7, 6], -1], [[1, 8, 8], -1], [[2, 8, 7], -1], [[3, 8, 6], 1], [[4, 8, 5], 1]]])

(3)

DGsetup(DQ)

`Lie algebra: L1`

(4)

MultiplicationTable(DQ, "AlgebraTable")

Error, (in DifferentialGeometry:-LieAlgebras:-MultiplicationTable) invalid input: DifferentialGeometry:-ChangeFrame expects its 1st argument, frame_name, to be of type {name, string}, but received _DG([["LieAlgebra", "L1", [8, table( [ ] )]], [[[1, 2, 2], 1], [[1, 3, 3], 1], [[1, 4, 4], 1], [[1, 5, 1], x5], [[1, 5, 5], x1], [[1, 6, 6], 1], [[1, 7, 7], 1], [[1, 8, 8], 1], [[1, 2, 2], -1], [[2, 3, 4], 1], [[2, 4, 3], -1], [[2, 5, 6], 1], [[2, 6, 5], -1], [[2, 7, 8], 1], [[2, 8, 7], -1], [[1, 3, 3], -1], [[2, 3, 4], 1], [[3, 4, 2], 1], [[3, 5, 7], 1], [[3, 6, 8], -1], [[3, 7, 5], -1], [[3, 8, 6], 1], [[1, 4, 4], -1], [[2, 4, 3], -1], [[3, 4, 2]...

 

NULL

 

Download Dual_Quaternion_Defining_Algebra.mw

 

I tried to solve a system of two equations using fsolve in Maple, however Maple didn't return any result (yet there is the result of that equation's system):

Maple is returning the command if there are no roots but that isn't my case.

How can I obtain the result in Maple?

worksheet.mw

solution of system of differential equations

is {a(t) = 1, b(t) = exp(t), c(t) = 0}

1 = exp(t), since t = 0, is characteristic equation = (y-0)?
0 = exp(t), how to find this characteristic equation when division is zero?
exp(t) = exp(t), is characteristic equation = (y-t)?

after solved, 

diff(a(t), t) = diff(a(t), t)

diff(b(t), t) = 0

diff(c(t), t) = -b(t)/c(t)

 

there is a diff(a(t), t) term 

how to plot this kind of system?

can diff(a(t), t) be ignore so that only consider two equations, diff(b(t),t) and diff(c(t),t) ?

if so, i use below to plot, it can not show the arrow clearing , i can only see arrow near origin, but not far point

with(plots):
fieldplot([0, y/x], x = -2 .. 2, y = -2 .. 2);
fieldplot([0, y/x], x = -2 .. 2, y = -2 .. 2, arrows = SLIM,grid = [1, 1]);
fieldplot([0, y/x], x = -10 .. 10, y = -10 .. 10);

 about how to calculate vector field of system of 3 differential equations which in terms of a(t), b(t), c(t) , diff(a(t),t), diff(b(t),t), diff(c(t),t)?

is the only method is the express diff(a(t),t), diff(b(t),t), diff(c(t),t) in terms of a(t), b(t), c(t) ?

for example 

<diff(a(t),t), diff(b(t),t), diff(c(t),t)>

if result is

diff(a(t),t) = a(t)*b(t)

diff(b(t),t) =b(t)*c(t)

diff(c(t),t) =c(t)*a(t)

<a(t)*b(t), b(t)*c(t), c(t)*a(t)>

then

is it the vector field <a*b, b*c, c*a> ?

 

sys := {diff(b(t),t) = 0,diff(c(t),t) = -b(t)/a(t)};
DEplot(sys, [b(t),c(t)], t=0..5, x=-5..5, y=-5..5);
Error, (in DEtools/DEplot) Option keyword (x) was not in the allowed set of options, consisting of: iterations, arrows, dirgrid, obsrange, scene, colour, linecolour, stepsize, a dependent variable range, a list of initial conditions or one of the allowed plot options: {animate, axes, color, colour, coords, font, scaling, style, symbol, title, view, animatecurves, animatefield, axesfont, dirfield, labelfont, linestyle, numframes, resolution, thickness, tickmarks, titlefont, xtickmarks, ytickmarks}, or one of the allowed dsolve/numeric options: {abserr, control, ctrl, initial, itask, maxder, maxfun, maxkop, maxord, maxpts, maxstep, method, mi..

diff(a(t), t) = diff(a(t), t);
diff(b(t),t) = 0;
diff(c(t),t) = -b(t)/a(t);

[diff(rhs(sol[1][2]), a(t)),diff(rhs(sol[1][2]), b(t)),diff(rhs(sol[1][2]), c(t))];
Error, (in VectorCalculus:-diff) invalid input: diff received a(t), which is not valid for its 2nd argument

 

 

 

eq2 := b(t)*(diff(c(t), t))*(diff(a(t), t))+b(t)*(diff(a(t), t))+a(t)*(diff(c(t), t));
eq3 := a(t)*(diff(b(t), t))(diff(a(t), t))+b(t)*(diff(b(t), t))*(diff(c(t), t));
eq4 := b(t)*(diff(c(t), t))(diff(b(t), t))+a(t)*(diff(b(t), t))+b(t)*(diff(c(t), t));
dfieldplot([eq2,eq3,eq4],[t,x],t=0..5,a=-5..5,b=-5..5,c=-5..5);
dfieldplot([eq2,eq3],[t,x],t=0..5,a=-5..5,b=-5..5);
eq2a := eval(subs(c(t)=exp(t), eq2));
eq3a := eval(subs(c(t)=exp(t), eq3));
eq4a := eval(subs(c(t)=exp(t), eq4));
dfieldplot([eq2a,eq3a], [a(t), b(t)], t = -5 .. 5, a = -5 .. 5, b = -5 .. 5, arrows = SLIM, color = black, dirfield = [10, 10]);

I'm trying to export a worksheet to Latex. I'm able to exprot it. But the long equations are not broken into multiple lines. I have used Mathlinebreaking width 5.0 inch in the export option. But it still does not work. I can see the linebreaking command (\\) in the tex file. But when I compile my latex code the pdf does not have any linebreak. The equation just overflows. Any help will be appreciated. 

I am trying to do some algebra with the derivatives of some variables within a program. As a result i need to relable them before i feed them into solve.

To relable them i create vectors and use subs. one of these vectors behaves differently within a proc to how it behaves outside it. This is weird.

TimefullBehavesFunny := proc (nPars, nVars)
local nDiffs, timefull, timeless;
nDiffs := nPars;
timefull := [seq(dx[j, i] = diff(x[i](t), `$`(t, j)), i = 1 .. nVars)];
timefull := [seq(op(timefull), j = 0 .. nDiffs), seq(x[i] = x[i](t), i = 1 .. nVars)];
timeless := `~`[`=`](`~`[rhs](timefull), `~`[lhs](timefull));
timefull, timeless, nDiffs;
end proc

When i run the above for (3,3) i get a differet result to when i run the following
nVars:=3;
nDiffs := 3;
timefull := [seq(dx[j, i] = diff(x[i](t), `$`(t, j)), i = 1 .. nVars)];
timefull := [seq(op(timefull), j = 0 .. nDiffs), seq(x[i] = x[i](t), i = 1 .. nVars)];
timeless := `~`[`=`](`~`[rhs](timefull), `~`[lhs](timefull));

and similarly for other numbers.

any ideasas to why?

Hey,

I think I found a bug concerning the useage of assume and alias:

restart:

alias(a=a(t),b=b(t));

a, b

(1)

assume(a(t),real);

getassumptions(a(t));

{((a(t))(t))::real}

(2)

assume(b(t),real);

getassumptions(a(t));

{((b(t))(t))::real}

(3)

getassumptions(b(t));

{((b(t))(t))::real}

(4)

 

 

 

Commenting out the alias command produces correct results. I am on linux with build 922027.

alias_bug.mw

f := a - b;
g := op(f);
seq(abs(g[i]), i=1..nops([g]));

i discover abs still in expression

how to result in [a,b] when input is [a,-b]

 from determinant's polynomial?                                                                                                       

First 49 50 51 52 53 54 55 Last Page 51 of 88