# Getting error message from NSolve

I'm trying to solve for coefficients $k1$, $k2$, $k3$, $k4$ in the following equation:

$\det\left(\,\begin{bmatrix}k1+k2 & -k2 & 0\\-k2 & k2+k3 & -k3 \\ 0 & -k3 & k3+k4\end{bmatrix} - \begin{bmatrix}\omega^2 & 0 & 0\\0 & \omega^2 & 0 \\ 0 & 0 & \omega^2\end{bmatrix}\,\right)=0$

where $\omega>0$ is such that $\frac{\omega_1}{2\pi}=0.0028$, $\frac{\omega_2}{2\pi}=0.0036$, $\frac{\omega_3}{2\pi}=0.0042$.

I've tried to solve this by substituting $\omega^2$ with Replace, yielding

w ==
Root[-a b c - a b d - a c d - b c d +
(3909 a b + 7818 a c + 11727 b c + 3909 a d + 7818 b d +
3909 c d) #1 + (-15280281 a - 30560562 b - 30560562 c -
15280281 d) #1^2 + 59730618429 #1^3 &, 1] ||
w ==
Root[-a b c - a b d - a c d - b c d +
(3909 a b + 7818 a c + 11727 b c + 3909 a d + 7818 b d +
3909 c d) #1 + (-15280281 a - 30560562 b - 30560562 c -
15280281 d) #1^2 + 59730618429 #1^3 &, 2] ||
w ==
Root[-a b c - a b d - a c d - b c d +
(3909 a b + 7818 a c + 11727 b c + 3909 a d + 7818 b d +
3909 c d) #1 + (-15280281 a - 30560562 b - 30560562 c -
15280281 d) #1^2 + 59730618429 #1^3 &, 3]


upon which I use NSolve:

equations =
{Root[
-a b c - a b d - a c d - b c d +
(3909 a b + 7818 a c + 11727 b c + 3909 a d + 7818 b d + 3909 c d) #1 +
(-15280281 a - 30560562 b - 30560562 c - 15280281 d) #1^2 +
59730618429 #1^3 &,
1] == (0.0028*2*Pi)^2,
Root[
-a b c - a b d - a c d - b c d +
(3909 a b + 7818 a c + 11727 b c + 3909 a d + 7818 b d + 3909 c d) #1 +
(-15280281 a - 30560562 b - 30560562 c - 15280281 d) #1^2 +
59730618429 #1^3 &,
2] == (0.0036*2*Pi)^2,
Root[
-a b c - a b d - a c d - b c d +
(3909 a b + 7818 a c + 11727 b c + 3909 a d + 7818 b d + 3909 c d) #1 +
(-15280281 a - 30560562 b - 30560562 c - 15280281 d) #1^2 +
59730618429 #1^3 &,
3] == (0.0042*2*Pi)^2,
a > 0,
b > 0,
c > 0,
d > 0};

coeffs = NSolve[equations, {a, b, c, d}, Reals]


But I obtain the error message "Infinite solution set has dimension at least 1" and obtain {} as the output.

Does this mean that there are no solutions to the problem, or that I am solving this problem incorrectly? Is there a better way to solve this problem?

• You're solving essentially 2 equations for 4 unknowns. Use Reduce, but know that the solution space is likely (though not necessarily) a 2 dimensional object. The equation does have solutions, it has an infinite number of them. See FindInstance if you only need one possible solution chosen more or less at random. Commented Jun 27, 2018 at 20:57
• I've tried using FindInstance, but the calculation seems to take a long time (I haven't actually tried letting it run all the way, I stopped it after around 5 minutes). Commented Jun 27, 2018 at 21:06

For the first $\omega$, the following use of FindInstance finds a {k1, k2, k3, k4} tuple that satisfies the equation more or less instantly.

FindInstance[
Det[{{k1 + k2, -k2, 0}, {-k2, k2 + k3, -k3}, {0, -k3,
k3 + k4}} - {{w^2, 0, 0}, {0, w^2, 0}, {0, 0, w^2}}] == 0 /.
w -> (2 π 0.0028),
{k1, k2, k3, k4}]


The solution space for this value of $\omega$ can be found with Reduce, but it doesn't easily simplify to anything obviously and inherently meaningful:

Reduce[Det[{{k1 + k2, -k2, 0}, {-k2, k2 + k3, -k3}, {0, -k3,
k3 + k4}} - {{w^2, 0, 0}, {0, w^2, 0}, {0, 0, w^2}}] == 0 /.
w -> (2 π 0.0028)]

• This only results in finding one such {k1, k2, k3, k4} tuple which such that one root results in $\omega_1$ though. Simplifying the equation results in: k1 k2 k3 + k1 k2 k4 + k1 k3 k4 + k2 k3 k4 + (-3909 k1 k2 - 7818 k1 k3 - 11727 k2 k3 - 3909 k1 k4 - 7818 k2 k4 - 3909 k3 k4) w + (15280281 k1 + 30560562 k2 + 30560562 k3 + 15280281 k4) w^2 - 59730618429 w^3 == 0, which is a polynomial, and I want to find values for the coefficients {k1, k2, k3, k4} which results in those roots Commented Jun 27, 2018 at 21:56
• FindInstance cannot find an infinite solution set, but you can have it find as many solutions as you wish by say, FindInstance[..., {k1, k2, k3, k4}, 10], to find 10 solutions. You could also do FindInstance[..., {k1, k2, k3, k4}, Reals, 10] to find 10 strictly real solutions. Commented Jun 27, 2018 at 21:58