Maple 2015 Questions and Posts

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

I have two linear algebra texts [1, 2]  with examples of the process of constructing the transition matrix Q that brings a matrix A to its Jordan form J. In each, the authors make what seems to be arbitrary selections of basis vectors via processes that do not seem algorithmic. So recently, while looking at some other calculations in linear algebra, I decided to revisit these calculations in as orderly a way as possible.

 

First, I needed a matrix A with a prescribed Jordan form. Actually, I started with a Jordan form, and then constructed A via a similarity transform on J. To avoid introducing fractions, I sought transition matrices P with determinant 1.

 

Let's begin with J, obtained with Maple's JordanBlockMatrix command.

 

• 

Tools_Load Package: Linear Algebra

Loading LinearAlgebra

J := JordanBlockMatrix([[2, 3], [2, 2], [2, 1]])

Matrix([[2, 1, 0, 0, 0, 0], [0, 2, 1, 0, 0, 0], [0, 0, 2, 0, 0, 0], [0, 0, 0, 2, 1, 0], [0, 0, 0, 0, 2, 0], [0, 0, 0, 0, 0, 2]])

 

``

The eigenvalue lambda = 2 has algebraic multiplicity 6. There are sub-blocks of size 3×3, 2×2, and 1×1. Consequently, there will be three eigenvectors, supporting chains of generalized eigenvectors having total lengths 3, 2, and 1. Before delving further into structural theory, we next find a transition matrix P with which to fabricate A = P*J*(1/P).

 

The following code generates random 6×6 matrices of determinant 1, and with integer entries in the interval [-2, 2]. For each, the matrix A = P*J*(1/P) is computed. From these candidates, one A is then chosen.

 

L := NULL:

 

 

After several such trials, the matrix A was chosen as

 

A := Matrix(6, 6, {(1, 1) = -8, (1, 2) = -8, (1, 3) = 4, (1, 4) = -8, (1, 5) = -1, (1, 6) = 5, (2, 1) = -1, (2, 2) = 3, (2, 3) = 1, (2, 4) = -2, (2, 5) = 2, (2, 6) = -1, (3, 1) = -13, (3, 2) = -9, (3, 3) = 8, (3, 4) = -11, (3, 5) = 1, (3, 6) = 5, (4, 1) = 3, (4, 2) = 3, (4, 3) = -1, (4, 4) = 4, (4, 5) = 1, (4, 6) = -2, (5, 1) = 7, (5, 2) = 5, (5, 3) = -3, (5, 4) = 6, (5, 5) = 2, (5, 6) = -3, (6, 1) = -6, (6, 2) = -2, (6, 3) = 3, (6, 4) = -7, (6, 5) = 2, (6, 6) = 3})

 

 

for which the characteristic and minimal polynomials are

 

factor(CharacteristicPolynomial(A, lambda))

(lambda-2)^6

factor(MinimalPolynomial(A, lambda))

(lambda-2)^3

 

 

So, if we had started with just A, we'd now know that the algebraic multiplicity of its one eigenvalue lambda = 2 is 6, and there is at least one 3×3 sub-block in the Jordan form. We would not know if the other sub-blocks were all 1×1, or a 1×1 and a 2×2, or another 3×3. Here is where some additional theory must be invoked.

``

The null spaces M[k] of the matrices (A-2*I)^k are nested: `⊂`(`⊂`(M[1], M[2]), M[3]) .. (), as depicted in Figure 1, where the vectors a[k], k = 1, () .. (), 6, are basis vectors.

 

Figure 1   The nesting of the null spaces M[k] 

 

 

The vectors a[1], a[2], a[3] are eigenvectors, and form a basis for the eigenspace M[1]. The vectors a[k], k = 1, () .. (), 5, form a basis for the subspace M[2], and the vectors a[k], k = 1, () .. (), 6, for a basis for the space M[3], but the vectors a[4], a[5], a[6] are not yet the generalized eigenvectors. The vector a[6] must be replaced with a vector b[6] that lies in M[3] but is not in M[2]. Once such a vector is found, then a[4] can be replaced with the generalized eigenvector `≡`(b[4], (A-2*I)^2)*b[6], and a[1] can be replaced with `≡`(b[1], A-2*I)*b[4]. The vectors b[1], b[4], b[6] are then said to form a chain, with b[1] being the eigenvector, and b[4] and b[6] being the generalized eigenvectors.

 

If we could carry out these steps, we'd be in the state depicted in Figure 2.

 

Figure 2   The null spaces M[k] with the longest chain determined

 

 

