Chain rule with partial derivative

조회 수: 11 (최근 30일)
Huy Hoang Huynh Nguyen
Huy Hoang Huynh Nguyen 2020년 8월 31일
댓글: Huy Hoang Huynh Nguyen 2020년 8월 31일
Hello,
I need to take partial derivative with chain rule of this function f: f(x,y,z) = y*z/x; x = exp(t); y = log(t); z = t^2 - 1
I tried as shown below but in the end I cannot substitute in order to complete the calculation.
clear
clc
syms x y z t
f = @(x,y,z) y.*z.*x.^(-1)
df_x = diff(f,x)
df_y = diff(f,y)
df_z = diff(f,z)
x = @(t) exp(t);
y = @(t) log(t);
z = @(t) t^2 - 1;
x1 = x(1);
y1 = y(1);
z1 = z(1);
dx_t = diff(x,t)
dy_t = diff(y,t)
dz_t = diff(z,t)
df_t = df_x*dx_t + df_y*+dy_t + df_z*dz_t
df_t1 = subs(df_t,{x,y,z},{x1,y1,z1,1})
Thanks in advance

답변 (1개)

madhan ravi
madhan ravi 2020년 8월 31일
df_t1 = subs(df_t,{x,y,z},{x1,y1,z1})
  댓글 수: 1
Huy Hoang Huynh Nguyen
Huy Hoang Huynh Nguyen 2020년 8월 31일
Oh sorry
It was this one
df_t1 = subs(df_t,{x,y,z,t},{x1,y1,z1,1})
No bug or error, but it's still not a complete answer

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by