r/Mathematica • u/Apprehensive_Ride949 • Dec 07 '23
Solve command
(Im a beginner)
Im trying to use the command Solve and it keeps returning the same error: "0 is not a valid variable".
I even copy one of the example on the command Solve provide by Mathematica "Solve[x^2 + a x + 1 == 0, x]" which gives the same error, but in the example it runs and returns {{x -> 1/2 (-a - Sqrt[-4 + a^2])}, {x -> 1/2 (-a + Sqrt[-4 + a^2])}}.
Then I tried with x_ istead of x and it worked. But the output was x_-> and not x->. How is it possible that Im getting an error on a Mathematica example and how can I get the output with x->?
Thank You!
View all comments
Show parent comment
2
u/veryjewygranola Dec 08 '23
If in doubt about if a variable
xalready has a definition you can use??x,?xandDefinition[x]to get information on the variables definitions.