Message Boards Message Boards

Defining a variable and a Root object in Mathematica

Posted 8 years ago

Hello! I have two really basic questions

Question1

I'm using the online Mathematica version (as you can see on the picture). Now, I don't know why, but Mathematica doest not define variables properly? As it is clear from the screenshot, when I type as input: x = 4, then Mathematica returns the function x = 4, instead of just remembering x as 4. Furthermore, when giving x^2+1 as input, Mathematica returns its roots?

enter image description here

Where does this come from? How can I undo it?

Question2

enter image description here

I just want Mathematica do display the first root of $x^2-2x+1$, but it clearly does not seem to understand it? How can I define such root objects?

Thanks in advance!

POSTED BY: Cédric Cavents
5 Replies

Thank you for the answers! This really helps me a lot.

POSTED BY: Cédric Cavents

Otherwise, use the menu Evaluation > Evaluate cells

POSTED BY: Gianluca Gorni

If you precede your input with the orange boxed "=" symbol, your input will be "interpreted" by Wolfram|Alpha. If you mean your input as regular Wolfram Language, do not type "=" at the beginning of the line.

POSTED BY: Gianluca Gorni

That was the first thing I tried, but when I just type (for instance) x = 4 without using the symbol '=' then I don't get the typical

in[3]:= x = 4

out

I assume you mean this: enter image description here

but Mathematica does not remember the values this way? I know its a really silly question but its just some kind of setting that I do not know, since I always used '=' beforehand.

POSTED BY: Cédric Cavents

try using shift-enter to evaluate your lines

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract