# Tag Info

## Hot answers tagged physics

5

There are two parts to your question. The first part is how do you form the mass and stiffness matrices for a dynamic system. The second part is how do you solve the eigenvalue problem to get the natural frequencies and mode shapes. I will answer the the second part first and then the first part. Solving eigenvalue problems for dynamic system. I am going to ...

4

A more "Mathematica" way of generating your base states is via Tuples states = Tuples[Range/@{2,3,2}] To then get the independent pairings of states, you can use pairs=Flatten[Table[states[[{i,j}]],{i,1,Length@states},{j,i,Length@states}],1]; {{{1, 1, 1}, {1, 1, 1}}, {{1, 1, 1}, {1, 1, 2}}, {{1, 1, 1}, {1, 2, 1}}, {{1, 1, 1}, {1, 2, 2}}, {{1, ...

3

Based on the suggestion of Henrik Schumacher, and the answers of Hausdorff and Daniel Huber, you can do it as follows: Format[braket[{{a_, b_, c_}, {d_, e_, f_}}]] := Row[{"\[LeftAngleBracket]", StringRiffle[{ToString[a], ToString[b], ToString[c]}], "|", "|", StringRiffle[{ToString[d], ToString[e], ToString[f]}], &...

1

Often a problem is easier, seen from another perspective. You have different quantum states, specified by 3 integers. We may e.g. represent these as lists: states=Flatten[Array[{#1, #2, #3} &, {3, 3, 3}], 2] Now, you want bra-kets that are symmetrical, that is <a||b> and <b||a> are identified. Instetad of thinking in "bra-kets", ...

1

FWIW, my take on the big problem. I'm not particularly interested in parsing strings, so I can delete if this is unhelpful. (*" * Calculator "*) CellPrint@ ExpressionCell[ Manipulate[ Column[{ (* displays some data for inspection *) Dynamic@{var, formula}, Dynamic@Quiet[ (* TBD:check input/output of Solve *) ...

1

Here's a quick and dirty version that I think should come close to what you're asking for. The handling of the variables and their localisation is not very sophisticated, but it should work for simple formulas: Clear[a, b, c] eq = c^2 == a^2 + b^2; vars = ReduceFreeVariables[eq] sol = ""; Manipulate[ Evaluate@Column@{HoldForm[Evaluate@eq], eq, ...

1

Clear["Global*"] \$Version (* "12.3.1 for Mac OS X x86 (64-bit) (June 19, 2021)" *) Enter equation to be used (equation must use Equal (==) rather than Set (=)) eqn = (Voltage == Current*Resistance); vars = Variables[Level[eqn, {-1}]]; Manipulate[ Column[{ StringForm["Equation: ", eqn], "", Reduce[eqn, ...

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