Next, basis vector a[5] is to be replaced with b[5], a vector in M[2] but not in M[1], and linearly independent of b[4]. If such a b[5] is found, then a[2] is replaced with the generalized eigenvector `≡`(b[2], A-2*I)*b[5]. The vectors b[2] and b[5] would form a second chain, with b[2] as the eigenvector, and b[5] as the generalized eigenvector.

``

Define the matrix C = A-2*I by the Maple calculation

 

C := A-2

Matrix([[-10, -8, 4, -8, -1, 5], [-1, 1, 1, -2, 2, -1], [-13, -9, 6, -11, 1, 5], [3, 3, -1, 2, 1, -2], [7, 5, -3, 6, 0, -3], [-6, -2, 3, -7, 2, 1]])

 

``

and note

 

N := convert(NullSpace(C), list)

[Vector(6, {(1) = 1/2, (2) = 1/2, (3) = 1, (4) = 0, (5) = 0, (6) = 1}), Vector(6, {(1) = -1/2, (2) = -1/2, (3) = -2, (4) = 0, (5) = 1, (6) = 0}), Vector(6, {(1) = -2, (2) = 1, (3) = -1, (4) = 1, (5) = 0, (6) = 0})]

NN := convert(LinearAlgebra:-NullSpace(C^2), list)

[Vector(6, {(1) = 2/5, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 1}), Vector(6, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 1, (6) = 0}), Vector(6, {(1) = -1, (2) = 0, (3) = 0, (4) = 1, (5) = 0, (6) = 0}), Vector(6, {(1) = 2/5, (2) = 0, (3) = 1, (4) = 0, (5) = 0, (6) = 0}), Vector(6, {(1) = -3/5, (2) = 1, (3) = 0, (4) = 0, (5) = 0, (6) = 0})]

 

``

The dimension of M[1] is 3, and of M[2], 5. However, the basis vectors Maple has chosen for M[2] do not include the exact basis vectors chosen for M[1].

 

We now come to the crucial step, finding b[6], a vector in M[3] that is not in M[2] (and consequently, not in M[1] either). The examples in [1, 2] are simple enough that the authors can "guess" at the vector to be taken as b[6]. What we will do is take an arbitrary vector in M[3] and project it onto the 5-dimensional subspace M[2], and take the orthogonal complement as b[6].

``

A general vector in M[3] is

 

Z := `<,>`(u || (1 .. 6))

Vector[column]([[u1], [u2], [u3], [u4], [u5], [u6]])

 

``

A matrix that projects onto M[2] is

 

P := ProjectionMatrix(NN)

Matrix([[42/67, -15/67, 10/67, -25/67, 0, 10/67], [-15/67, 58/67, 6/67, -15/67, 0, 6/67], [10/67, 6/67, 63/67, 10/67, 0, -4/67], [-25/67, -15/67, 10/67, 42/67, 0, 10/67], [0, 0, 0, 0, 1, 0], [10/67, 6/67, -4/67, 10/67, 0, 63/67]])

 

``

The orthogonal complement of the projection of Z onto M[2] is then -P*Z+Z. This vector can be simplified by choosing the parameters in Z appropriately. The result is taken as b[6].

 

b[6] := 67*(eval(Z-Typesetting:-delayDotProduct(P, Z), Equate(Z, UnitVector(1, 6))))*(1/5)

Vector[column]([[5], [3], [-2], [5], [0], [-2]])

NULL

 

``

The other two members of this chain are then

 

b[4] := Typesetting:-delayDotProduct(C, b[6])

Vector[column]([[-132], [-12], [-169], [40], [92], [-79]])

b[1] := Typesetting:-delayDotProduct(C, b[4])

Vector[column]([[-67], [134], [67], [67], [0], [134]])

 

``

A general vector in M[2] is a linear combination of the five vectors that span the null space of C^2, namely, the vectors in the list NN. We obtain this vector as

 

ZZ := add(u || k*NN[k], k = 1 .. 5)

Vector[column]([[(2/5)*u1-u3+(2/5)*u4-(3/5)*u5], [u5], [u4], [u3], [u2], [u1]])

 

``

A vector in M[2] that is not in M[1] is the orthogonal complement of the projection of ZZ onto the space spanned by the eigenvectors spanning M[1] and the vector b[4]. This projection matrix is

 

PP := LinearAlgebra:-ProjectionMatrix(convert(`union`(LinearAlgebra:-NullSpace(C), {b[4]}), list))

