seperating two variables in a function with summation

46 Views Asked by At

I'm building a data analysis program that perform on big chunks of data, the issue I'm having is the speed of some operations; to be exact I have a function that takes two variables in this form : $$f(a + b)$$ and the function takes an integer from [0, 255] and gave a number in the same domain, the issue is this function will be in a loop and as along as i'm adding more variables to it in a recursive way the function become harder to predict, so I start searching for a way to seperate the variable in it, the result i'm looking for is : $$f(a+b) = f(a)+g(a)h(b)$$ I know that any function f(x) can be written as $$f(x)=\sum_{i=0}^\infty c_ix^i = c_0+\sum_{i=1}^\infty c_ix^i$$ therefor $$f(a+b)=c_0+\sum_{i=1}^\infty c_i(a+b)^i$$and we know that $$(a+b)^i=\sum_{k=0}^i \binom{i}{k}a^{i-k}b^k = a^i+\sum_{k=1}^i \binom{i}{k}a^{i-k}b^k$$with that in minde we have $$f(a+b)=c_0+\sum_{i=1}^\infty c_i(a^i+\sum_{k=1}^i \binom{i}{k}a^{i-k}b^k)$$ $$=c_0+\sum_{i=1}^\infty c_ia^i+\sum_{i=1}^\infty\sum_{k=1}^i c_ia^{i-k}b^k\binom{i}{k}$$ $$=f(a) + \sum_{i=1}^\infty\sum_{k=1}^i c_ia^{i-k}b^k\binom{i}{k}$$so far everything is good but I cant simplify that sum to two functions of a and b.