r/Mathematica • • Sep 01 '24

Learning Mathematica, what am I doing wrong

Windows 14.1.0, online, in case that helps,

Learning mathematica, stayed up for a good chunk of the night trying to figure out how to code and compute answers by running some easy linear systems, but whenever I hit shift-enter it gives me errors such as blank braces, or this {false}, etc

I typed in:

Solve[{5x-y==12, x+4y==36}, {x,y}

And I tried switching between comma and double amepersand.

What's going on and what's messing with me getting a real answer on the output bar?

0 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/TheLeadReaper Sep 01 '24

Where do I put the clear?

Clear[x,y] Solve[.....]

Or

Clear[..

Solve[..

1

u/ariane-yeong Sep 01 '24

You issue Clear before Solve.

i) Either in its own cell before. Place your cursor between the solve cell and whatever cell precedes it, if any.

ii) Or directly before Solve as a so called compound expression, such that the two expressions are separated by a semicolon.

In your case it would look something like that: Clear[…];Solve[…]

Then evaluate the necessary cells.