Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. You know that the harmonic series 7l diverges. Did you realize how slowly it diverges? (a) (2 points) Write a program to determine how
4. You know that the harmonic series 7l diverges. Did you realize how slowly it diverges? (a) (2 points) Write a program to determine how many terms must be included before 15. Your program should take a moment to run and should tell the series passes you that more than 1.8 million terms are needed. That's a lot of terms! Report the exact number of terms. (b) (2 points) Now write a program that calculates the sums S1 and S2 1999998 1999999 2000000 S2 2000000 1999999 1999998 It will help you to know that you can make a for loop with syntax for 14:-11 which will count down by one each time through the loop. At the top of your program, put in the line "format long." This will allow you to see the entire number that MATLAB has stored instead of the just the 5 decimal places it usually gives. Of course, S1S2, but you get slightly different answers. What is S1S2l? Why do you get different answers? Which of the two is a more exact approximation, and why? (c) (2 points) If I try to adapt my program to find out how many terms are needed before the harmonic series is greater than 50, the program runs for a very long time. In fact, I don't think it will ever stop running. What is going on
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started