# How to enforce $\alpha < 0$ and $k \neq 1$ when solving a system of linear equations?

I want to solve a system of linear equations $$\begin{cases} \alpha C + \beta &=0 , \\ ( e^{\sqrt{-\alpha}} - k ) A + ( k - e^{-\sqrt{-\alpha}} ) B &=0, \\ ( e^{\sqrt{-\alpha}} - 1 ) A + ( 1 - e^{-\sqrt{-\alpha}} ) B + \sqrt{-\alpha} C - \sqrt{-\alpha} \beta &=0, \\ ( ke^{\sqrt{-\alpha}} - 1 ) A + ( ke^{-\sqrt{-\alpha}} -1 ) B + (k-1) C &=0,\end{cases}$$ for $$(A, B, C, \beta)$$. Here $$\alpha < 0$$ and $$k \neq 1$$ are constants. I use the command

LinearSolve[{{0, 0, \[Alpha], 1}, {E^Sqrt[-\[Alpha]] - k,
k - E^-Sqrt[-\[Alpha]], 0, 0}, {E^Sqrt[-\[Alpha]] - 1,
1 - E^-Sqrt[-\[Alpha]],
Sqrt[-\[Alpha]], -Sqrt[-\[Alpha]]}, {k*E^Sqrt[-\[Alpha]] - 1,
k*E^-Sqrt[-\[Alpha]] - 1, k - 1, 0}}, {0, 0, 0, 0}]


Could you explain how to let Mathematica know $$\alpha < 0$$ and $$k \neq 1$$? Thank you so much for your help!

• You have a homogeneous linear system and you are computing a (probably 1 dimensional) basis of the null space. It will likely be easier to compute it as a function of the parameters, and impose the conditions on them after the fact. Commented Dec 12, 2023 at 16:49
• Actually in this case the null space is just the zero vector. Commented Dec 12, 2023 at 21:09

Assumptions do not work, Assuming does:

Assuming[\[Alpha] > 0 && k != 1,
LinearSolve[{{0, 0, \[Alpha], 1}, {E^Sqrt[-\[Alpha]] - k,
k - E^-Sqrt[-\[Alpha]], 0, 0}, {E^Sqrt[-\[Alpha]] - 1,
1 - E^-Sqrt[-\[Alpha]],
Sqrt[-\[Alpha]], -Sqrt[-\[Alpha]]}, {k*E^Sqrt[-\[Alpha]] - 1,
k*E^-Sqrt[-\[Alpha]] - 1, k - 1, 0}}, {0, 0, 0, 0}]]


{0, 0, 0, 0}

• Certainly, $(0,0,0,0)$ is a solution of the system. Can Mathematica handle the case where the system has more than one solution? Commented Dec 12, 2023 at 19:02
• With the command LinearSolve[{{0}}, {0}], Mathematica only returns {0}. Commented Dec 12, 2023 at 19:02