In mathematics, the Taylor series is the representation/expansion of a function as an infinite sum of the terms of that function calculated from the derivative values at a single point.
We want to find the value of the cos 𝑥 function at the point 𝜋/5 by calculating the Taylor series. And then we compare it with its real value.
-We get the step count information from the user.
-We define the value of x.(𝜋/5 for this application)
-We take the derivative of cosx in the loop and substitute it in the taylor series formula.
-Then we calculate cos(𝜋/5) to find the true result.
-For cutting error (Actual Value - approximate value calculated by Taylor Series)