answersLogoWhite

0

/*

Aim: Program to Find Value of sin(x) using Expansion Series Given Below:

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

Developer: Devharsh Trivedi

Web: www.knowcrazy.com

*/

#include <stdio.h>

#include <math.h>

main()

{

float base, pwr, sum, c=1, m=2, i=3, g, h;

printf("\nEnter the base value: ");

scanf("%f", &base);

printf("\nEnter the power value: ");

scanf("%f", &pwr);

sum = base;

ab:

m = m * i;

h = pow(-1, c);

g = pow(base, i);

sum = sum + (h * g) / m;

i = i + 2;

c++;

m = m * (i - 1);

if (i <= pwr)

goto ab;

printf("\n\nSum = %f", sum);

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Derive recursion formula for sin by using Taylor's Series?

the Taylor series of sinx


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.


Prove this identity 1 plus cosx divide by sinx equals sinx divide by 1-cosx?

2


How do you solve 1 minus cosx divided by sinx plus sinx divided by 1 minus cosx to get 2cscx?

(1-cosx)/sinx + sinx/(1- cosx) = [(1 - cosx)*(1 - cosx) + sinx*sinx]/[sinx*(1-cosx)] = [1 - 2cosx + cos2x + sin2x]/[sinx*(1-cosx)] = [2 - 2cosx]/[sinx*(1-cosx)] = [2*(1-cosx)]/[sinx*(1-cosx)] = 2/sinx = 2cosecx


How do you verify the identity sinx cscx 1?

sinx cscx = 1 is the same thing as sinx(1/sinx) = 1 which is the same as sinx/sinx = 1. This evaluates to 1=1, which is true.


Verify that Cos theta cot theta plus sin theta equals csc theta?

It's easiest to show all of the work (explanations/identities), and x represents theta. cosxcotx + sinx = cscx cosx times cosx/sinx + sinx = csc x (Quotient Identity) cosx2 /sinx + sinx = csc x (multiplied) 1-sinx2/sinx + sinx = csc x (Pythagorean Identity) 1/sinx - sinx2/sinx + sinx = csc x (seperate fraction) 1/sinx -sinx + sinx = csc x (canceled) 1/sinx = csc x (cancelled) csc x =csc x (Reciprocal Identity)


Can you Show 1 over sinx cosx - cosx over sinx equals tanx?

From the Pythagorean identity, sin2x = 1-cos2x. LHS = 1/(sinx cosx) - cosx/sinx LHS = 1/(sinx cosx) - (cosx/sinx)(cosx/cosx) LHS = 1/(sinx cosx) - cos2x/(sinx cosx) LHS = (1- cos2x)/(sinx cosx) LHS = sin2x /(sinx cosx) [from Pythagorean identity] LHS = sin2x /(sinx cosx) LHS = sinx/cosx LHS = tanx [by definition] RHS = tanx LHS = RHS and so the identity is proven. Q.E.D.


How do you find integration ofcos sinx?

It seems that you can't express that integral in terms of a finite number of commonly used functions. In the Wolfram Alpha site (input: "integral cos sin x"), you can find the first few terms of an infinite series expansion.


Integration of root sinx?

integration of (sinx)^1/2 is not possible.so integration of root sinx is impossible


What is 1 sinx?

If you mean 1 - sinx = 0 then sinx = 1 (sin-1) x = 90


What is the derivative of 1 divided by sinx?

y=1/sinxy'=(sinx*d/dx(1)-1*d/dx(sinx))/(sin2x)y'=(sinx*0-1(cosx))/(sin2x)y'=(-cosx)/(sin2x)y'=-(cosx/sinx)*(1/sinx)y'=-cotx*cscx


How do you solve csc x-sin x equals cos x cot x?

cscx-sinx=(cosx)(cotx) 1/sinx-sinx=(cosx)(cosx/sinx) (1/sinx)-(sin^2x/sinx)=cos^2x/sinx cos^2x/sinx=cos^2x/sinx Therefore LS=RS You have to remember some trig identities when answering these questions. In this case, you need to recall that sin^2x+cos^2x=1. Also, always switch tanx cotx cscx secx in terms of sinx and cosx.