Equation demonstration

64 Views Asked by At

Let $\delta f \equiv \frac{\Delta f}{f}$ show that:

$$\matrix{\delta(xy) &=& \delta x + \delta y\\ \delta(x/y) &=& \delta x - \delta y\\ \delta(x+y) &=& \frac{x}{x+y}{\delta x} + \frac{y}{x+y}{\delta y}}$$

Using floating point arithmetics, I am trying to demonstrate those formulas. For the first formula, I have tried something like this: I know that $f(xy)= f(x)f(y)$

$$\Delta f \approx \sum_{i=1}^n\Delta x_i \frac{\partial f}{\partial x}$$

But I got stuck even at the first equation. Any guidance, example or help would be appreciated.

2

There are 2 best solutions below

9
On BEST ANSWER

We have a function $f:\mathbb{R}^2\to\mathbb{R}$ of two variables (which we assume is differentiable) and we want to determine how much the function value $f(x,y)$ change if we make a small change $(\Delta x,\Delta y)$ to the point $(x,y)$. This change is denoted as

$$\Delta f(x,y) \equiv f(x+\Delta x,y+\Delta y) - f(x,y)$$

From a Taylor expansion we have that to first order in the small quantities $\Delta x,\Delta y$ this change is given by

$$\Delta f(x,y) \simeq \frac{\partial f(x,y)}{\partial x}\Delta x + \frac{\partial f(x,y)}{\partial y}\Delta y$$

diving by $f(x,y)$ and using the definition of $\delta[f]= \frac{\Delta f}{f}$ we can write the equation as (dropping the $(x,y)$ label for simplicity)

$$\delta f \simeq \frac{1}{f}\frac{\partial f}{\partial x}\Delta x + \frac{1}{f}\frac{\partial f}{\partial y}\Delta y$$

We can manipulate it further by using that $\delta x=\frac{\Delta x}{x}$ and $\delta y=\frac{\Delta y}{y}$ to arrive at

$$\delta f \simeq \left(\frac{x}{f}\frac{\partial f}{\partial x}\right)\delta x + \left(\frac{y}{f}\frac{\partial f}{\partial y}\right)\delta y$$

The formula above, and the abillity to compute derivatives is all you need to solve the problem at hand. You need to apply it to the three functions $f_1(x,y) = xy$, $f_2(x,y) = x/y$, $f_3(x,y) = x+y$. I will below give an example for the first case.

For the function $f_1(x,y) = xy$ we have $\frac{\partial f_1}{\partial x} = y$ and $\frac{\partial f_1}{\partial y} = x$ which gives $\frac{x}{f_1}\frac{\partial f_1}{\partial x} = \frac{x}{xy}\cdot y = 1$ and $\frac{y}{f_1}\frac{\partial f_1}{\partial y} = \frac{y}{xy}\cdot x = 1$. Using this the equation above says that

$$\delta [xy] \simeq \delta x + \delta y$$

1
On

You can do as follows: $$\delta(xy)=\frac{\Delta(xy)}{xy}=\frac{(x+\Delta x)(y+\Delta y)-xy}{xy}=\frac{xy+x\Delta. y+\Delta x. y+\Delta x.\Delta y-xy}{xy}=\frac{x.\Delta y+\Delta x. y+\Delta x.\Delta y}{xy}=\delta y+\delta x+\delta x\delta y\sim \delta x+\delta y$$ because the term $\delta x\delta y$ is neglectable compared to the first two.

For the second problem: $$\delta\left(\frac{x}{y}\right)=\frac{\frac{x+\Delta x}{y+\Delta y}-\frac{x}{y}}{\frac{x}{y}}=\frac{xy+y\Delta x-xy-x\Delta y}{y(y+\Delta y)}\cdot\frac{y}{x}=\frac{y\Delta x-x\Delta y}{x(y+\Delta y)}$$ $$=\delta x\cdot\frac{y}{y+\Delta y}-\frac{\Delta y}{y+\Delta y}\sim\delta x-\delta y$$ because $$\frac{y}{y+\Delta y}=\frac{1}{\frac{y+\Delta y}{y}}=\frac{1}{1+\delta y}\sim 1$$ and $$\frac{\Delta y}{y+\Delta y}=\frac{\Delta y/y}{1+\Delta y/y}=\frac{\delta y}{1+\delta y}\sim \delta y$$ Above we assumed that $\delta y<< 1$, which is true if $\Delta y<<y$, i.e if $y$ is much larger than the machine precision $\Delta y$.

The third problem is done analogously.