# Differentiation w/o assiging concrete values

v = Subscript[v, 0]*Sin[(Pi*S)/Subscript[S, 0]];
a = dv/ds v;
a = D[v, s]


returns

\$RecursionLimit::reclim: Recursion depth of 256 exceeded.


Reference in the link shown by error msg doesn't give me a relief. I'm assuming the root cause is that I'm not assigning concrete values to the variables. But here I want to operate differentiation w/o assigning values (is there explicit name in math for this kind of operation?). Don't even know if it's differentiation specific or general issue for an operation not assigning concrete values (and thus can't assign proper tags to this question either). I haven't been able to find the corresponding reference. Thanks.

Update) Code @acl gave works for me now. However, I'm just curious why my code returns the same error even after I corrected "S" to "s", and also removed 2nd line which I didn't really expect Mathematica to do anything for.

-
Regarding the update, is my explanation not sufficient? – acl Feb 13 '12 at 19:24
@acl yes, I guess in my particular situation the variable v might contain something and thus Mathematica tried to evaluate it. Thx – IsaacS Feb 14 '12 at 19:52
This occurs without anything being bound tov. It is just like k=k+1, which would work in C but in mathematica causes this. – acl Feb 14 '12 at 19:54

The error comes from the first line. I am not sure what the second does; finally, you differentiate with respect to s, but have a variable S, which is different.

Perhaps you wanted to do this:

v = v0*Sin[Pi*s/s0]
D[v, s]


which works.

To see the problem with recursion, run this:

ClearAll[v]
v = Subscript[v, 0]


What is happening is the same that happens if you evaluate k = k + 1.

-