C program to find sin series
Y= sin(x)
where, x is the angle in degree which is converted to Radian , converted as follows
x=x*3.14159/180
#include<stdio.h>
#include<conio.h>
void main()
{
int i, n;
float x, sum, t;
clrscr();
printf(" Enter the value for x : ");
scanf("%f",&x);
printf(" Enter the value for n : ");
scanf("%d",&n);
x=x*3.14159/180;
t=x;
sum=x;
/* Loop to calculate the value of Sine
*/
for(i=1;i<=n;i++)
{
t=(t*(-1)*x*x)/(2*i*(2*i+1));
sum=sum+t;
}
printf(" The value of Sin(%f) =
%.4f",x,sum);
getch();
}
Write a program to find Y=sin(x), where x=0,1,2,3,..., n and n is natural number and x...
C++: Write a program that computes and displays a full binomial expansion, such as (x+y)^n where only n is asked for by the user.
a.) Write a C++ program that calculates the value of the series sin x and cos x, sin 2x or cos 2x where the user enters the value of x (in degrees) and n the number of terms in the series. For example, if n= 5, the program should calculate the sum of 5 terms in the series for a given values of x. The program should use switch statements to determine the choice sin x AND cos x, sin...
Prove that there are no natural number solutions to the equation where x, y ≥ 2 ... (See Picture Below) Prove that there are no natural number solutions to the equation where X, Y > 2. x2 - y2 = 1.
→ Z where f(x) = -22. Use this to Recall that N = {0,1,2,3,...} as defined by our book. Let f:N answer each question. (a) (4 points) Is f(x) one to one? Explain your answer (b) (4 points) Is f(x) onto? Explain your answer.
Q1. Consider the system displayed below 8[n] blul y[n] W[n] sin(in/2) where x[n] = sin(itn/4) πη w[n] = ejîn, and h[n] πη a) Sketch G(j12), the discrete-time Fourier transform of g[n], for - << +0. b) Find the output signal y[n] of the system. (10 marks) (10 marks)
9. Consider the Branching Process {Xn,n = 0,1,2,3,...} where Xn is the population size at the nth generation. Assume P(Xo = 1) = 1 and that the probability generating function of the offspring distribution is common A(z) (z3322z + 4) 10 (а) If gn 3 P(X, — 0) for n %3D 0, 1,..., write down an equation relating ^n+1 and qn. 0,1,2 Hence otherwise, evaluate qn for n= or (b) Find the extinction probability q = lim00 n 6 marks]...
1. A difference equation is shown below. y(n)- -0.25 y(n-1)+ 0.125 y(n-2)+ x(n)+x(n-1) (a) Find the transfer function H(z) = Y(z)/ X(z) (b) Find Y(z) ifx(n) = (0.4)nu(n) (n=0,1,2,3, ) (c) If x(n) = y(n)-0 for all n < 0, calculate the values of y(0), y(1) and y(2) directly from the difference equation.
(c) Idifficult] Let x ~ Binomial (n, p) where n is an even number. Find the PMF of Y g(X) mod (X, 2) where "mod" denotes modulus division of the first argument by the second argument (d) Idifficult MA] Let X~NegBin (k, p). Find the PMF of Y g(X) = mod(X, n) where n E N
5B. Using n tasks (where n<-N), write a PVM program to find 4M 5B. Using n tasks (where n
elsewhere elsewhere 6. Convolution between two discrete time signals, #1 [n] and 12[n] is given by: y[m] = $R=0[n] ru[m sin (Pan) ,n=0,1,2,3 cos (27) ,n=0,1,2,3 n, m 7. Let 21 [n] 10. with N = 4 find y(0) and y[1]. (10 points) 7. The taylor series expansion of c" = = 1+++++ and sin(x) = 1 - 3 +420 ko 15x24. Using this, can you write the taylor series expansion of esin(x”)? (just write the first two lower order...