# Why does “Pattern(1,0)[w,_]” show up in the resulting expression of a differentiation? [closed]

I would like to differentiate the function s, and be able to evaluate it for different w afterwards. I tried the following:

 s[w_, V1_, V2_, V3_] = -Exp[-(V1 + V2)/2 - V3] +
Exp[-(V2 + V1)/2]/(Exp[(V2 - V1)/2] +
Exp[-(V2 - V1)/2]) (11 w^2 - (
Exp[-V1] +  Exp[-V2]  Exp[-V3] +  Exp[-V2] +
Exp[-V1]  Exp[-V3])^2)

D[s[w_, V1, V2, V3], w]


This is what I got

(22 E^(1/2 (-V1 - V2)) w_
Pattern^(0,1)[w, _]
)/(E^((V1 - V2)/2) + E^(
1/2 (-V1 + V2)))


I don't understand why "pattern" shows up in the expression, and what it might mean. I think I might have done something wrong with the patterns, but why don't I just get some kind of error?

-

## closed as too localized by Szabolcs, halirutan, image_doctor, Artes, rm -rf♦Dec 19 '12 at 2:29

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This happens because you used a pattern, w_, where it should not be used. Note that the full form of w_ is Pattern[w, Blank[]]. So just change w_ to w in D[s[w_, V1, V2, V3], w].
Thanks a lot! Originally I had a much more complicated expression, and when leaving out the _ I got something really ugly, while with w_ it did not look so very bad. Is there any meaning to this pattern thing in my final expression, or does it just mean that I did some crap before? –  Apatura Dec 18 '12 at 16:58
@Apatura You'll find the answer if you look at the FullForm of w_. Try writing pattern and blank there to see more clearly what's happening. ^(1,0) means derivative with respect to the first argument. Also, I recommend you look at this tutorial. –  Szabolcs Dec 18 '12 at 20:20