Question: Excel VBA question I need the the code not just the value Thansk 7. The general Maclaurin cosine series can be written as: 40 cos(x)
7. The general Maclaurin cosine series can be written as: 40 cos(x) = 1--+ +-.. .. 40! Evaluate the Maclaurin cosine series using For loops and limit the maximum number of terms up to x40 40! Use the code to evaluate the value of cosine for x - 28 degrees. Use a tolerance level to control the number of terms needed to be added to the series. For example, if tol = 0.01 and if the new term added has a value less than 0.01 then stop the computation. Run the code with tolerance of 0.00001 and report the number of terms needed in the solution to reach this tolerance level. Also, compute the error in the solution by comparing against real value evaluated by VB. Use the following code segment to solve the problem x Cells1, 2) tol - Cells(2,2) pi 3.1428 x = x * pi / 180 ' convert to radians sum ? sign ? For i 2 To 40 Step 2 sign = ? fact-| # fact-??? term x i/ fact For j = 1 To i Next j sum = ??? If (term
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
