Evaluating a derivative at a point in Mathematica

  • #1
1,384
2

Main Question or Discussion Point

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
1,069
29
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
1,384
2
Great, thanks, Bill!
 

Related Threads on Evaluating a derivative at a point in Mathematica

Replies
2
Views
1K
Replies
4
Views
4K
Replies
4
Views
2K
Replies
2
Views
2K
Replies
11
Views
4K
Replies
2
Views
4K
Replies
9
Views
5K
  • Last Post
Replies
2
Views
2K
Replies
4
Views
5K
Top