Matrix([[69/112, -33/112, 19/112, -17/56, 0, 19/112], [-33/112, 45/112, 25/112, 13/56, 0, 25/112], [19/112, 25/112, 101/112, 1/56, 0, -11/112], [-17/56, 13/56, 1/56, 5/28, 0, 1/56], [0, 0, 0, 0, 1, 0], [19/112, 25/112, -11/112, 1/56, 0, 101/112]])

 

``

The orthogonal complement of ZZ, taken as b[5], is then

 

b[5] := 560*(eval(ZZ-Typesetting:-delayDotProduct(PP, ZZ), Equate(`<,>`(u || (1 .. 5)), LinearAlgebra:-UnitVector(4, 5))))

Vector[column]([[-9], [-59], [17], [58], [0], [17]])

 

``

Replace the vector a[2] with b[2], obtained as

 

b[2] := Typesetting:-delayDotProduct(C, b[5])

Vector[column]([[251], [-166], [197], [-139], [-112], [-166]])

 

 

The columns of the transition matrix Q can be taken as the vectors b[1], b[4], b[6], b[2], b[5], and the eigenvector a[3]. Hence, Q is the matrix

 

Q := `<|>`(b[1], b[4], b[6], b[2], b[5], N[3])

Matrix([[-67, -132, 5, 251, -9, -2], [134, -12, 3, -166, -59, 1], [67, -169, -2, 197, 17, -1], [67, 40, 5, -139, 58, 1], [0, 92, 0, -112, 0, 0], [134, -79, -2, -166, 17, 0]])

 

``

Proof that this matrix Q indeed sends A to its Jordan form consists in the calculation

 

1/Q.A.Q = Matrix([[2, 1, 0, 0, 0, 0], [0, 2, 1, 0, 0, 0], [0, 0, 2, 0, 0, 0], [0, 0, 0, 2, 1, 0], [0, 0, 0, 0, 2, 0], [0, 0, 0, 0, 0, 2]])``

 

NULL

The bases for M[k], k = 1, 2, 3, are not unique. The columns of the matrix Q provide one set of basis vectors, but the columns of the transition matrix generated by Maple, shown below, provide another.

 

JordanForm(A, output = 'Q')

Matrix([[-5, -43/5, -9/5, 7/5, -14/5, -3/5], [10, -4/5, -6/25, 1/5, -6/25, -3/25], [5, -52/5, -78/25, 13/5, -78/25, -39/25], [5, 13/5, 38/25, -2/5, 38/25, 4/25], [0, 6, 42/25, -1, 42/25, 21/25], [10, -29/5, -11/25, 1/5, -11/25, 7/25]])

 

``

I've therefore added to my to-do list the investigation into Maple's algorithm for determining an appropriate set of basis vectors that will support the Jordan form of a matrix.

 

References

 

NULL

[1] Linear Algebra and Matrix Theory, Evar Nering, John Wiley and Sons, Inc., 1963

[2] Matrix Methods: An Introduction, Richard Bronson, Academic Press, 1969

 

NULL

``

Download JordanForm_blog.mw

Need help for manipulating tensor with the physics package.

I ask some questions about this.  But each time, I am refer to the help pages.  If I ask again some help, it is because I can't not start with the information on the help file.  It is written for people that already know General Relativity (GR).

 

So this time, I have created a document (attach to this post) where I ask specific queations on manipulations.  My goal is to ccrreate a document that I will put on the Applications Center.  I promess that those who will help me on this will be cited in the document.  This way, I hope to create an introduction on how to use tensors for beginner like me.

 

Then, with this help, I am sure I will be able to better understand the help page of the packages.  I am doing this as someone who is starting to learn GR and have to be able to better understand the manipulations of tensor and getting the grasp of teh meaning of all those tensor.  For exemple, the concept of parallel transport on a curve surface.

 

Thank you in advance for all the troubling I give you with this demand.

 

Regards,Parallel_Transport.mw

 

 

 

 

 

 

 

--------------------------------------
Mario Lemelin
Maple 2015 Ubuntu 14.04 - 64 bits
Maple 2015 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

Hi,

I'm relatively new to using Maple.

I'm looking for information on how the "factor" function works. I printed its definition, and it refers to "factor/factor" and I can't find any more information on this. I'd like to know so that I could have more trust that it works correctly. Specifically, I'd like to be able to believe that if it does not factor a cubic, then the cubic is irreducible.

I'm specifically looking for rational roots of cubic polynomials. The "solve" function seems to work, and gives me the roots in terms of square roots, cubic roots and rationals. I have no idea why I should believe that "type(x,rational)" would work when the description of "x" is quite complicated.

Does anyone know anything about how "factor" works, or how "type" works when testing whether an expression evaluates to a rational number? Any information would be much appreciated.

 

Thanks,
Matt

