C++

posted by .

Write a MAIN function and a FUNCTION to compute the sum of the below series.

(n!)/(2n+1)! (from n=1 to infinity)

Within the MAIN function:
. Read a variable EPSILON of type DOUBLE (desired accuracy) from
the standard input.
EPSILON is an extremely small positive number which can be anything
between 1E-06 (10^(-6)) and 1E-12 (10^(-12)).
. EPSILON value will be passed to the FUNCTION as an argument.
Within the FUNCTION:
. In a do-while loop:
. Continue adding up the terms until |Sn+1 - Sn| < EPSILON.
. Sn is the sum of the first n-terms.
. Sn+1 is the sum of the first (n+1)-terms.
When the desired accuracy EPSILON is reached print the SUM and the number
of TERMS added to the sum.

  • C++ -

    Thanks for now

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Taylor seires

    f(x) =ln (1-x) a) Compute f'(x), f''(x), f'''(x). Spot the pattern and give an expression for f ^(n) (x) [the n-th derivative of f(x)] b) Compute the MacLaurin series of f(x) (i.e. the Taylor series of f(x) around x=0) c) Compute the …
  2. Piecewise function

    write a piece-wise function over 3 intervals whose domain is (-infinity, infinity) and whose range is (-infinity,-3) united (1,10). include an increasig, decreasing, and a constant function.
  3. pre calc

    The Identity Function The Squaring Function The Cubing Function The Reciprocal Function The Square Root Function The Exponential Functional Lo The Natural Logarithum Function The Sine Function The Cosine Function The Absolute Value …
  4. calculus

    Recall that a function G(x) has the limit L as x tends to infinity, written lim(x->infinity)G(x) = L, if for any epsilon > 0, there exists M >0 so that if x > M, then |G(x) − L| < epsilon. This means that the limit …
  5. calculus

    Recall that a function G(x) has the limit L as x tends to infinity, written lim(x->infinity)G(x) = L, if for any epsilon > 0, there exists M >0 so that if x > M, then |G(x) − L| < epsilon. This means that the limit …
  6. C++

    Write a MAIN function and a FUNCTION to compute the sum of the below series. ((-1)^(n+1)*n!)/(n*n) (from n=1 to infinity) Within the MAIN function: . Read a variable EPSILON of type DOUBLE (desired accuracy) from the standard input. …
  7. C++

    Write a MAIN function and a FUNCTION to compute the sum of the below series. ((-1)^(n+1)*n!)/(n*n) (from n=1 to infinity) Within the MAIN function: . Read a variable EPSILON of type DOUBLE (desired accuracy) from the standard input. …
  8. C++

    you are right the question is exactly like this... can you help me for this question.... thanks Write a MAIN function and a FUNCTION to compute the sum of the below series. ((-1)^(n+1)*n!)/(n^n) (from n=1 to infinity) Within the MAIN …
  9. C++

    You are to use an array of doubles to compute the average of a sequence of numbers and the standard deviation of the numbers. Based on these value you will print for each of the values in the array: the array index, the value, the …
  10. Python programming

    A standard problem in mathematics is to measure the area under a curve (or to integrate the function defining the curve). A simple way to do this is to approximate the area with a series of rectangles (whose areas are easy to compute). …

More Similar Questions