Lesson 16 of 18
Root Test
The Root Test
The root test (also called Cauchy's root test) determines whether a series converges by computing:
Conclusion:
- → series converges absolutely
- → series diverges
- → inconclusive (try another test)
Comparison with the Ratio Test
Both tests use the same threshold ( converges, diverges), but the root test is more powerful — it gives a conclusion in some cases where the ratio test is inconclusive. It is especially useful when is a power or exponential expression raised to the -th power.
Examples
— geometric series:
— divergent geometric:
— ultra-fast convergence:
Numerical Approximation
For large , is a good approximation of :
double root_test_limit(double (*a)(int), int n) {
return pow(fabs(a(n)), 1.0 / (double)n);
}
Your Task
Implement double root_test_limit(a, n) that computes for a given term function and large .
TCC compiler loading...
Loading...
Click "Run" to execute your code.