I ran into a problem with the physics package that I subsequently solved. But I am wondering whether this would be a candidate for an SCR and/or be considered a bug.

The calculation I am trying is actually (so far) very simple.

I define a Hamiltonian H:

H := sqrt(p_^2*c^2+m^2*c^4); # note the square of vector p_

p_:=p1*_i+p2*_j+p3*_k;

H;

So far so good. Now I want to take the differentials of H against the components of p:

diff(H,p1) assuming c::real;

Hmm... I am not sure why the p2 and p3 still show up; but then, the product between the unit vectors should be 0 for different ones and one for equal unit vectors so maybe this is ok.

But H behaves weird: I can simplify it:

but if I try to do anything with it, it barfs:

dH+0;

Error, (in Physics:-Vectors:-+) invalid operation * between vectors _i and _j

As it turns out the issue is the square of the vector p_. Maple (or rather, Physics) does not recognize that it needs to expand p_^2 as p_.p_ and seems to treat is like p_*p_.

I would like Edgardo---& others more experienced with the Physics package than I am---to look at this. I do not understand the Physics package well enough to judge whether overloading the exponentiation operator to make this work is the right thing.

The example works once I replace p_^2 by p_.p_. But the ^2 notation is fairly standard usage so it feels slightly awkward.

Thanks,

Mac Dude.

Derivation_of_H.mw

hello 

 

if you have a function lets say: 2x+1/4-x3

 

 

