Question: Write a matlab scrip for the following THE ALTERNATING HARMONIC SERIES The alternating harmonic series converges to the natural log of 2: y_i_ = 1-2+?4+5-...-In(2)
THE ALTERNATING HARMONIC SERIES The alternating harmonic series converges to the natural log of 2: y_i_ = 1-2+?4+5-...-In(2) = 0.6931471806 Because of this, we can use the alternating harmonic series to approximate the In(2). But how far out do you have to take the series to get a good approximation of he final answer? We can use a while loop to solve this problem. 1. State the Problem Use a while loop to calculate the members of the alternating harmonic sequence and the value of the series until it converges to values that vary by less than.001. Compare the result to the natural log of 2. 2. Describe the Input and Output Input The description of the alternating harmonic series
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
