# Tag Info

3

Making use of the observation that the OP is asking for a Vandermonde determinant: With[{n = 5}, Product[a[i]-a[j], {i, 0, n - 1}, {j, 0, i - 1}] /. a -> x] (* (-x+a)(-x+a)(-a+a)(-x+a)(-a+a)(-a+a)(-x+a)(-a+a)(-a+a)(-a+a) *) This method is exponentially faster than actually building the matrix ...

3

Does this do what you want? expr=(1/(2 (fj - fk) π)) Cos[(fj - fk) π T + (fj - fk) π (T + δt)] Sin[(fj - fk) π T - (fj - fk) π (T + δt)]; expr /. (f : Cos | Sin)[a_] :> f[Simplify[a]] This applies Simplify only to the arguments of Sin and Cos Alternatively, Simplify[expr,Trig->False] (This prevents Mathematica from applying Trig ...

3

Solve[Table[ a*x^2 + b*x + c == y /. Thread[{x, y} -> i], {i, {{2, 17}, {-2, 9}, {1, 6}}}], {a, b, c}] (* {{a -> 3, b -> 2, c -> 1}} *)

3

Adding the domain Reals allows Solve to work: Solve[maxrowsum[mat] == 1, a, Reals] {{a -> 0}, {a -> 2/7}}

3

Alternatively set it up as a univariate minimization and use calculus to solve exactly. We use the usual sqrt(x^2) to form abs(x) and insist that the product of squared differences of rownorms from 1 be zero. Since this is a product of squares we use calculus to find candidate minima. mat = {{1 - 2 a + 3 a^2, 2 a^2}, {2 a^2, 1 - 4 a + 12 a^2}}; rownorms = ...

3

You can set it up almost like a LP problem. mat = {{1 - 2 a + 3 a^2, 2 a^2}, {2 a^2, 1 - 4 a + 12 a^2}}; dims = Dimensions[mat]; vars = Array[x, dims]; c1 = Flatten[ Table[{vars[[i, j]] >= mat[[i, j]], vars[[i, j]] >= -mat[[i, j]]}, {i, dims[]}, {j, dims[]}]]; c2 = Table[Total[vars[[i]]] <= 1, {i, dims[]}]; c3 = Append[Thread[max &...

2

Are this equations linear ? If so you can try to transform the equations. If you have a nearly linear dependent basis for your equations, it may help, first to search for a new orthogonalized basis, write the equation in this basis and then solve the equations. As an example we solve a 3D problem: Given a not orthogonal badly conditioned basis: bas and a ...

1

Answer to question 2.: Newer version of AceGen includes function SMSEigensystem, which calculates eigenvalues and corresponding eigenvectors. Updating AceGen package to latest release is the solution.

1

Clear["`*"]; n = 5; v = Table[Subscript[a, i], {i, 0, n - 1}] /. Subscript[a, 0] -> x m = Outer[Power, v, Range[0, n - 1]]; m // MatrixForm m // Det // Simplify

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