0

Hi I am trying to write a code that finds approximations of sine and cosine using the equations below with a given value of theta in degrees basically as a novice programmer i am having trouble setting upa a while loop for the expansions. Also can you guys please quote sources(books,web pages, etc.) for a beginner programmer in python for syntax and basic concepts.

cos(x)= 1- x2/2! + x4/4! - x6/6! + ..

sin(x)= x - x3/3! + x5/5! - x7/7! + ..

Thanks in advance.

4
Contributors
3
Replies
65
Views
3 Years
Discussion Span
Last Post by ZZucker
0

Hint, use math.pow() and math.factorial()
so
x4/4!
will be
math.pow(x, 4)/math.factorial(4)

Edited by vegaseat

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.