You will test three limits of sums on the computer. The first function adds the right-hand terms for any . The other two use it on the sums of the lesson.
The idea. The sum tends to . A sum such as is of this form with . A product is turned into a sum with a logarithm, and then back with an exponential.
Your tasks.
riemann(f, n). Return .harmonic_block(n). Return .product_limit(n). Return , found as exp of the average of log(1 + r / n).Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…