How to Derive Eq. 9.4.6 in Numerical Recipes from Given Expressions?

  • Thread starter burnt
  • Start date
  • Tags
    Numerical
In summary, to derive equation 9.4.6 from the given expressions, we used the general Taylor expansion and the definition of \epsilon_i as deviation from the true root to rearrange and simplify Eq. 9.4.5.
  • #1
burnt
2
0

Homework Statement



I want to derive equation Eq. 9.4.6 in Numerical Recipes from the expressions given, as stated in the book!
The equation represents the next (i+1 th) deviation [tex]\epsilon[/tex] from the true root.
Eq. 9.4.6:

[tex]
\epsilon_{i+1} = -\epsilon_i^2 \frac{f''(x)}{2f'(x)}
[/tex]

Homework Equations



Eq. 9.4.5:

[tex]
\epsilon_{i+1} = \epsilon_i + \frac{f(x_i)}{f'(x_i)}
[/tex]

[tex]\epsilon_i[/tex] represents deviation from true root.


General Taylor expansion:

Eq. 9.4.3:
[tex]
f(x+\epsilon) = f(x) + \epsilon f'(x) + ...
[/tex]

[tex]
f'(x+\epsilon) = f'(x) + \epsilon f''(x) + ...
[/tex]



The Attempt at a Solution



[tex]
\epsilon_{i+1} = \epsilon_i^2 \frac{f''(x)}{f'(x) + \epsilon_i f''(x)}
[/tex]

but this is not equation 9.4.6! Please help!
 
Physics news on Phys.org
  • #2


Thank you for your question. To derive equation 9.4.6 from the given expressions, we can use the general Taylor expansion for f(x+\epsilon) and f'(x+\epsilon) as shown in Eq. 9.4.3. We can then substitute these into Eq. 9.4.5 and rearrange to get:

f(x_i + \epsilon_i) = f(x_i) + \epsilon_i f'(x_i) + ... (1)

f'(x_i + \epsilon_i) = f'(x_i) + \epsilon_i f''(x_i) + ... (2)

Subtracting Eq. (1) from Eq. (2), we get:

f'(x_i + \epsilon_i) - f(x_i + \epsilon_i) = f'(x_i) - f(x_i) + \epsilon_i f''(x_i) + ...

Using the definition of \epsilon_i as deviation from the true root, we can rewrite this as:

\epsilon_{i+1} = \epsilon_i + \frac{f(x_i)}{f'(x_i)} + \frac{\epsilon_i f''(x_i)}{f'(x_i)} + ...

Multiplying both sides by \frac{f'(x_i)}{2f'(x_i)}, we get:

\frac{f'(x_i)}{2f'(x_i)} \epsilon_{i+1} = \frac{f'(x_i)}{2f'(x_i)} \epsilon_i + \frac{f(x_i)}{2f'(x_i)} + \frac{\epsilon_i f''(x_i)}{2f'(x_i)} + ...

Using the fact that f'(x_i) is the same as f'(x) at the true root, we can rewrite this as:

\frac{f'(x)}{2f'(x)} \epsilon_{i+1} = \frac{f'(x)}{2f'(x)} \epsilon_i + \frac{f(x_i)}{2f'(x)} + \frac{\epsilon_i f''(x)}{2f'(x)} + ...

This can be simplified to:

\epsilon_{i+1} = \epsilon_i + \frac{f(x_i)}{f'(x)} + \frac{\epsilon_i f''(x)}{2f'(
 

FAQ: How to Derive Eq. 9.4.6 in Numerical Recipes from Given Expressions?

What is Numerical Recipes Eq. 9.4.6?

Numerical Recipes Eq. 9.4.6 is an equation from the book "Numerical Recipes: The Art of Scientific Computing" that is used to calculate the correlation coefficient between two sets of data. It is commonly used in statistical analysis to determine the strength of the relationship between two variables.

How is Numerical Recipes Eq. 9.4.6 derived?

Numerical Recipes Eq. 9.4.6 is derived from the Pearson correlation coefficient formula, which is a measure of the linear relationship between two variables. The equation is simplified and presented in the book "Numerical Recipes: The Art of Scientific Computing" for easy implementation in scientific computing.

What are the inputs for Numerical Recipes Eq. 9.4.6?

The inputs for Numerical Recipes Eq. 9.4.6 are two sets of data with the same number of data points. These data sets can represent any two variables, such as height and weight, temperature and humidity, or stock prices and sales volume.

How accurate is Numerical Recipes Eq. 9.4.6 in determining correlation?

Numerical Recipes Eq. 9.4.6 is a widely used and accepted equation for calculating the correlation coefficient. It provides a reliable estimate of the linear relationship between two variables, but it is important to note that correlation does not imply causation. Other factors and variables may also be influencing the relationship between the two variables.

Can Numerical Recipes Eq. 9.4.6 be used for non-linear relationships?

No, Numerical Recipes Eq. 9.4.6 is specifically designed for calculating the correlation coefficient for linear relationships between two variables. For non-linear relationships, other statistical methods and equations may be more appropriate.

Back
Top