Evaluating a derivative at a point in Mathematica

Click For Summary
SUMMARY

The discussion focuses on evaluating the derivative of a function defined in Mathematica at a specific point. The function is defined as f[x_, y_] := {-2 x + 2 x^2, -3 x + y + 3 x^2}. The derivative is computed using D[f[x, y], {{x, y}}], resulting in {{-2 + 4 x, 0}, {-3 + 6 x, 1}}. To evaluate this derivative at the point (1, 2), users can apply the substitution df /. {x -> 1, y -> 2} or directly evaluate D[f[x, y], {{x, y}}] /. {x -> 1, y -> 2}, both yielding {{2, 0}, {3, 1}}.

PREREQUISITES
  • Understanding of Mathematica syntax and functions
  • Knowledge of derivatives and their computation
  • Familiarity with substitution operations in Mathematica
  • Basic grasp of multivariable calculus concepts
NEXT STEPS
  • Explore advanced derivative functions in Mathematica
  • Learn about the Evaluate function in Mathematica
  • Research optimization techniques for multivariable functions
  • Study the implications of derivatives in real-world applications
USEFUL FOR

Mathematica users, students of multivariable calculus, and professionals needing to compute and evaluate derivatives in mathematical modeling.

Rasalhague
Messages
1,383
Reaction score
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?
 
Physics news on Phys.org
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}}
 
Great, thanks, Bill!
 

Similar threads

Replies
8
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K