So, I'm trying to solve a class of equations, and get all the solutions in a list. The general form looks like this:
c == a*Sqrt[1-n] PlusMinus[b * Sqrt[n]]
Please forgive if that's wrong, I'm really new to Mathematica.
The twist to this? c, a, and b all need to iterate separately through the integer values from -3 to 3. I need to get all solutions of n, positive and negative, for all combinations of these integer values. How would I write code to do that iteration for me, and get all the possible values of n in a list as output?
EDIT: I tried this in response to that first answer after reading Solve pretty carefully. I know this is horrendously wrong- what, though?
ClearAll[a, b, c, domainstate, domainstatea, domainstateb, \
domainstatec]
domainstatea = a \[Element] Integers && a >= -3 && a <= 3
domainstateb = b \[Element] Integers && b >= -3 && b <= 3
domainstatec = c \[Element] Integers && c >= -3 && c <= 3
domainstate = domainstatea && domainstateb && domainstatec
Solve[a*Sqrt[1 - n] \[PlusMinus] b * Sqrt[n] == c && domainstate, n]
PlusMinus
is only for representation, not for calculations. Your problem looks trivial, but without a correct equation there is no sense doing anything. Anyway, checkMenu/Help/WolframDocumentation/Solve
. $\endgroup$c == a*Sqrt[1-n]+b * Sqrt[n]
andc == a*Sqrt[1-n]-b * Sqrt[n]
. Is it right? Or you mean a multiplication like `a*Sqrt[1-n] *b * Sqrt[n] `` ?? $\endgroup$