Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the McLaurin series sin(x) = x-x^3/(3!) + x^5/(5!)-x^7/(7!) + x^9/(9!) +..

ID: 3687206 • Letter: G

Question

Given the McLaurin series sin(x) = x-x^3/(3!) + x^5/(5!)-x^7/(7!) + x^9/(9!) +... where x is in radian. cos(x) = 1 - x^2/(2!) + x^4/(4!) - x^6/(6!) + x^8/(8!) +... where x is in radian. Write two functions g(x) = sin(x) and h(x) = cos(x) using the series above to obtain accuracy to 5 decimal places. Write a C++ program that uses the functions above to calculate f(n) for integer n = 0 to 6 where f(n) =5 g(n) * h(4000 pi n + pi/3) = 5 sin(n) * cos(4000 pi n + pi/3) and 0 le n le 6 Run Output Format Requirement n 5 sin(n) cos(4000 pi n + pi/3) f(n) Post Lab: Well documented and correct C++ program., and run output Reference: sin(x) and cos(x) programs on the course website. As always, have the instructor verify that your program work as intended.

Explanation / Answer

hi,
I'm a beginner as far as c++ and i need help on writting a program.

Given

sin x = x - (x^3/3!) + (x^5/5!) - (x^7/7!) + (x^9/9!) ..... where x is in radian.


cos x = 1 - (x^2/2!) + (x^4/4!) - (x^6/6!) + (x^8/8!) ..... where x is in radian.


1. Write two functions g(x)= sin(x) and h(x)= cos(x) using the series above to obtain accuracy to 5 decimal places.

2. Write a C++ program that uses the functions above to calculate
f(n) for n=0 to 6 where

f(n)= 5g(n)* h(4000*PI*n + PI/3)
= 5 sin(n)* cos(4000*PI*n+PI/3)

answer:

1)

output formate:

program:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote