**Series Calculation with a while Loop**

Write a script file to determine how many terms are required for the sum of the series

5k2 – 2k; k = I, 2, 3…. to exceed 10,000. What is the sum for this many terms?

**Solution**

Because we do not know how many times we must evaluate the expression 5k2 – 2k, we use a whi Le loop. The script file is the following:

The sum is 10.203 after 18 terms.

### Related Matlab Homework Assignments