New answers tagged

0

For example like this: Lx = 2; Ly = 2; Lz = 2; k[x_, y_, z_] = Piecewise[{{1, 0.5 <= y <= 1.5 && 0.5 <= x <= 1.5 && 0 <= z <= 2}}, 0.25]; w[x_, y_, z_] = Piecewise[{{1, 0.5 <= y <= 1.5 && 0.5 <= x <= 1.5 && 0 <= z <= 2}}, 0.000339266]; \[Mu] = 1; NDEigenvalues[{ D[k[x, y, ...


4

This was supposed to be a comment to Henrik's addendum in his answer on how to get the eigensystem of a symmetric-definite pencil, but it got too long. To keep things concrete, here is the pencil I will use in the following demo: {m1, m2} = {HilbertMatrix[2], Array[Min, {2, 2}]}; Of course, Eigensystem[] can handle this pencil directly: Eigensystem[{m1, ...


7

I just made a small edit to your code. You weren't properly testing your eigensystem. See the MMA help on it. FundForm[r_, u_, v_] := Module[{ru, rv, E1, F1, G1, ruu, ruv, rvv, n0, n, L2, M2, N2, FF1, FF2, WW, K, H, evals, evecs}, ru = D[r, u]; rv = D[r, v]; E1 = Simplify[Dot[ru, ru]]; F1 = Simplify[Dot[ru, rv]]; G1 = Simplify[Dot[rv, rv]]; ...


8

Classical problem. You want to compute the eigensystem of the second fundamental form with respect to the first fundamental form. Thus you have to solve a generalized eigensystem. This can be done with Eigensystem[{FF2, FF1}], but it does not work very well with symbolic functions. Also, one has to normalize the eigenvectors for some reason I don't get. But ...


8

Fixed in 12.1 ClearAll[x, n]; NN = 374; R = 0.05; t1 = -1 + Cos[x] - I Sin[x] + I R; t1p = -1 + Cos[x] + I Sin[x] + I R; mat[x_] = DiagonalMatrix[Table[If[EvenQ[n], t1, -1], {n, 0, 2 NN - 1 - 1}], 1] + DiagonalMatrix[ Table[If[EvenQ[n], t1p, -1], {n, 0, 2 NN - 1 - 1}], -1] + DiagonalMatrix[Table[If[EvenQ[n], -1, 0], {n, 0, 2 NN - 1 - 3}], ...


2

Something like this should work: {λ, U} = Eigensystem[A]; pos = Position[λ, _?Positive]; Extract[λ, pos] Extract[U, pos] where A is just any numerical matrix (e.g. A = M /.k-> <<your parameter here>>).


Top 50 recent answers are included