Now if you have to plot the graf, how should you know what the x and y shoud be? I mean you do like: plot(f(x),x=..

 

what should it be? i find it hard :(

Hello, forgive me if I used bad english, I am not a native speaker.

 

Anyhow: I have to decide the set of coordinates looking at the grafs intersections.  (I hope you understand that)

 

This is my function: f(x)=1/4*x3-x2-x+4

 

When you plot the function you see that the intersections is (-2,0) (2,0) and (4,0)

 

BUT I have to use a command to find these three intersections, plzz help me!

 

THANK YOU indeed.

 

 

[point of] intersection

Are there any commands in maple that will help me find a suitable function that approximates the numerical solution of:



  restart;
  PDE := diff(v(x, t), t) = diff(v(x, t), x, x);
  JACOBIINTEGRAL := int(JacobiTheta3(0, exp(-Pi^2*s))*v(1, t-s)^4, s = 0 .. t);
  IBC:= D[1](v)(0,t)=0,
        D[1](v)(1,t)=-0.000065*v(1, t)^4,
        v(x,0)=1;
#
# For x=0..1, t=0..1, the solution varies only very slowly
# so I have increased the timestep/spacestep, just to speed
# up results generation for diagnostic purposes
#
  pds := pdsolve( PDE, [IBC], numeric, time = t, range = 0 .. 1,
                  spacestep = 0.1e-1, timestep = 0.1e-1,
                  errorest=true
                )

diff(v(x, t), t) = diff(diff(v(x, t), x), x)

 

int(JacobiTheta3(0, exp(-Pi^2*s))*v(1, t-s)^4, s = 0 .. t)

 

(D[1](v))(0, t) = 0, (D[1](v))(1, t) = -0.65e-4*v(1, t)^4, v(x, 0) = 1

 

_m649569600

(1)

#
# Plot the solution over the ranges x=0..1,
# time=0..1. Not a lot happens!
#
  pds:-plot(x=1, t=0..1);

 

#
# Plot the estimated error over the ranges x=0..1,
# time=0..1
#
  pds:-plot( err(v(x,t)), x=1,t=0..1);

 

#
# Get some numerical solution values
#
  pVal:=pds:-value(v(x,t), output=procedurelist):
  for k from 0 by 0.1 to 1 do
      pVal(1, k)[2], pVal(1, k)[3];
  od;

 

t = 0., v(x, t) = Float(undefined)

 

t = .1, v(x, t) = .999977377613528229

 

t = .2, v(x, t) = .999967577518313666

 

t = .3, v(x, t) = .999959874331053822

 

t = .4, v(x, t) = .999952927885405241

 

t = .5, v(x, t) = .999946262964885979

 

t = .6, v(x, t) = .999939702966688881

 

t = .7, v(x, t) = .999933182128311282

 

t = .8, v(x, t) = .999926675964661227

 

t = .9, v(x, t) = .999920175361791563

 

t = 1.0, v(x, t) = .999913676928735229

(2)

 

 

 

Download PDEprob2_(2).mw

 

I am refering to the first graph, is there a way in maple to find an explicit suitable approximating function?

I.e, I want the function to have the same first graph obviously, it seems like addition of exponent and a line function, I tried plotting exp(-t)-0.3*t, it doesn't look like it approximates it very well. Any suggestion on how to implement this task in maple?

Thanks.

 

So I installed copied DirectSearch.hdp and DirectSearch.mla into my Maple2015\lib directory and the program works (all the functions are there) but I cant get help menu by querying ?DirectSearch.

I'm running win7 64bit btw

so under

?hdb

i put this into maple:

HelpTools:-Database:-ConvertAll();

but i get error....

"Converting C:\\Program Files\\Maple 2015\\lib\\DirectSearch.hdb to C:\\Program Files\\Maple 2015\\lib\\DirectSearch.help"
Warning, .hdb help databases are deprecated, 'C:\Program Files\Maple 2015\lib\DirectSearch.hdb' will not be used, see ?HelpTools,Migrate help page for more information
Error, (in HelpTools:-HelpCallUI) cannot create help database: 'unable to open database file'

any clue?

ps I asked the same question for M18 but I managed to get the help to work in that instance.

http://www.mapleprimes.com/questions/204423-Help-Build-For-GlobalSearch-Package

(i also copied DirectSearch.hdp and DirectSearch.mla to Maple2015\bin.X86_64_WINDOWS directory but no joy, there is no .help file created in either bin or lib directories)

I'm doing some easy calculations in Maple 2015, but Maples units are acting weird:

I would say that h and h/1 should be the same, but 1/h should give me 1/400 m^2*K*W^-1

If I try to input 1/U__0 it gives me 1/400 m^2*K*W^-1, just like expected

Am I doing anything wrong? Can it be because of my settings?

I'm running Maple 2015 on a Macbook pro running OSX 10.11

Are there any examples of network solutions such as mine systems in Maple.
I wrote in the Maple system of partial differential equations describing the process of filtration combustion.
I'm a novice. I do not quite understand how to solve it.
Online a lot of "simple" examples. I need something very similar to my case.

Model03.mw

Social Golfer Problem

So we have 8 golfers : 2 golfers per group and 4 groups.Over several golfing days, how can they be arranged so no golfer plays with the same player twice.

turns out they can play for 7 days.

So my attempt in maple....golfing.mw

For 3 players per group and 4 groups this is the arrangement over 4 days:

(these was done in wolfram demonstrations project but the code appears to be obfuscated)

Hello all

I am trying to write  a tutorial about systems of linear equations, and I want to demonstrate the idea that when you have a system of 3 euqtions with 3 unknowns, the solution is the intersection point between these planes. Plotting 3 planes in Maple 2015 is fairly easy (you plot one and just drag the others in), but I don't know how to plot the intersection point. Can you help please ?

 

My equations are:

x-2y+z=0

2y-8z=8

-4x+5y+9z=-9

The intersection point is (29,16,3)

 

Thank you !

Hello;

I had Maple 2015.1 running. I did Tools->check for update. It said that there is an update available! then I did ok, go and update. Maple downloaded about 60 MB of stuff, asked me to close Maple to finish the update. I close Maple, and it finished the update with no problem.

When I open Maple, I still see it saying 2015.1, so what was the update for?  

It will be nice if Maple tells the users what the update is going to be for. Like saying something to the effect that version XX.XX is available or something. It just said update available.

How can one find what was updated, and why did the version number not get changed? Is there a log file or some command one can use that shows the updates made to current version one is using?

Help->About still says 2015.1, is it possible Maple update just forgot to change the version number? What is the current and latest version number of Maple?  

When I do check for update now, it says no update is available. So I must be running the latest version. But this what what I had before I updated?

    kernelopts(version)
    Maple 2015.1, X86 64 WINDOWS, Jun 3 2015, Build ID 1049007

I am on windows 7, 64 bits.

 

 

Hi all,

I have been trying to plot Riemann Zeta Function on certain range, but it takes a lot of time(several minutes ,maybe hours).These are the basic things.

How to speed up ploting Zeta?

The same problem with Optimization.

Zeta-Problems.mw

Mathematica don't have this such problems.

Mathematica ploting Zeta with 0.125 second and optimizing 3.42 second.Maple few hours maybe......

 

 

 

There is a desire to explore the process of filtration combustion. To do this, you must solve a system of differential equations in partial derivatives.
I write down all the equations.
Boundary conditions in Maple 2015.0 interpreted incorrectly.
I need to write like that:

 

 

given that:


It turns out so:

 

 

ie somewhere lost derivatives

,....

 

 

As in Maple record boundary conditions correct?

Thanking you in advance.

First 60 61 62 63 64 65 66 Last Page 62 of 71