answersLogoWhite

0

#include<stdio.h>

#include<math.h>

void main()

{

int i = 2, n, s = 1, x, pwr = 1, dr;

float nr = 1, x1, sum;

clrscr();

printf("\n\n\t ENTER THE ANGLE...: ");

scanf("%d", &x);

x1 = 3.142 * (x / 180.0);

sum = x1;

printf("\n\t ENTER THE NUMBER OF TERMS...: ");

scanf("%d", &n);

while(i <= n)

{

pwr = pwr + 2;

dr = dr * pwr * (pwr - 1);

sum = sum + (nr / dr) * s;

s = s * (-1);

nr = nr * x1 * x1;

i+= 2;

}

printf("\n\t THE SUM OF THE SINE SERIES IS..: %0.3f",sum);

getch();

}

To get all source codes for calculating sine,cose and tan through Taylor series in C++, visit:

http://bitsbyta.blogspot.com/2011/02/calculating-sine-in-radians-using_16.HTML

http://bitsbyta.blogspot.com/2011/02/calculating-cosine-in-radians-using.HTML

http://bitsbyta.blogspot.com/2011/02/calculating-tan-in-radians-using-Taylor.HTML

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

How do you calculate sine value without using math function?

Using its Taylor-series.


Fourier series of sine wave?

The fourier series of a sine wave is 100% fundamental, 0% any harmonics.


Write a program to evaluate sine using taylors expansion?

To evaluate the sine function using Taylor's expansion, you can implement the following Python program: import math def sine_taylor(x, n_terms=10): sine_value = 0 for n in range(n_terms): term = ((-1) ** n * (x ** (2 * n + 1))) / math.factorial(2 * n + 1) sine_value += term return sine_value # Example usage angle = math.radians(30) # Convert degrees to radians print(sine_taylor(angle)) This program calculates the sine of an angle x in radians by summing the first n_terms of its Taylor series expansion around zero. Adjust n_terms for higher accuracy.


What is a sine-cosine Encoder?

A Sine-Cosine Encoder is a position transducer using only two sensors, each 90 degrees out of phase with respect to each other, driving an up/down counter through appropriate logic. Since sine and cosine are 90 degrees out of phase with repect to each other, this technique is called sine-cosine encoding. The computer mouse is an example of this technique.


How do we measure AC sine wave using an oscilloscope?

To measure an AC sine wave using an oscilloscope, first connect the probe to the circuit where the AC signal is present. Set the oscilloscope to an appropriate voltage scale and time base for the expected frequency of the sine wave. Adjust the vertical and horizontal controls to clearly display the waveform on the screen. Once displayed, you can analyze the waveform by measuring parameters such as peak-to-peak voltage, frequency, and period directly from the oscilloscope's readout or by using the cursor function for more precise measurements.

Related Questions

Write a program to find the sum of sine series?

Writing a program for a sum of sine series requires a rather long formula. That formula is: #include #include #include main() { int i,n,x; .


How do you calculate sine value without using math function?

Using its Taylor-series.


When was Sine Language created?

Sine Language was created in 2009.


How to generate multi component sine wave signal by using matlab program?

Generating Sine and Cosine Signals (Use updated lab)


Fourier series of sine wave?

The fourier series of a sine wave is 100% fundamental, 0% any harmonics.


How do you calculate arc sine?

arc sine is the inverse function of the sine function so if y = sin(x) then x = arcsin(y) where y belongs to [-pi/2, pi/2]. It can be calculated using the Taylor series given in the link below.


Half range sine and cosine series?

half range cosine series or sine series is noting but it consderingonly cosine or sine terms in the genralexpansion of fourierseriesfor examplehalf range cosine seriesf(x)=a1/2+sigma n=0to1 an cosnxwhere an=2/c *integral under limits f(x)cosnxand sine series is vice versa


When you enter a sine into your calculator and press the arc sine key you get the answer but how does your calculator convert sine into degrees?

General answer: Math Specific Answer: Taylor Series


What are the top communication in the world?

sine language, moscode and mail


What is the Fourier Series for x sinx from -pi to pi?

The word sine, not sinx is the trigonometric function of an angle. The answer to the math question what is the four series for x sine from -pi to pi, the answer is 24.3621.


How can music be created using sine waves?

Music can be created using sine waves by combining different frequencies and amplitudes of sine waves to produce different sounds and tones. These sine waves can be manipulated and layered to create melodies, harmonies, and rhythms in music production.


What is a good sentence using the word sine die?

The court will take a break without sine die.