Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.3K Views
|
6 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Reaching $RecursionLimit while solving a simple equation

Posted 4 years ago

Hey guys, i am completely new to Mathematica. When i try to solve an equation with the command Solve[], i face the following "error": $RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of 8/a.

In[4]:= Solve[a = a/2 + 8/a + 3, a]

During evaluation of In[4]:= $RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of 8/a.

Out[4]= Hold[Solve[a = a/2 + 8/a + 3, a]]

But the equation should definitely have a solution, i tried it with Maple (hope i am allowed to say that here lol)

Can you guys help me out with this problem?

Greetings

POSTED BY: Christoph W
6 Replies
Posted 4 years ago

Hey, thank you for answering. I also tried it with == instead of =, but the result is the same:

In[22]:= Solve[a == a/2 + 8/a + 3, a]

During evaluation of In[22]:= $RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of 8/a.

Out[22]= Hold[Solve[a == a/2 + 8/a + 3, a]]

Edit: Nevermind, after restarting the program, it worked:

In[1]:= Solve[a == a/2 + 8/a + 3, a]

Out[1]= {{a -> -2}, {a -> 8}}

Does anybody of you know why just changing the = sign to == didn't work?

Greetings

POSTED BY: Christoph W

Hi Peter
In Wolfram Language the sign = is making an assignment, means that it puts something (such as number, list, image,...) inside a variable on the left hand side.

However, the sign == is equality, means that it equals the LHS to the RHS which is the normal definition of equality in math.

POSTED BY: Ahmed Elbanna
Posted 4 years ago

Peter:

I have run into that interesting "editing" quirk that does not recognize changing = to == before. I think that is happening is that Mathematica is doing some typesetting as you type. So, typing == in a single go gets replaced with a typeset double equals. But, adding an = later doesn't trigger the typesetting.

But, I am guessing.

Have. a great weekend.

POSTED BY: Mike Besso

Because the definition was still there. Could do Clear[a] to handle that more gently than a kernel restart.

POSTED BY: Daniel Lichtblau
Posted 4 years ago

Nice, thank you.

Greetings

POSTED BY: Christoph W
Posted 4 years ago

I think you want == and not =.

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