8

The nice thing about Mathematica is that one can (almost) always go back to the definitions if in doubt. For evaluating non-principal roots, one can just go back to the Jordan decomposition of a matrix and change square root signs accordingly. To wit, {sm, jm} = JordanDecomposition[{{17, -16}, {-8, 9}}]; Table[sm.DiagonalMatrix[d].Sqrt[jm].Inverse[sm], {d, ...


7

example: m = {{1, 0, 0, 1}, {0, -1, 1, 0}, {0, 1, -1, 0}, {1, 0, 0, 1}}; DiagonalizableMatrixQ@m True {d, pt} = Eigensystem@m; p = Transpose@pt; p . DiagonalMatrix[d] . Inverse[p] {{1, 0, 0, 1}, {0, -1, 1, 0}, {0, 1, -1, 0}, {1, 0, 0, 1}} {s, j} = JordanDecomposition@m;(* returns {P^-1,D} *) s . j . Inverse@s (* P^(-1).D.P *) {{1, 0, 0, 1}, {0, -1, 1, 0}, {...


4

With the exact solutions u[{nx_, ny_}, {x_, y_}] = Sin[nx π x] Sin[ny π y]; and $\{n_x,n_y\}\in\mathbb{N}^2$, the eigenvalues are λ[nx_, ny_] = (nx^2 + ny^2) π^2; Test: Assuming[Element[nx | ny, PositiveIntegers], {u[{nx, ny}, {x, 0}], u[{nx, ny}, {x, 1}], u[{nx, ny}, {0, y}], u[{nx, ny}, {1, y}]} // FullSimplify] (* {0, 0, 0, 0} *) -D[u[{nx, ...


4

{0, 0, 0} is the solution Clear["Global`*"] p11 = 1; omega = .2; C11 = 2.030; beta = 1; C55 = 0.600; alpa = 1; C13 = 0.750; e31 = 0.200; e15 = 3.700; C33 = 2.450; e33 = 1.300; ep11 = 38.90; ep33 = 25.70; eqns = {(p11*omega^2 - C11*beta^2 - C55*alpa^2)*A1 - (C13 + C55)*alpa*beta* B1 - (e31 + e15)*alpa*beta*C1 == 0, (p11*omega^2 - C55*...


4

For eigenvalues of a unit square region you could e.g. define: Clear[n]; n[t_] := n[t] = (c = 0; While[DEigenvalues[{-Laplacian[u[x, y], {x, y}], DirichletCondition[u[x, y] == 0, True]}, u[x, y], {x, y} \[Element] Rectangle[], c + 1][[-1]] < t, c++]; c) The first 5 eigenvalues are: DEigenvalues[{-Laplacian[u[x, y], {x, y}], ...


4

I don't have answer for using Sigma notation but in case of finding pattern, converting existing matrix cells to some graphic maybe become helpful. For example instead of using this form: Use these: , For power of 2, results are: , Here is the interface of the code to play: Code: Manipulate[ Module[{vars, shapes}, vars = Table[ Subscript[w, i, ...


3

Starting from the analytic solution and speeding it up a bit, here is a function to calculate the multiplicities of the eigenvalues $\lambda/\pi^2=k\in \{1\ldots n\}$, S[n_Integer?Positive] := BinCounts[Plus @@@ Tuples[Range[Sqrt[n]]^2, 2], {1, n + 1}] and the cumulative number of states with eigenvalues $\lambda/\pi^2\le k\in \{1\ldots n\}$, T[n_Integer?...


3

In MMA the rule for the dot product is: the last index of the left hand side is contracted with the first index of the right hand side. Therefore, no need for row and column vectors. Let's define some matrix a and a matrix b with orthogonal eigenvectors: SeedRandom[1]; a = RandomReal[{-1, 1}, {3, 3}]; b = RandomReal[{-1, 1}, {3, 3}]; b = b + Transpose[b]; ...


2

Here is one of those places where it really helps to know some linear algebra. Say you have a diagonalizable matrix (for example, any symmetric matrix) m. Then you can break it into Inverse[v].d.v where v are the eigenvectors and d is a diagonal matrix of the eigenvalues. Then powers of m have a nice form. For example: m1 = RandomInteger[{-10, 10}, {2, 2}]; ...


2

tst = Block[{x = rlist[[1]], y = rlist[[1]]}, Module[{sol = (Last[#1] &) /@ First[NDSolve[{eqs, ic}, var, {t, -tmax, tmax}]], Bsol}, Bsol = Table[Map[#1[t1] &, sol, {1}], {t1, ttlist}]; Map[(#1 . G0 . ConjugateTranspose[#1] &)[ttmesh Partition[#1 . Bsol, 2]] &, smat, {2}]]]; // AbsoluteTiming (* {0.0249631, Null} *...


2

Tally can certainly count the occurrances of eigenvalues in your list called vals. For instance Tally[vals] tells me that there are $2$ instances of $10 \pi^{2}$ and $2$ instance of $5 \pi^{2}$. Looking at Tally in the documentation I see that the word "multiplicities" means the number of instances of each distinct element in a list. I notice ...


2

First we assume that $i\not=m$ and $j\not=n$ u[m_, n_][x_, y_] := Sin[m*Pi*x] Sin[n*Pi*y]; result1 =Integrate[u[m, n][x, y]*u[i, j][x, y], {x, 0, 1}, {y, 0, 1}] $$ \frac{(i \cos (\pi i) \sin (\pi m)-m \sin (\pi i) \cos (\pi m)) (j \cos (\pi j) \sin (\pi n)-n \sin (\pi j) \cos (\pi n))}{\pi ^2 \left(i^2-m^2\right) \left(j^2-n^2\right)}$$ Refine[...


2

You have to define a scalarproduct, here an integral, which vanishs if n!=m int = Integrate[Sin[ n Pi x] Sin[m Pi y], {x, 0, 1}, {y, 0, 1} ] Table[int, {n, 1, 5}, {m, 1, 5}] (*{{Indeterminate, 0, 0, 0, 0}, {0, Indeterminate, 0, 0, 0}, {0, 0,Indeterminate, 0, 0}, {0, 0, 0, Indeterminate, 0}, {0, 0, 0, 0,Indeterminate}} *) Case n==m has to be considered ...


1

Your equations can be written in terms of the matrix $M$: M = {{-beta^2 C11 - alpa^2 C55 + omega^2 p11, -alpa beta (C13 + C55), -alpa beta (e15 + e31)}, {-alpa beta (C13 + C55), -alpa^2 C33 - beta^2 C55 + omega^2 p11, -beta^2 e15 - alpa^2 e33}, {-alpa beta (e15 + e31), -beta^2 e15 - alpa^2 e33, beta^2 ep11 + alpa^2 ep33}}; Thread[M . {A1, B1, C1} =...


1

Any positive real matrix has positive eigenvalues, so you can construct the matrix by: n = 2; diag = Array[e, n]; b = RandomReal[{-1, 1}, {n, n}]; sym = FullSimplify[Transpose[b] . DiagonalMatrix[diag] . b] So sym is the general form of the matrix. To be positive definite, you then need ensure only that the n elements of diag (in the n=2 case, this is e[1] ...


1

Using random rho and sigma matrices, here's a proof of concept: SeedRandom[1]; rho = #\[Transpose] . # &@RandomReal[{-1, 1}, {8, 8}]; sX = {sA, sB, sC} = #\[Transpose] . # & /@ RandomReal[{-1, 1}, {3, 2, 2}]; sXY = {sBC, sAC, sAB} = #\[Transpose] . # & /@ RandomReal[{-1, 1}, {3, 4, 4}]; G = MapThread[KroneckerProduct, {sX, sXY}]; Min[...


1

As a way of confirming the OP's results, we can also use the $\mathbf L\mathbf D\mathbf L^\top$ decomposition (as implemented here) to check for negative-definiteness. In particular, we would need to look at the conditions such that all the entries of the diagonal matrix $\mathbf D$ are negative. Thus: Reduce[Last[LDLT[{{-1, -b, a, 0}, {-b, -1, 0, 0}, {a, 0, ...


Only top voted, non community-wiki answers of a minimum length are eligible