Partial sums need help writing a program for computing partial sums

Hey guys, I'm completely rookie to Matlab, I have a couple of assignments for my Numerical Methods class and I'd appreciate your help. 1)Write a short program (e.g. in Matlab) to compute partial sums. How many terms are needed to obtain 3 correct digits of π/4 ?
2) Write a program to compute the partial sum S_N for x = -25, and various values of N. How do you explain that your answer is never close to e^(-25) regardless of how you choose N?
Again I'm completely new to coding, programming and all that good stuff, my instructor hasn't even held a single lab session, yet we have to find this one on our own. Thanks again for the suggestions.

Answers (1)

Jan
Jan on 20 Sep 2013
Edited: Jan on 20 Sep 2013
What is your question? After "we have to find this one on our own" it is hard to reply anything useful. But you've found your way to the forum by your own and this was a good idea. Now using the search function allows for finding a lot of related discussions.
Another very useful strategy is reading the Getting Started chapters of Matlab's documentation. They are written by professionals for beginners. The forum cannot beat this powerful introduction in all basics of Matlab.
For the further discussion here I recommend to try to program as much as you can, post the code here and eithr the occurring error message or a description of the difference between your expectations and the results.

5 Comments

I need to write a short program to compute partial sums. for example, I'm to approximate the value of pi/4 and I need to know how many terms are needed to obtain 3 correct digits. The second question is, consider the Taylor series for e^x, write a computer program to compute the partial sum Sn of that Taylor series for x= -25 and various values of n. We also need to explain why the values found never get close to e^(-25) no matter which values of n we choose.Thanks
@Gervais: Posting comments in the comment section is fine, while they should not appear in the field for answers. Therefore I've deleted your identical message from the answers.
You have posted the instructions you got. But what is your question? Do you want us to solve this for you? Do you want us to decide, if these are good questions for a beginner? Do you need the instructions to be translated to another language? Should we guess how we could help you to solve your work?
Solving homeworks of others is not wanted and liked in this forum, because it is not efficient, forces the students to cheat when they submit the solutions, annoys the teachers who participate in this forum also, and do not help the users in a long term. See http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers .
Please read the last paragraph of my answer again.
I need instructions on how to go about solving this. How do I create the code..
As to your second problem, I would recommend you reading this article:'
http://en.wikipedia.org/wiki/Radius_of_convergence
@Gervais: It seems like you do not get my point. Without a specific question, I cannot help you.
I've added the doit4me tag, because I do not see any own effort from you.

Sign in to comment.

Categories

Asked:

on 20 Sep 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!