Numerical presentation of a term

52 Views Asked by At

Hello I have the following task:

Let $$ y = \sin(x + \delta) -\ sin (x)$$ and $$\delta > 0$$ is very small. Write down a mathematical equivalent representation of this term which is stable.

I'm not sure if the word "stable" is the right translation (in german it's "gutartig"), I have this definition of it: An operation $$\circ$$ is stable if $$z*=z(1+\epsilon_{x \circ y})$$ with $$|\epsilon_{x \circ y}| \le C_1|\epsilon_x|+C_2|\epsilon_y|$$ with moderate constants $$C_1,C_2$$ which are independant from $$\epsilon_x,\epsilon_y$$

Still I have absolutely no clue how I do solve this task.

2

There are 2 best solutions below

2
On BEST ANSWER

Your problem is that if $\delta$ is small, the difference in the sines can be much smaller than either of the sines. You will lose precision, which you should have seen problems about before (maybe without the sine function involved). You should have seen things like $0.5000001-0.50000000$ The cure for this is to do the subtraction analytically. If you expand $\sin(x+\delta)$ what do you get? Now distribute out the factor $\sin x$ and use the small angle approximation for the terms involving $\delta$.

0
On

Note also that $$\sin A -\sin B=2\sin\frac{A-B}2\,\cos\frac{A+B}2$$ so that $$ \sin(x+δ)-\sin(x)=2\sin\left(\frac δ2\right)\,\cos\left(x+\frac δ2\right) $$ is a stable method to evaluate this difference for small $δ$ without resorting to approximations.