Constrait parcial derivatives

Today I want to comment on a small and rapid mathematical method regarding the derivation (partial) of functions.

We, the majority, are accustomed to seeing the radius of change of a function through its axes (or where we want to see it change) being all these independent but in real life, this is not usually so. So, for example, if we want to see how the temperature varies (as it is homogenized) in a vessel with, not, a gas or a solid … in short, with molecules.

Obviously, any physicist will tell you that for this we use the following equation:

\frac{\partial f}{\partial t}=K(\frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial y^2}+\frac{\partial^2 f}{\partial z^2})

Where f, the function that tells us the temperature, depends on the position x, y, z and time t and K is the constant of the medium (as they pass the temperature molecules with each other, nothing serious).

If you set the coordinates x, y, z are independent and we can measure the ratio of change independently since when one varies we do not take into account how the rest varies. And this is not so. As you will know from mere experience, the temperature (in this example) how it evolves depends not only on the environment in which it is but on factors of how the medium itself is distributed (an example, remember).

This tells us that there has to be another function, which we are going to call the constraint function, that tells us and tells us how and in what way the coordinates must be related. Let’s call this function and it will be such that:

g(x, y, z) = c

That is, if we change, for example, x, this will vary according to values of the other two coordinates y, z. This is something quite obvious in life although, thinking that way many people’s head explodes to understand it, that’s why I like to summarize it to a “everything is related”.

That is why it is important to know how to do partial derivatives with constraint where, what we say is that we calculate the time of variation of the function f with respect to one of its variables keeping some other constant so that we can analyze the surface, the curve and know how really it varies. That is to say:

(\frac{\partial f}{\partial z})_{y}
y = constant
z = change
x = x(y, z) change in function of y, z

For this there are two forms that, in the background are the same, as you will see.

Using differentials

If we use differentials we can say the following, which is that by differentiating the function f we have:

df = f_{x}dx + f_{y}dy + f_{z}dz

Where, we have simply differentiated to much and where, by notation f_{x} is the partial differentiation of function as a function of x. Now a little basic math.

Since y is constant we know that the differential of something constant is 0 and therefore dy = 0. Remaining:

df = f_{x}dx + f_{z}dz

Now we use the relation/constrait function, that is, g, so that we see how we relate dx to dz. To do this, we also differentiate this function:

dg = g_{x}dx + g_{y}dy + g_{z}dz = 0

And, just as g is constant, we have that its derivative is 0 and as y we are also keeping it constant because its differential is 0 as well. Then.And, just as g is constant, we have that its derivative is 0 and as y we are also keeping it constant because its differential is 0 as well. Then:

0 = g_{x}dx + g_{z}dz
dx = - \frac{g_{z}}{g_{x}}dz

That, if you look, is giving us the relationship between x and z keeping constant. Just what we needed, so finally:

df = f_{x}(- \frac{g_{z}}{g_{x}}) + f_{z} dz \rightarrow \frac{df}{dz}=(\frac{\partial f}{\partial z})_{y} = - f_{x}\frac{g_{z}}{g_{x}} + f_{z}

Chan rule

By all is known the chain rule of differentiation and, I imagine, its use in partial differentiation (which is the same, that noses), so let’s start:

(\frac{\partial f}{\partial z})_{y} = \frac{\partial f}{\partial x} (\frac{\partial x}{\partial z})_{y} +  \frac{\partial f}{\partial y} (\frac{\partial y}{\partial z})_{y} +  \frac{\partial f}{\partial z} (\frac{\partial z}{\partial z})_{y}

Now, as before, being and constant, its ratio of change to z is 0, and obviously the ratio of change of z to itself is 1, so we have something much simpler.

(\frac{\partial f}{\partial z})_{y} = \frac{\partial f}{\partial x} (\frac{\partial x}{\partial z})_{y} +  \frac{\partial f}{\partial z}

Now, let’s use the constraint function to help a little by doing exactly the same thing, using the chain rule:

(\frac{\partial g}{\partial z})_{y} = \frac{\partial g}{\partial x} (\frac{\partial x}{\partial z})_{y} +  \frac{\partial g}{\partial y} (\frac{\partial y}{\partial z})_{y} +  \frac{\partial g}{\partial z} (\frac{\partial z}{\partial z})_{y} = 0

Where I have already anticipated that as the function g is constant, the result of its partial must be 0 and, using the same as before, when maintaining and constant, its partial will be 0 apart that the partial of z with respect to itself 1. A great simplification that allows us to put what is worth the ratio of change from x to az maintaining and constant.

0 = \frac{\partial g}{\partial x} (\frac{\partial x}{\partial z})_{y} +  \frac{\partial g}{\partial z} = g_{x}(\frac{\partial x}{\partial z})_{y} + g_{z}

So, we can say that:

(\frac{\partial x}{\partial z})_{y} = - \frac{g_{z}}{g_{x}}

Where, substituting in/on the function f, we will have:

(\frac{\partial f}{\partial z})_{y} = \frac{\partial f}{\partial x} ( - \frac{g_{z}}{g_{x}}) +   \frac{\partial f}{\partial z}

That gives us the same result as before, as it has to be.

In the end, in this way we can calculate the ratio of change from one restricted function to another in a much simpler form than we could imagine in principle with our mind.