Question

program using mathlab5. Calculation of Series Calculate the summation of the following series for proving if the series are convergent. 1 1 1 1 1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

clc% helps in clearing screen
clear all% helps in clearing history
close all% helps in closing files if any
n=10;
f=0;
s=1;
t=1;
p=1;
for i=1:n
f=f+t;
s=s+1;
p=p+s;
t=1/p;
end
save('HW2_12.dat','f','-ascii');
g=0;
for i=1:n
g=g+1/2^(i-1);
end
save('HW2_13.dat','g','-ascii');
n=50;
f=0;
s=1;
t=1;
p=1;
for i=1:n
f=f+t;
s=s+1;
p=p+s;
t=1/p;
end
save('HW2_14.dat','f','-ascii');
g=0;
for i=1:n
g=g+1/2^(i-1);
end
save('HW2_15.dat','g','-ascii');
n=75;
f=0;
s=1;
t=1;
p=1;
for i=1:n
f=f+t;
s=s+1;
p=p+s;
t=1/p;
end
save('HW2_16.dat','f','-ascii');
g=0;
for i=1:n
g=g+1/2^(i-1);
end
save('HW2_17.dat','g','-ascii');
n=100;
f=0;
s=1;
t=1;
p=1;
for i=1:n
f=f+t;
s=s+1;
p=p+s;
t=1/p;
end
save('HW2_18.dat','f','-ascii');
f
g

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
program using mathlab 5. Calculation of Series Calculate the summation of the following series for proving...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Lab 5-2 Nested Loops 2. Summation Of Numbers (using Nested While Loops) Part A: The program...

    Lab 5-2 Nested Loops 2. Summation Of Numbers (using Nested While Loops) Part A: The program will calculate and display the total of all numbers up to a specific number (entered by the user). Only positive numbers are allowed. Part B: User-controlled loop Part A Input Validation loop Part A: Summation loop Examples: When 5 is entered the program will calculate the total as 1+2+...+5 and display 15. When 2 is enterered the program will calculate the total as 1+2...

  • This is a c++ question note: not using  namespace std; at the beginning of the program Writing...

    This is a c++ question note: not using  namespace std; at the beginning of the program Writing Data to a File This program will write a series of letters, starting with 'A', to an external file (letters.txt). The user will decide how many letters in total get saved to the file. ** IMPORTANT: The test cases will evaluate your code against .txt files that I uploaded. You do NOT have to upload your own txt files. Input: Including 'A', how many...

  • Write a program which will Ask the user a series of questions using the Scanner object Based on t...

    Write a program which will Ask the user a series of questions using the Scanner object Based on the input, draw a grid of star figures on the DrawingPanel You program should ask your user: . What R, G & B values to create a color to draw the figure? How many stars across should the fgure be? How many stars tall should the figure be? Note that your program does not need to error check the users responses Your...

  • Submission Items: (1) A Word document in which you: a. Describe in brief the problem you...

    Submission Items: (1) A Word document in which you: a. Describe in brief the problem you are solving and the numerical method used. b. Snapshot of the output, when you run the program for the conditions mentioned in the questions. c. Discuss your results. (2) MATLAB code (m) file() Question 1: [10 points) Write a MATLAB function that calculates the approximate value of arctan(x) using the Maclaurin series approximation: arctan(x) = x- + +... The function should accept 3 parameters:...

  • You will write a C program, q1 sequence.c, that computes the value of the nth term...

    You will write a C program, q1 sequence.c, that computes the value of the nth term in any recursive sequence with the following structure: an = c1 · an−1 + c2 · an−2 a0 > 0 a1 > 0 c1 6= 0 c2 6= 0 Your C program will take 5 integer arguments on the command line: n, a0, a1, c1 and c2. n must be an integer greater than or equal to 0. If more or fewer arguments are...

  • 1. Answer the following questions. Justify your answers. a. (8pts) Find the Taylor series for f(x)...

    1. Answer the following questions. Justify your answers. a. (8pts) Find the Taylor series for f(x) = (5x centered at a = 1 using the definition of the Taylor series. Also find the radius of convergence of the series. b. (8pts) Find a power series representation for the function f(x) = 1 5+X C. (4pts) Suppose that the function F is an antiderivative of a function f. How can you obtain the Maclaurin series of F from the Maclaurin series...

  • (1 pt) Test each of the following series for convergence by either the Comparison Test or...

    (1 pt) Test each of the following series for convergence by either the Comparison Test or the Limit Comparison Test. If either test can be applied to the series, enter CONV if it converges or DIV If it diverges. If neither test can be applied to the series, enter NA. (Note: this means that even if you know a given series converges by some other test, but the comparison tests cannot be applied to it, then you must enter NA...

  • Write VBA functions to calculate sin (x) using the Maclaurin arcsine series, and compare the values...

    Write VBA functions to calculate sin (x) using the Maclaurin arcsine series, and compare the values for sin-1(x) from your program to those given by the Excel spreadsheet function ASIN(x). The Maclaurin arcsine expansion is given by x 3x 6 40 (2n)! sin1(x)-2((2n+1) Note: This function by definition is only defined for-1 SxS1. When you write the code for calculating it, you will need to include code that assigns a value to it that reflects it is undefined for values...

  • Write a program to calculate students’ average test scores and their grades. You may assume the...

    Write a program to calculate students’ average test scores and their grades. You may assume the following data: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63 Use three...

  • Write a program to calculate students’ average test scores and their grades. You may assume the...

    Write a program to calculate students’ average test scores and their grades. You may assume the following data: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63 Use three...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT