# How does one clear the value of a subs variable? [closed]

I saw the topics here, but it's not clear at all how to clear variables with sub. Ideas?

Btw, does anybody know why Mathematica won't give me the numerical value of the 4-th zeta function derivative at 0? It displays it symbolically, but not numerical value. Welcome to MMA SE! In general please post code instead of images.

Short answer: Subscript[a,0] =. (That's Unset in the docs.)

Long answer: and, well, although it's actually kind of a non-answer, my genuine advice here is: don't use subscripted variables in the first place, since they're pretty finicky. Instead use a, a, etc.

For one, you'll notice that a in your code is blue, not black, meaning there are no definitions associated with it. The definitions you've made have actually gotten attached to the symbol Subscript, so you'd have to either Clear[Subscript] to clear all subscripted values, or use Subscript[a,0] =.

Since every expression in Mathematica is either an atom or of the form f[a, b, c, ...] (stuff that seems like it isn't is, most often, just syntactic sugar), using a[i] is generally a lot more compatible with the rest of mathematica and therefore easier to code with. Consider Array[a, 3] which gets you {a, a, a}; there are many more examples.

If you want to use this, but still want it to look like a subscript, you can use

Format[a[i_]] := Subscript[a, i]


and it will print as a subscript in output expressions.

Of course, if you're just doing one or two things, there's no problem using Subscript! But if you're doing a lot it can get a bit frustrating, and might be easier to use this structure.

I wanted to leave this as a comment, since it's more just "best practices" stuff than an answer per se, but it was too long, so here you go :)

• Thanks. I have a different question now. Lol. Do you know why Mathematica won't give me the numerical value of the 4-th zeta function derivative at 0? It displays it symbolically, but not numerical value. Oct 3 at 5:23
• @user81908 Have you tried applying N? Derivative[Zeta] // N (which is what it seems you have up there) works for me. Again, please post code instead of images, otherwise no one can copy your code and test it to help out! Oct 3 at 5:32