Skip to main content
8 of 10
Reduced to 152 chars

Ruby - 160 152 Chars

Using recursion an the fact that for this recursive function, cos(x, n) = 1 + sin(x, n + 1)

def p(x,n)n<1?1:x*p(x,n-1)end
def f(n)n<2?1:n*f(n-1)end
def c(x,n)n<1?1:p(x,n)/f(n)-c(x,n-2)end
x,n=gets.split.map &:to_f
n*=2
puts c(x,n-1)+1,c(x,n-2)