TransWikia.com

How can I use Mathematica to solve the partial derivative of function of functions?

Mathematica Asked on January 19, 2021

The implicit function $ z = z(x, y) $ is determined by the equation $ f(text{e}^z, 2z-x-y^2) = 0 $, and $ f $ has a continuous partial derivative. How can I use Mathematica to find the partial derivatives of $ partial_x z $ and $ partial_y z $?

enter image description here

2 Answers

I am not sure this is what you want but..

tt = f[Exp[z[x, y]], 2 z[x, y] - x - y^2]

(* f(E^z(x,y),2 z(x,y)-x-y^2) *)

sol = Solve[{D[tt, x] == 0, D[tt, y] == 0}, {D[z[x, y], x],
     D[z[x, y], y]}] // FullSimplify // First;

sol /. Derivative[a__][f][Exp[z[x, y]], 2 z[x, y] - x - y^2] :> 
    Derivative[a][f][X, Y] /. Exp[z[x, y]] -> Exp[z] // TableForm

enter image description here

Note that

D[z[x, y], x]/
  D[z[x, y], y] /. sol

is equal to 1/(2y)

Answered by chris on January 19, 2021

Another way that may be no more satisfying.

Your f[Exp[z[x, y]], 2 z[x, y] - x - y^2] == 0 can be rewritten as

eq = 2 z[x, y] - x - y^2 == g[Exp[z[x, y]]]

and Mathematica cannot solve this equation for z.

We can take derivatives.

D[eq[[1]], x] == D[eq[[2]], x]

Solve[%, Derivative[1, 0][z][x, y]]//Flatten

dzdx = Derivative[1, 0][z][x, y] /. %
(*-(1/(E^z[x, y] g'[E^z[x, y]] - 2))*)

D[eq[[1]], y] == D[eq[[2]], y]

dzdy = Derivative[0, 1][z][x, y] /. %
(*-((2 y)/(E^z[x, y] g'[E^z[x, y]] - 2))*)

dzdx/dzdy
(*1/(2 y)*)

If z weren't in both parts of f we could in many cases solve for it explicitly, but I don't know how to do it in this case.

Answered by Bill Watts on January 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP