# Ruby - 129 Chars #9  --FIXED--

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

<!-- language-all: lang-rb -->

    def f(n)n==0?1:n*f(n-1)end
    def c(x,n)n<1?1:x**n/f(n)-c(x,n-2)end
    x,n=gets.split.collect{|i|i.to_f}
    n*=2
    puts c(x,n-1)+1,c(x,n-2)