Hi, I have unfortunately forgotten my basic calculus.... I have a problem regarding partial vs. total derivatives. I have a function f(x,y) = ax - by. Also, x and y are not independent: x = c - (y-1)^2.
My goal is to find the ratio of sensitivities of f with respect to x and y. In other words, if I want f to remain constant, and I know x is going to move by some small amount, how much should y move in the other direction in order for that to happen?
I have a few thoughts about how to compute this but am not sure which is most appropriate/accurate/etc.
These are the ways I am considering:
1) Compute partial derivatives of f w.r.t. x and y and take the ratio. I think this is wrong because of the inter-dependence of x and y.
2) Compute partial derivatives of f w.r.t. x and y, but assume that x has been constrained by y, in other words that x is dependent upon y and not vice-versa. Substitute the equation for x into the original function and compute del f / del x. However then I am not sure how to compute del f / del y.
3) Compute a total derivative of f w.r.t. x and y. E.G.
df / dx = del f / del x + (del f / del y) * (del y / del x)
where del means partial derivative. Similar equation for df / dy. Then take the ratios of those. The question then is how to compute del x / del y and del y / del x. Do I just solve for one in terms of the other, using the second relation given, and differentiate the results?
OR - 4) none of the above?
All help very greatly appreciated and thanks in advance!!
> Hi, I have unfortunately forgotten my basic calculus.... I have a > problem regarding partial vs. total derivatives. I have a function > f(x,y) = ax - by. Also, x and y are not independent: x = c - (y-1)^2.
> My goal is to find the ratio of sensitivities of f with respect to x > and y. In other words, if I want f to remain constant, and I know x is > going to move by some small amount, how much should y move in the > other direction in order for that to happen?
> I have a few thoughts about how to compute this but am not sure which > is most appropriate/accurate/etc.
> These are the ways I am considering:
> 1) Compute partial derivatives of f w.r.t. x and y and take the ratio. > I think this is wrong because of the inter-dependence of x and y.
> 2) Compute partial derivatives of f w.r.t. x and y, but assume that x > has been constrained by y, in other words that x is dependent upon y > and not vice-versa. Substitute the equation for x into the original > function and compute del f / del x. However then I am not sure how to > compute del f / del y.
> 3) Compute a total derivative of f w.r.t. x and y. E.G.
> df / dx = del f / del x + (del f / del y) * (del y / del x)
> where del means partial derivative. Similar equation for df / dy. Then > take the ratios of those. The question then is how to compute del x / > del y and del y / del x. Do I just solve for one in terms of the > other, using the second relation given, and differentiate the results?
> OR - 4) none of the above?
> All help very greatly appreciated and thanks in advance!!
Forget calculus for the moment...
In general, if you vary x and y so that f stays constant, your second equation
x=c - (y-1)^2 will not remain true for any a,b,c.
The first equation has a linear relationship - the second a quadratic.
On Wed, 27 Aug 2008, trance_dude wrote: > f(x,y) = ax - by. Also, x and y are not independent: x = c - (y-1)^2.
> My goal is to find the ratio of sensitivities of f with respect to x > and y.
Huh?
> In other words, if I want f to remain constant, and I know x is > going to move by some small amount, how much should y move in the > other direction in order for that to happen?
That contradicts that x depends on y.
f(x,y) = c
f_x(x,y) dx/dx + f_y(x,y) dy/dx = 0
dy/dx = -f_x(x,y)/f_y(x,y) = a/b
> I have a few thoughts about how to compute this but am not sure which > is most appropriate/accurate/etc.
> These are the ways I am considering:
> 1) Compute partial derivatives of f w.r.t. x and y and take the ratio. > I think this is wrong because of the inter-dependence of x and y.
Yes. Just what are you wanting to compute?
> 2) Compute partial derivatives of f w.r.t. x and y, but assume that x > has been constrained by y, in other words that x is dependent upon y > and not vice-versa. Substitute the equation for x into the original > function and compute del f / del x. However then I am not sure how to > compute del f / del y.
> where del means partial derivative. Similar equation for df / dy. Then > take the ratios of those. The question then is how to compute del x / > del y and del y / del x. Do I just solve for one in terms of the > other, using the second relation given, and differentiate the results?
f_x(x,y) is of course, the partial derivative with respect to x.
> On Wed, 27 Aug 2008, trance_dude wrote: > > f(x,y) = ax - by. Also, x and y are not independent: x = c - (y-1)^2.
> > My goal is to find the ratio of sensitivities of f with respect to x > > and y.
> Huh?
> > In other words, if I want f to remain constant, and I know x is > > going to move by some small amount, how much should y move in the > > other direction in order for that to happen?
> That contradicts that x depends on y.
> f(x,y) = c
> f_x(x,y) dx/dx + f_y(x,y) dy/dx = 0
> dy/dx = -f_x(x,y)/f_y(x,y) = a/b
> > I have a few thoughts about how to compute this but am not sure which > > is most appropriate/accurate/etc.
> > These are the ways I am considering:
> > 1) Compute partial derivatives of f w.r.t. x and y and take the ratio. > > I think this is wrong because of the inter-dependence of x and y.
> Yes. Just what are you wanting to compute?
> > 2) Compute partial derivatives of f w.r.t. x and y, but assume that x > > has been constrained by y, in other words that x is dependent upon y > > and not vice-versa. Substitute the equation for x into the original > > function and compute del f / del x. However then I am not sure how to > > compute del f / del y.
> > where del means partial derivative. Similar equation for df / dy. Then > > take the ratios of those. The question then is how to compute del x / > > del y and del y / del x. Do I just solve for one in terms of the > > other, using the second relation given, and differentiate the results?
> f_x(x,y) is of course, the partial derivative with respect to x.
Partial could be very far from the accuracy of the total. Or it might be close.
On Aug 27, 7:55 pm, trance_dude <robert.cor...@gmail.com> wrote:
> Hi, I have unfortunately forgotten my basic calculus.... I > have a problem regarding partial vs. total derivatives. I > have a function f(x,y) = ax - by. Also, x and y are not > independent: x = c - (y-1)^2.
So if the variables are not independent then why have two of them?
Hi have been away on holiday and so have not read the replies until now; thanks for them. Let me try to clarify what I am trying to do here - let's forget about f remaining constant. I simply am trying to find the most appropriate derivative of f with respect to x and y, given the equations I posted.
If we just had this: f(x,y) = ax - by
That is a plane in 3-d space and it is fairly obvious to me how to calculate derivatives and what their interpretation is.
But if we add this relation: x = c - (y-1)^2
Now the graph is only parts of the plane where both equations are true. To make things simpler let's just assume that the second relation is this instead: x = c * y
So the graph is a line through space. The original plane has been constrained by the second relation. I am aware that I can express f in terms of either only x or only y, but I do not wish to do this because both variables have real-world meaning for the particular problem I am solving.
My question is, what type of derivative of f is appropriate here with respect to x and y, and how do I calculate it?
There is a short section in my calculus book which is titled "how to find partial derivatives when f is constrained by another equation". I think this is what I need to do but am not sure and thus this is where I need some advice. The book says to:
1) Decide which variables are dependent and independent. To calculate del f / del x, assume that f is dependent, x is independent, and make choices between independent/dependent for the variables in each remaining equation. In my case there is just one other equation and one remaining variable so we would choose y as dependent. (More variables would require more choices)
2) Eliminate the dependent variables from the expression for f. In my case I would just solve the second equation for y in terms of x and then plug it into the first equation.
3) Differentiate as usual.
In other words, this procedure suggests that to find del f / del x and del f / del y, I should use the second equation to express f in terms of only x or only y and differentiate as usual.
That is easy enough for me to do, but my questions are: - Is the appropriate procedure for the given setup? - Is there a way to find the TOTAL derivative with respect to x and y in the presence of constraints? - May I simply use the usual formula for total derivative whilst calculating partial derivatives as above? - Bottom line, what is the most accurate and appropriate derivative for this setup?
I think the answers are yes, yes, yes, and TOTAL. Thanks again for the replies and all input appreciated!
On Aug 28, 12:14 am, Raphanus <lester.we...@gmail.com> wrote:
> On Aug 27, 8:55 pm, trance_dude <robert.cor...@gmail.com> wrote:
> > Hi, I have unfortunately forgotten my basic calculus.... I have a > > problem regarding partial vs. total derivatives. I have a function > > f(x,y) = ax - by. Also, x and y are not independent: x = c - (y-1)^2.
> > My goal is to find the ratio of sensitivities of f with respect to x > > and y. In other words, if I want f to remain constant, and I know x is > > going to move by some small amount, how much should y move in the > > other direction in order for that to happen?
> > I have a few thoughts about how to compute this but am not sure which > > is most appropriate/accurate/etc.
> > These are the ways I am considering:
> > 1) Compute partial derivatives of f w.r.t. x and y and take the ratio. > > I think this is wrong because of the inter-dependence of x and y.
> > 2) Compute partial derivatives of f w.r.t. x and y, but assume that x > > has been constrained by y, in other words that x is dependent upon y > > and not vice-versa. Substitute the equation for x into the original > > function and compute del f / del x. However then I am not sure how to > > compute del f / del y.
> > 3) Compute a total derivative of f w.r.t. x and y. E.G.
> > df / dx = del f / del x + (del f / del y) * (del y / del x)
> > where del means partial derivative. Similar equation for df / dy. Then > > take the ratios of those. The question then is how to compute del x / > > del y and del y / del x. Do I just solve for one in terms of the > > other, using the second relation given, and differentiate the results?
> > OR - 4) none of the above?
> > All help very greatly appreciated and thanks in advance!!
> Forget calculus for the moment...
> In general, if you vary x and y so that f stays constant, your second > equation
> x=c - (y-1)^2 will not remain true for any a,b,c.
> The first equation has a linear relationship - the second a quadratic.