Question
please write matlab code for these questions in matlabplatform
1, write an m file to determine the sum of the infinite series converges to π2 /6. Do this by computing the sum for a) n-100,
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hello,
          Please find the answer to Q1 attached as under. Please give a thumbs up rating if you find the answer useful! Have a rocking day ahead!

************** Matlab Code **********

n = logspace(2,4,3);
y1 = linspace(1,n(1),n(1));
s1 = sum(1./(y1.^2))
y2 = linspace(1,n(2),n(2));
s2 = sum(1./y2.^2)
y3 = linspace(1,n(3),n(3));
s3 = sum(1./y3.^2)

******** End of Code **********

Output:

s1 =

    1.6350


s2 =

    1.6439


s3 =

    1.6448

You can see that as n increases, the value of the sum converges to pi2/6 (=1.6449)

*****************************************************************
PS: Please do not forget the thumbs up!

Add a comment
Know the answer?
Add Answer to:
1, write an m file to determine the sum of the infinite series converges to π2 /6. Do this by com...
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
  • One problem in timber management is to determine how much of an area to leave uncut...

    One problem in timber management is to determine how much of an area to leave uncut so that the harvested area is reforested in a certain period of time. It is assumed that reforestation takes place at a known rate per year, depending on climate and soil conditions. A reforestation equation expresses this growth as a function of the amount of timber standing and the reforestation rate. For example, if 100 m2 are left standing after harvesting and the reforestation...

  • Timber Regrowth. A problem in timber management is to determine how much of an area to...

    Timber Regrowth. A problem in timber management is to determine how much of an area to leave uncut so that the harvested area is reforest in a certain period of time. It is assumed that reforestation takes place at a known rate per year, depending on climate and soil conditions. A reforestation equation expresses this growth as a function of the amount of timber standing and the reforestation rate. For example, if 100 acres are left standing after harvesting and...

  • CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in...

    CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in Appendix A. Required: Compute the following ratios for Year 11. Liquidity ratios: Asset utilization ratios:* a. Current ratio n. Cash turnover b. Acid-test ratio 0. Accounts receivable turnover c. Days to sell inventory p. Inventory turnover d. Collection period 4. Working capital turnover Capital structure and solvency ratios: 1. Fixed assets turnover e. Total debt to total equity s. Total assets turnover f. Long-term...

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