0

I'm trying to calculate sin(x) without using
#include <math.h>

i need to use Maclaurin Series to calculate sin(x) with recursive process.

thanks

3
Contributors
3
Replies
6
Views
10 Years
Discussion Span
Last Post by Rashakil Fol
0

Yes, i can, either i know the formula of Maclaurin Series but i cant write the program!!!

0

It's hard to understand your problem then. If you know how to compute a Maclaurin series by hand, out to the point where the error is less than some tolerance level, why can't you write it in a program?

Of course, that's the whole point of this programming exercise, to convert the ability to do algorithms by hand to the ability to write computer programs that can perform the same algorithms.

You've got sin(x) = x - x^3/3! + x^5/5! - ... + (-1)^n*x^(2n+1)/(2n+1)! + ..., and there's some formula that tells you the error as well, when you've calculated to N terms.

Use a while loop, or a for loop, and calculate as many terms as you need.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.