Evaluating a derivative at a point in Mathematica

  • #1
1,387
2
If I define a function, such as

f[x_, y_] := {-2 x + 2 x^2, -3 x + y + 3 x^2}

I can compute the derivative with

D[f[x, y], {{x, y}}]

but what is the syntax for evaluating this derivative at a point?
 

Answers and Replies

  • #2
Maybe something like this?

Code:
In[1]:= f[x_, y_] := {-2 x + 2 x^2, -3 x + y + 3 x^2};
df = D[f[x, y], {{x, y}}]

Out[2]= {{-2 + 4 x, 0}, {-3 + 6 x, 1}}

In[3]:= df /. {x -> 1, y -> 2}

Out[3]= {{2, 0}, {3, 1}}

or this

Code:
In[4]:= D[f[x, y], {{x, y}}] /. {x -> 1, y -> 2}

Out[4]= {{2, 0}, {3, 1}}
 
  • #3
Great, thanks, Bill!
 

Suggested for: Evaluating a derivative at a point in Mathematica

Replies
1
Views
166
Replies
1
Views
555
Replies
3
Views
1K
Replies
1
Views
485
Replies
6
Views
531
Replies
1
Views
643
Replies
2
Views
647
Back
Top