python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Taylor series of cos x expansion in python
I want to calculate the summation of cosx series (while keeping the x in radian). This is the code i created:
import math
def cosine(x,n):
sum = 0
for i in range(0, n+1):
sum += ((-1) ...
aycee
Votes: 0
Answers: 2
Taylor Series C++ another value
I have to write program which calculates value cos(x) with use Taylor Series. for a= -7 to 7 program work.
problem is when i use value a>7 and the same a<-7.
#include <iostream>
#include &...
malinowynosek_
Votes: 0
Answers: 1
Expanding taylor series using relation between successive terms with a specified tolerance in spyder
I have used this code to determine the value of e^pi with a specified tolerance in spyder(Python 3.8).
from math import*
term=1
sum=0
n=1
while (abs(e**pi-term))>0.0001:
term=term*pi/n
sum+...
Adithya
Votes: 0
Answers: 2
Testing program for convergence?
So, I'm pretty inexperienced with calculus, and in C++, so please bear with me if I'm misunderstanding this completely. I'm supposed to be testing this Taylor series program for convergence, which I'm...
AstralV
Votes: 0
Answers: 1