[Solved]Ece 206 L Lab Exercise 7 C Programming User Created Functions Prelab Preliminary C Program Q37239181

ECE 206/L LAB EXERCISE #7: C++ Programming User Created Functions PRELAB: Preliminary C++ Program INTRODUCTION: According to Taylor series expansions, we have tan-i (x) = x–+ + (2k +xls1 + = 3 5 79 11 k=0 tan(x) -3-tan() x1 cos(x) = 1–+ since cos(x+2nr) = cos(x), modulate the angle to 0 !–+ 2 4!8!10! (2k)! x < 2π rad for the series Note: exp(x) = 1+1+21 + 31+41+51+ = k! Using these equations, we can approximate the values of arctan, cos , and e functions for a given argument x TASKS: I. Write three functions f(x) arctan(x), g(x)-cos(x), and h(x) = exp(x) using the series above to obtain accuracy to 5 decimal places Hint: To determine the accuracy of the approximation, you may check the value of each of the terms you add onto the approximation. If the term you add is within +10-6, the fifth place after decimal point of your approximation mostly likely won’t be affected by this term 2. Write a C++ program that uses the functions above to calculate J(n) for integer n – 0,1, 2,… ,6, where /(n) = 10f (5) * g (6000mn +–) * h (-2 = 10 arctan(-) * cos( 6000mn +-) * e-T, The program also display the result exactly in the following table format: J(n) exp(-n/2) 10 arctan(n/4)cos(6000n *PI PI/6) Show Instructor or Lab Assistant: well-commented C+ program, and running output. Show transcribed image text ECE 206/L LAB EXERCISE #7: C++ Programming User Created Functions PRELAB: Preliminary C++ Program INTRODUCTION: According to Taylor series expansions, we have tan-i (x) = x–+ + (2k +xls1 + = 3 5 79 11 k=0 tan(x) -3-tan() x1 cos(x) = 1–+ since cos(x+2nr) = cos(x), modulate the angle to 0 !–+ 2 4!8!10! (2k)! x
Expert Answer
Answer to ECE 206/L LAB EXERCISE #7: C++ Programming User Created Functions PRELAB: Preliminary C++ Program INTRODUCTION: Accordin… . . .
OR

