\(~\)

Calculus Exercise 8.8.17

Pick any exercise in 8.8 of the calculus textbook. Solve and post your solution. If you have issues doing so, discuss them.

\(~\)

In exercise 17 - 20, use the Taylor series given the Key idea 8.8.1 to verify the given identity.

# this library is where the taylor series function is located
library(pracma)

\(~\)

cos(−x) = cos x

# getting results for cos(-x)
x <- function(x) cos(-x)
result <- taylor(x, 0, 5)
result
## [1]  0.04166733  0.00000000 -0.50000000  0.00000000  1.00000000
sum(result)
## [1] 0.5416673
# getting results for cos(x)
x2 <- function(x) cos(x)
result <- taylor(x2, 0, 5)
result
## [1]  0.04166733  0.00000000 -0.50000000  0.00000000  1.00000000
sum(result)
## [1] 0.5416673

\(~\)

sin(-x) = - sin x

# getting results for sin(-x)
x3 <- function(x) sin(-x)
result <- taylor(x3, 0, 5)
result
## [1] -0.008333275  0.000000000  0.166666644  0.000000000 -1.000000000
## [6]  0.000000000
sum(result)
## [1] -0.8416666
# getting results for -sin(x)
x4 <- function(x) (-sin(x))
result <- taylor(x4, 0, 5)
result
## [1] -0.008333275  0.000000000  0.166666644  0.000000000 -1.000000000
## [6]  0.000000000
sum(result)
## [1] -0.8416666

Conclusion:

Based on the above results cos(-x) = cos(x) and sin(-x) = -sin(x)

Issues: At first I didn’t know how exactly to approach the problem using the pracma library. I found this resource that helped me a bit more: https://www.rdocumentation.org/packages/pracma/versions/1.9.9/topics/taylor, but my question still arised when showing that the left side of the function was equal to the right side. Based on my work above, did I approach the problem correctly? Any suggestions?