0

I am trying to define a vector, $\vec{u}$, with components $u_x$ and $u_y$.

However, when I type u = {Subscript[u, x], Subscript[u, y]}, I get the following error:

$RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of {Subscript[u, x]}.

Using the Indexed[] function produces the same error.

Just curious why this happens, and how to correct the problem in this scenario?

Ethan
  • 15
  • 6
  • 2
    As a general note: Better not use Subscript at all; it leads to many nasty things. Why does this happen? The same happens with every call of the form u = f[u]. At the moment you make the assignment, it forces Mathematica to reinsert the definition on the right hand side which produces f[f[u]],f[f[f[u]]], f[f[f[f[u]]]] and so on. – Henrik Schumacher Jan 29 '18 at 21:57
  • You could consider one of the options presented in this answer – Carl Woll Jan 29 '18 at 22:04

0 Answers0