I am trying to find the solution of an equation for many values in a sequence this is the code that i am using but it doesnt give any result.
eq = x^2 - 5;
c = Last[Solve[eq == 1, x]]
Do[Last[Solve[eq == a, x]], {a, 10}]
For[i = 1, i < 11, i++, Solve[eq == a, x]]
I have tried to do the loop with the function For and the function Do but still i dont get anywhere, also afterwards i would like to save just the positive solution and plot it.
i did a small step , i got the solutions but now i am getting everything as an object instead as a number, i would like to have the numbers, i have tried using Table instead of print but it doesnt work
eq = x^2 - 5;
For[i = 1, i < 11, i++, f = Last[Solve[eq == i, x]];
h = Print[{i,N[x /. f]}]]
So now i would like to save those values (h) in a table and then plot them