If I integrate the right-hand side termwise, I get $$\int\sum_{n=0}^\infty x^n\,dx=\sum_{n=0}^\infty \int x^n\,dx=\sum_{n=0}^\infty \frac{x^{n+1}}{n+1}+C$$
I.e. in order to integrate the sum, i integrate each term of the sum and then add all those up.
(the C is there because it's an indefinite integral. it's outside the sum, to be clear)
@mahmoud That's a pretty hard condition to have, geometrically speaking. The only way for that ratio to be constant is if $d=\lambda b$ and $c=\lambda a$ for some constant $\lambda$.
In which case $f(x)=\lambda$.
Geometrically, that corresponds to the two lines having a common x-intercept.