# Finding the 1st and 2nd derivatives of a function of two variables [closed]

I have an oscillatory function f(ф, ф'), and I want to differentiate it. function like this:

df(ф, ф')/dф | ф, ф'= 0
df(ф, ф')/dф' | ф, ф'= 0
d^2f(ф, ф')/dф^2 | ф, ф'= 0
d^2f(ф, ф')/dф'^2 | ф, ф'=0
df(ф, ф')/dфdф' | ф, ф'=0


How can I write the above expressions in the Wolfram Language?

## closed as off-topic by Daniel Lichtblau, Henrik Schumacher, m_goldberg, LCarvalho, István ZacharNov 5 '18 at 12:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, Henrik Schumacher, m_goldberg, LCarvalho, István Zachar
If this question can be reworded to fit the rules in the help center, please edit the question.

• Have a look at D. – b.gates.you.know.what Nov 2 '18 at 13:44
• In your equations is \[Phi]' intended to symbolize a derivative or is it a second variable? – Jack LaVigne Nov 2 '18 at 14:03

In mathematica the tick mark applied to ϕ' represents the derivative so you need to use a different symbol.

I will simply use x and y in the examples below.

Here is what you are looking for using a general function as well as an example function, x^2 + y2.

The derivative with respect to x evaluated at y=0.

D[f[x, y], x] /. y -> 0
D[x^2 + y^2, x] /. y -> 0


The derivative with respect to y evaluated to y=0

D[f[x, y], y] /. y -> 0
D[x^2 + y^2, y] /. y -> 0


The second derivative with respect to x evaluated at y=0.

D[f[x, y], {x, 2}] /. y -> 0
D[x^2 + y^2, {x, 2}] /. y -> 0


The derivative with respect to x and then y evaluated at y=0

D[f[x, y], x, y] /. y -> 0
D[x^2 + y^2, x, y] /. y -> 0


In all of these examples the first term evaluates the derivative.

The expression /. y -> 0 means take the expression on the left and replace y with 0. This effectively evaluates the expression at y=0.

• Thanks. Also the both x (or ф in my example) and y (ф') must be: | ф=0 , ф'=0 I think the final function looks like this: D[f[x, y], {x, 2}] /. y -> 0 /. x->0 – Wales Nov 2 '18 at 20:17
• Furthermore with y->0 and x->0 i get the infinite expression encountered error. How can i display the maximal result (with 1/0, yep) with this error? – Wales Nov 2 '18 at 20:42
• If you are getting an expression with an error message "Infinite expression 1/0 enountered" that implies you are using a particular function f. You should ask a separate question and include your function in that question. – Jack LaVigne Nov 2 '18 at 22:31

f[x_, y_] := Sin[x y]


Then, you can use Derivative:

Derivative[1,0][f][0,0]
Derivative[0,1][f][0,0]
Derivative[2,0][f][0,0]
Derivative[1,1][f][0,0]
Derivative[0,2][f][0,0]


0

0

0

1

0