C++

closed account (j8qkSL3A)
PROGRAM1
As you know any function can be expanded according to Taylor expansion.
For example the cosine of x can be written as

cos x= 1- x^2/2 + x^4/4! + ...+(-1)^nx^2n/2n!



Write a program that evaluates in a loop the first 5 terms for x= sqrt 2/2 and add them together and compare the result to the actual value
Create a function(subroutine) that calculate a generic n term for a generic x. Use this function in a loop to evaluate the terms and add them together. Finally compare the result to the real result using the cox(x) function in C++
We don't do homework here.
What! You didn't even post your attempt at doing the homework?

I'm sure people would have more incentive to try and help with your CODE rather than with the assignment.

Also, we don't do homework here but I'm sure that we would be willing to steer you into the correct direction and help you out, given that you show us what you have done so far, and where you are stuck.
closed account (j8qkSL3A)
Hello everyone.
I would like to mention that I am 56 years old and I am taking a beginner course in C++ cause I want to know it and I am bored. I am almost a retiree so it is something to do. I have worked out many on my own, but need help with the above. You are not doing my HW as I do not go to school. Only taking this course cause I was bored. Can you please show me. Thank you.
Even if I did belive that, which I don't. If you're taking the course because you are bored, how is getting answers from forums for the tasks in the course making it fun for you? Work on it on your own, or post in the jobs section of this forum and offer money for people to do your work =)
This topic comes up regularly on this forum. Here's a recent post on the Taylor Series:
http://www.cplusplus.com/forum/beginner/184066/

A bit of google search will bring up many more such threads.
Last edited on
Topic archived. No new replies allowed.