0

$f(x)=ln(x-\sqrt[3]{x^3-1})$ is been calculated at $x=35$ and is store in $8$ significant numbers.

1.Find the size of the error

2.Suggest a better way to achieve higher precision and find the absolute error

How should I approach it?

gbox
  • 12,867

1 Answers1

1
  1. As per Taylor $$x-\sqrt[3]{x^3-1}=\frac1{3·x^2}+\frac1{9·x^5}+\frac{5}{81·x^8}+O(x^{-11})$$ the difference has 3 zeros after the decimal point. Both terms in the difference have 2 digits before the decimal point and are thus rounded to 6 digits after, the difference can only have a maximum of 3 correct digits. This can result in a relative error of $10^{-2}$, which translates into an absolute error of that magnitude in the logarithm.

    Or seen in another way, the rounding error of the root term is of size $35·10^{-8}$. In the difference, this error remains but is now relative to a base value of about $\frac1{3·35^2}\sim\frac1{3000}$, which translates in the logarithm to an absolute error of the same magnitude of about $3·35^3·10^{-8}\simeq 0.0013$.

    Even that is still rather pessimistic in view of the actual difference of the direct evaluation log(2.7200000e-04)=-8.2097085 to the more accurate value log(2.7211096e-04)=-8.2093006.

  2. You can use the binomial identity $$ A-B=\frac{A^3-B^3}{A^2+AB+B^2} $$ using $A=x$ and $B=\sqrt[3]{x^3-1}$.

    You can also continue to use the Taylor expansion to get $$ \ln(x-\sqrt[3]{x^3-1}) =\ln(3·x^2)+\ln\left(1+\frac1{3·x^3}+O(x^{-6})\right) \\=\ln(3·x^2)+\frac1{3·x^3}+O(x^{-6}) $$

Lutz Lehmann
  • 126,666