# Error propagation with trigonometric functions

I am working on a lab report about Bragg difraction and I am having trouble to propagate the errors.

The data acquired is the angle of difraction $\theta$, the error involved in its measurement $\Delta \theta$ and I am finding the plane spacing ($d$) using the formula $$d=\frac{n\lambda}{2\sin{\theta}}$$

Than, I use $\Delta d=|\frac{d}{d\theta}(\frac{n\lambda}{2\sin \theta})|.\Delta \theta$ to find the error related to $d$, and I get to:

$$\Delta d=\frac{n\lambda}{2}\csc\theta\cot\theta.\Delta\theta$$

The problem is that, using the experimental values, I get a relative error for $d$ of 70% using a 1.2% relative error of $\theta$. I did some research and found this lab report: https://outerspacetime.files.wordpress.com/2014/02/bragg_webster_v2.pdf , on page 14, $\Delta\theta = |[\sin(\theta -\Delta\theta)-\sin(\theta+\Delta\theta)]|$. Why does he do that? Is my formula for $\Delta d$ wrong?

• Forgot to convert degree to radian? Apr 10, 2017 at 21:15

$n \lambda = 2 d \sin \theta \Rightarrow 0 = 2 \Delta d\,\sin \theta + 2 d \cos \theta \,\Delta \theta$ which is the same as your equation because you can substitute $n \lambda = 2 d \sin \theta$ into your equation to get mine.

Both routes produce $\Delta d = - d \cot \theta \,\Delta \theta$ where $\Delta \theta$ is in radians.

What are your values which produce such a large error?

Update as a result of a comment from the OP.

Using $n=1$, $\lambda=63.095 \rm pm$, $\theta = 7.27°$, the instrument used has $\Delta \theta = 0.09°$, then I get $d = 249.298 \rm pm$ and $\Delta d = 175.878 \rm pm$.

$\Delta \theta$ has to be in radians $(0.09^\circ \rightarrow 0.00157\, \rm radian)$ and this results in $\Delta d = 3 \,\rm pm$.

$\Delta\theta = |[\sin(\theta > -\Delta\theta)-\sin(\theta+\Delta\theta)]|$

seems to be an estimate of the error in $\sin \theta$ ie $\Delta (\sin \theta)$ assuming that the angle can be measure to about half a degree.
That error, $\Delta (\sin \theta)$, is made equal to $\Delta \theta$ rather than $\Delta (\sin \theta)$ because the angles are small which is equivalent to you making $\cos \theta$ in your equation equal to one.

• Using $n=1$, $\lambda=63.095 pm$, $\theta = 7.27°$, the instrument used has $\Delta \theta = 0.09°$, then I get $d = 249.298 pm$ and $\Delta d = 175.878 pm$. Apr 11, 2017 at 3:54
• @ViníciusLopesSimões I have updated my answer and using your values found $\Delta d$ to be $3\,\rm pm$ when $\Delta \theta$ is in radians not degrees that you used. Apr 11, 2017 at 5:15

You can use the functional approach. In your case you have the formula,

$$d=\frac{n\lambda}{2\sin\theta}.$$

Assuming there is no error in $n$ or $\lambda$, then given that $\delta\theta$ is the error in $\theta$, one has that the error $\delta d$ in the plane spacing $d$ according to the functional approach is,

$$\delta d = \bigg\lvert \frac{n\lambda}{2\sin(\theta+\delta\theta)} -\frac{n\lambda}{2\sin\theta} \bigg\rvert.$$

In general for a multi-variable function $f(x_1,x_2,\dots,x_i)$ with errors $\delta x_i$, one has that the error according to the functional approach is given by,

$$\delta f^2 = \left(f(x_1 + \delta x_1, x_2, \dots, x_i) - f(x_1,\dots,x_i)\right)^2 + \dots + \left( f(x_1, \dots, x_i+\delta x_i)-f(x_1,\dots,x_i)\right)^2.$$