How do I partial differentiation a function with 2 variables?

My function is P(V,R) = V^2/R.
I know how to find the partial differentiation of the function with respective to V or R.
However, how do I find the partial differentiation of P with the value V=120 and R=2000?
Because I know there is a formula to find the partial differentiation of P.
How do i put it in Matlab?

 Accepted Answer

Try this
% if true
% code
% end
v = sym('120')
r = sym('2000')
p = diff(v^2/r)
Since you assign for V, R as constants, the pde will return as 0

1 Comment

so actually, i have dV = 0.02V and dR = 0.03R. i was trying to use the formula dP=(dP/dV)*dV + (dP/dR)*dR. Is there a way to code the formula into matlab?

Sign in to comment.

More Answers (0)

Asked:

on 1 Nov 2020

Commented:

on 1 Nov 2020

Community Treasure Hunt

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

Start Hunting!