# Differentiate a function for a game theory application?

**URL:** <https://community.wolfram.com/t/differentiate-a-function-for-a-game-theory-application/8299>\
**Category:** Questions\
**Tags:** economics, calculus, equation-solving\
**Created:** [April 6, 2016, 6:16pm UTC](https://community.wolfram.com/t/differentiate-a-function-for-a-game-theory-application/8299 "2016-04-06T18:16:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![levicrews](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@levicrews](https://community.wolfram.com/u/levicrews)\
**Post date:** [April 6, 2016, 6:16pm UTC](https://community.wolfram.com/t/differentiate-a-function-for-a-game-theory-application/8299/1 "2016-04-06T18:16:11Z")

</div>

I’ve defined the following function for a game theory application I’m working on:

```
a[q_ s1_ s2_] := ((1 - q + s1*(1 + q*s2))/(1 + s2))

```

When I differentiate with respect to s1 like this,

```
D[a[q, s1, s2], s1]

```

Mathematica simply returns my command. It does not give me an error message. What’s going on? I’ve already done this derivative by hand, but I have many more equations like this, so I’d prefer to have the computer spit them out for me.

---

<div class="post-metadata">

**Author:** ![22padrinos](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/22padrinos/32/29645_2.png) [@22padrinos](https://community.wolfram.com/u/22padrinos)\
**Post date:** [April 6, 2016, 7:03pm UTC](https://community.wolfram.com/t/differentiate-a-function-for-a-game-theory-application/8299/2 "2016-04-06T19:03:05Z")

</div>

Hello, the definition of your function is wrong, because missing commas , I’ll share it with corrections , plus a picture so you can see that actually works

```
a[q_ , s1_, s2_] := ((1 - q + s1*(1 + q*s2))/(1 + s2))

D[a[q, s1, s2], s1]

```

Here is the picture!!!

 ![fuvc.JPG](https://global.discourse-cdn.com/wolfram/original/3X/9/4/94af77813682cc1154826919b26ccfd3957a4f12.jpeg)

---

<div class="post-metadata">

**Author:** ![sblinder](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sblinder/32/17861_2.png) [@sblinder](https://community.wolfram.com/u/sblinder)\
**Post date:** [April 6, 2016, 7:51pm UTC](https://community.wolfram.com/t/differentiate-a-function-for-a-game-theory-application/8299/3 "2016-04-06T19:51:16Z")

</div>

Missing commas in function definition.

```
In[11]:= a[q_, s1_ , s2_] := ((1 - q + s1*(1 + q*s2))/(1 + s2))

In[12]:= D[a[q, s1, s2], s1]

Out[12]= (1 + q s2)/(1 + s2)

```
